[systemd-devel] Device names with dashes

Lennart Poettering lennart at poettering.net
Tue Apr 19 16:12:57 PDT 2011


On Tue, 19.04.11 17:28, 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?

Use %I instead of %i for a wildcard with all special chars escaped. This
is documented in more detail in systemd.unit(5).

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list