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

Michael Biebl mbiebl at gmail.com
Thu Apr 3 08:29:40 PDT 2014


2014-04-03 17:27 GMT+02:00 Thomas Bächler <thomas at archlinux.org>:
> 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.

I wouldn't do that.
If you need that, simply bind the .service to the device via BindsTo.




-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list