[systemd-devel] Starting systemd service in udev rule via ENV{SYSTEMD_WANTS} - help needed

Warpme warpme at o2.pl
Sun Nov 18 11:34:43 PST 2012


On 11/18/12 3:37 PM, Mirco Tischler wrote:
>
> I don't really have an idea, but here are some things you could check 
> additionally:
> Does systemd create a .device unit? And if yes is it active/plugged? 
> And does it have the correct "Wants=ext-usb-backup.service" attribute? 
> Does udevadm info --query=property --path=<path to sysfs device> show 
> the correct values for
> SYSTEMD_WANTS and TAGS?
>
> Mirco
Mirco,
Thx for replay.

systemctl --all reports:
dev-sdc1.device   loaded active   plugged       /dev/sdc1

dev-sdc1.device unit content is following:
Id=dev-sdc1.device
Names=dev-sdc1.device
Following=sys-devices-pci0000:00-0000:00:09.0-0000:04:00.0-usb2-2\x2d1-2\x2d1:1.0-host10-target10:0:0-10:0:0:0-block-sdc-sdc1.device
Description=/dev/sdc1
LoadState=loaded
ActiveState=active
SubState=plugged
InactiveExitTimestampMonotonic=0
ActiveEnterTimestampMonotonic=0
ActiveExitTimestampMonotonic=0
InactiveEnterTimestampMonotonic=0
CanStart=no
CanStop=no
CanReload=no
CanIsolate=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=yes
OnFailureIsolate=no
IgnoreOnIsolate=yes
IgnoreOnSnapshot=yes
NeedDaemonReload=no
JobTimeoutUSec=1min 30s
ConditionTimestampMonotonic=0
ConditionResult=no
SysFSPath=/sys/devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb2/2-1/2-1:1.0/host10/target10:0:0/10:0:0:0/block/sdc/sdc1



querying udev gives:
udevadm info --query=property --path /sys/dev/block/8\:33
DEVLINKS=/dev/disk/by-label/.myth.backup 
/dev/disk/by-uuid/fd3104ea-d5c0-4a8f-beba-8ab69115b192 /dev/usbhd-sdc1
DEVNAME=/dev/sdc1
DEVPATH=/devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb2/2-1/2-1:1.0/host10/target10:0:0/10:0:0:0/block/sdc/sdc1
DEVTYPE=partition
ID_FS_LABEL=.myth.backup
ID_FS_LABEL_ENC=.myth.backup
ID_FS_SEC_TYPE=ext2
ID_FS_TYPE=ext3
ID_FS_USAGE=filesystem
ID_FS_UUID=fd3104ea-d5c0-4a8f-beba-8ab69115b192
ID_FS_UUID_ENC=fd3104ea-d5c0-4a8f-beba-8ab69115b192
ID_FS_VERSION=1.0
ID_PART_ENTRY_DISK=8:32
ID_PART_ENTRY_NUMBER=1
ID_PART_ENTRY_OFFSET=63
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_SIZE=1953520002
ID_PART_ENTRY_TYPE=0x83
MAJOR=8
MINOR=33
MOUNT_DIR=/media/.myth.backup
SUBSYSTEM=block
SYSTEMD_WANTS=ext-usb-backup at .myth.backup\x20connected.service
TAGS=:systemd:
USEC_INITIALIZED=270713954


So it looks like dev-sdc1.device don't have "Wants=ext-usb-backup.service".
Q is then why ?



-------------- 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/20121118/f3ff77c3/attachment.vcf>


More information about the systemd-devel mailing list