diff options
author | MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> | 2013-04-23 13:34:38 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-05-06 23:10:44 +0200 |
commit | d9abd1493d6adca4038121f2c969fdcaf89b9b7a (patch) | |
tree | 6d560c64cd673b9250449bc67aa7372e8af5a35d /units/console-getty.service.m4.in | |
parent | 19adb8a3204fefd91411b5f0f350c8bc6bcf75fe (diff) |
core: escape unit name from udev
This patch escapes a unit name which was derived from udev.
Please imagine following udev rule.
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%p.service"
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%r.service"
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%S.service"
When unit name is derived from udev via
udev_device_get_property_value(), the name may contains '/' if
ENV{SYSTEMD_WANTS} has the udev options $devpath(%p), $root(%r), or
$sys(%S). However, '/' is a invalid char for unit name so processing
of this rule fails as Invalid argument with following message.
Apr 22 13:21:37 localhost systemd[1]: Failed to load device unit: Invalid argument
Apr 22 13:21:37 localhost systemd[1]: Failed to process udev device event: Invalid argument
This patch escapes those invalid chars in a unit name.
Tested with 202, and confirmed to apply cleanly on top of commit 195f8e36.
Thanks,
Takahiro
Diffstat (limited to 'units/console-getty.service.m4.in')
0 files changed, 0 insertions, 0 deletions