[systemd-devel] systemd-udevd seems to kill mount.ntfs started in rules scripts?

Thomas Bächler thomas at archlinux.org
Thu Apr 3 08:27:44 PDT 2014


Am 03.04.2014 17:13, schrieb Barry Scott:
> But as soon as the script exits the mount.ntfs process is killed off by
> something? systemd-udevd maybe?

From man udev's section on RUN:

"           This can only be used for very short-running foreground
tasks. Running an event process for a long period of time may block all
further events for this or a dependent device.

           Starting daemons or other long-running processes is not
appropriate for udev; the forked processes, detached or not, will be
unconditionally killed after the event handling has finished."

Instead of using RUN, use SYSTEMD_WANTS to start a .mount or .service
unit that does your job. In the remove case, use
RUN+="/usr/bin/systemctl stop --no-block foo.mount" or similar.

(Not that I think this is a good idea at all: Your volume will be
"unmounted" after it has been remove already - you are asking for data
corruption.)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140403/1d2ca476/attachment.sig>


More information about the systemd-devel mailing list