[systemd-devel] Starting systemd service in udev rule viaENV{SYSTEMD_WANTS} - help needed
Warpme
warpme at o2.pl
Tue Nov 20 13:00:03 PST 2012
On 11/20/12 3:55 PM, Lennart Poettering wrote:
>> SYSTEMD_WANTS=ext-usb-backup at .myth.backup\x20connected.service
> This looks alright, doesn't it?
>
> Are you saying that this service is not pulled in even though this field
> showed up on the device?
I found where issue is.
When developing udev rule I tested it via:
udevadm trigger --sysname-match=sdc1 --action=add
This seems to correctly launch actions within udev but NOT in systemd.
When I physically connect USB device things started to move:
-udev SYSTEMD_WANTS seems to be propagated to systemd
-systemd launches unit
-it looks like params are passed in a way I don't understand
Namely:
udev has:
SYSTEMD_WANTS=ext-usb-backup at .myth.backup\x20connected.service
So if unit has something like this:
ExecStartPre=/bin/sh -c "/usr/bin/perl /usr/local/bin/osd_notify.pl %I
connected backup"
osd_notify.pl should have parameters like: ".myth.backup connected backup"
but in reality it has:
"sys/devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb3/3-1/3-1:1.0/host12/target12:0:0/12:0:0:0/block/sdc/sdc1
connected backup"
Do I missed something here ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warpme.vcf
Type: text/x-vcard
Size: 89 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121120/b7c2af59/attachment.vcf>
More information about the systemd-devel
mailing list