Auto Copy Files When USB Mounted
|
8th Oct, 2014, 02:14 PM
Post: #11
|
|||
|
|||
RE: Auto Copy Files When USB Mounted
@mjbrown
timeout on udev rules makes perfect sense. otherwise udevtrigger could block booting of system. to check if this is problem, make your usbcopy.sh just wrapper to launch another - real copy script as spawned process. so in usbcopy.sh called from udev rull do just Code: /run/my/real/copy.sh & this way copy process will start as another process and usbcopy.sh rule will return to udev immediately. another approach and maybe more suitable would be to re-use xbians usbmount implementation (auto usb storage mounter). it itself is called by a udev rule, spawned, and mounts your drive. it is already designed to provide "hooks" for user to easy inject the mount and umount events. all you need is to copy your scrtipt into /etc/usbmount/mount.d . all scripts here are started after disk is mounted. you don't need any conf files changes / updates. it even provides some internal info to the scripts, like UM_MOUNTPOINT is actual dir where the disk is mounted, and others ... UM_DEVICE - filename of the device node UM_MOUNTPOINT - mointpoint UM_FILESYSTEM - filesystem type UM_MOUNTOPTIONS - mount options that have been passed to the mount command UM_VENDOR - vendor of the device (empty if unknown) UM_MODEL - model name of the device (empty if unknown) some basic doc is at /usr/share/doc/usbmount/README.gz . but again, just put the script into relevant hook folder and you are done. Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Auto Copy Files When USB Mounted - mjbrown - 24th Sep, 2014, 03:31 PM
RE: Auto Copy Files When USB Mounted - f1vefour - 26th Sep, 2014, 02:00 PM
RE: Auto Copy Files When USB Mounted - mjbrown - 26th Sep, 2014, 03:00 PM
RE: Auto Copy Files When USB Mounted - f1vefour - 26th Sep, 2014, 03:05 PM
RE: Auto Copy Files When USB Mounted - mjbrown - 26th Sep, 2014, 03:17 PM
RE: Auto Copy Files When USB Mounted - f1vefour - 26th Sep, 2014, 04:08 PM
RE: Auto Copy Files When USB Mounted - mjbrown - 28th Sep, 2014, 07:14 PM
RE: Auto Copy Files When USB Mounted - f1vefour - 28th Sep, 2014, 09:13 PM
RE: Auto Copy Files When USB Mounted - mjbrown - 1st Oct, 2014, 09:56 PM
RE: Auto Copy Files When USB Mounted - mjbrown - 2nd Oct, 2014, 02:32 PM
RE: Auto Copy Files When USB Mounted - mk01 - 8th Oct, 2014 02:14 PM
RE: Auto Copy Files When USB Mounted - f1vefour - 10th Oct, 2014, 07:31 PM
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[PROBLEM] Auto-update to RC3 -> playing video files not working anymore | syco | 15 | 41,179 |
17th Sep, 2014 10:40 AM Last Post: moocow |