rbrito / usbmount

Simple set of scripts to automount removable devices for a Linux system
274 stars 88 forks source link

run-parts not executing script #20

Open JoePotchen opened 5 years ago

JoePotchen commented 5 years ago

I have created an executable in /etc/usbmount/mound.d that runs normally as well as when I manually call run-parts myself, however the script does not execute automatically when I plug in a drive.

Dec 14 05:03:09 otterslave systemd[1]: Created slice system-usbmount.slice. Dec 14 05:03:09 otterslave systemd[1]: Starting usbmount@dev-sdd.service... Dec 14 05:03:09 otterslave systemd[1]: Starting usbmount@dev-sdd1.service... Dec 14 05:03:09 otterslave usbmount[2390]: dev/sdd does not contain a filesystem or disklabel Dec 14 05:03:09 otterslave systemd[1]: usbmount@dev-sdd.service: Main process exited, code=exited, status=1/FAILURE Dec 14 05:03:09 otterslave systemd[1]: usbmount@dev-sdd.service: Failed with result 'exit-code'. Dec 14 05:03:09 otterslave systemd[1]: Failed to start usbmount@dev-sdd.service. Dec 14 05:03:14 otterslave usbmount[2420]: executing command: mount -texfat -ouser,umask=000,sync,noexec,nodev,noatime,nodiratime,gid=xbian,uid=xbian,umask=0 dev/sdd1 /media/usb0 Dec 14 05:03:14 otterslave usbmount[2420]: executing command: run-parts /etc/usbmount/mount.d Dec 14 05:03:15 otterslave systemd[1]: Started usbmount@dev-sdd1.service.

JoePotchen commented 5 years ago

So I have pinned down the problem to the python script not running inside my shell file when usbmount executes run-parts. When I run run-parts myself it runs fine.

Roaders commented 2 years ago

Did you get any further on this? I have a similar problem with scripts not being run. When I run run-parts /etc/usbmount/mount.d/ the script runs fine but nothing happens when usbmount runs it.