[systemd-devel] systemd195: issue with udev launched script

Andrey Borzenkov arvidjaar at gmail.com
Sun Nov 25 04:24:23 PST 2012


В Fri, 16 Nov 2012 17:37:27 +0100
Warpme <warpme at o2.pl> пишет:

> [Service]
> ExecStart=/usr/local/bin/run-backup.sh
> Type=forking
> GuessMainPID=false
> RemainAfterExit=no
> 
> 
> 
> Issue:
> it works with:
> ENV{ID_FS_LABEL_ENC}==".myth.backup", RUN+="/usr/bin/systemctl start 
> ext-usb-backup.service"
> 

Is your actual backup program started in background by run-backup.sh
and script itself exits? Because that is what is implied by
Type=forking. If yes, it apparently takes over 30 seconds as systemctl
is killed by udev. You probably want to use "systemctl --no-block" in
this case.

> but not works with:
> ENV{ID_FS_LABEL_ENC}==".myth.backup", TAG+="systemd", 
> ENV{SYSTEMD_WANTS}="ext-usb-backup.service"
> 

Hard to tell without systemd debug output. You can enable it online by
sending signal to systemd, see man page.


More information about the systemd-devel mailing list