[systemd-devel] systemd-udevd seems to kill mount.ntfs started in rules scripts?
Michael Biebl
mbiebl at gmail.com
Thu Apr 3 08:28:08 PDT 2014
2014-04-03 17:13 GMT+02:00 Barry Scott <barry.scott at onelan.co.uk>:
> More of my porting from F16 to F20.
>
>
>
> I have the following in /etc/udev/rules.d
>
>
>
> ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb",
> RUN+="/usr/local/onelan/ntb/bin/ntb_mount_usb"
>
> ACTION=="remove", SUBSYSTEM=="block", SUBSYSTEMS=="usb",
> RUN+="/usr/local/onelan/ntb/bin/ntb_mount_usb"
>
[..]
> But as soon as the script exits the mount.ntfs process is killed off by
> something? systemd-udevd maybe?
Long running process should not be run from udev rules. If udev is run
under systemd it will kill such processes after a timeout (I think it
was 120 secs)
> How should I be doing this?
You could use something like udevil or udisks-glue.
If you want to do it via udev/systemd, use SYSTEMD_WANTS
ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb", TAG+="systemd",
ENV{SYSTEMD_WANTS}+="foo.service"
Then write a foo.service which does the actual mount.
You can pass additional information to the service if you use a template
--
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