Am 07.05.2014 21:19, schrieb Gero Treuner:
> On Wed, May 07, 2014 at 02:32:40PM +0200, Michael Biebl wrote:
>> Please try the attached net.agent (copy it to /lib/udev/net.agent and
>> make it executable).
>> It escapes the interface name before starting an instance of the
>> service. If you want to run systemctl status, make sure to quote the
>> name like this:
>>
>> systemctl status "ifup@veth\x2ddevmachine.service"
>>
>> Please report if that works for you.
> 
> The patch works fine. Thanks for all.

Thanks for testing.

Thinking more about it, a nicer solution would be, if systemd would
offer another specifier [0], basically the inverse of %I.
I.e. you pass a (unescaped) string as instance name and systemd does the
escaping which then can be used in the unit file.

Let's call that specifier %Y for now.

So using something like [email protected] and [email protected] containing

[Unit]
Description=ifup for %I
BindTo=sys-subsystem-net-devices-%Y.device

results in:
BindsTo=sys-subsystem-net-devices-foo\x2bar.device


Lennart, what do you think? Would you merge such a patch upstream?
If so, I'm willing to work on it.

Michael


[0]
http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to