[systemd-devel] Device names with dashes

Gustavo Sverzut Barbieri barbieri at profusion.mobi
Tue Apr 19 10:34:28 PDT 2011


On Tue, Apr 19, 2011 at 12:28 PM, Albert Strasheim <fullung at gmail.com> wrote:
>
> Hello again
>
> My previous problem with an After= referring to a device seems to have
> been caused by a device with a dash in the name.
>
> I had a service called mounter at dm-0.service with
>
> BindTo=dev-%i.device
> After=dev-%i.device
>
> which fails to find dev-dm-0.device because systemd seems to be calling it:
>
> dev-dm\x2d0.device        loaded active   plugged       /dev/dm-0
>
> Is there any way to reconcile these two?

You need to call mounter at dm\x2d0.service as systemd will escape / to -
and everything else to hexadecimal value like \x2d (ord('-') == 0x2d).

--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202


More information about the systemd-devel mailing list