On Sat, May 10, 2014 at 06:56:22AM +0200, Michael Biebl wrote:
> 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.
>From a systemd novice (average administrator's) perspective I like the
idea very much.
I suggest 2 more improvements (could be handled separately if otherwise
complicates fixing the original issue):
#1 Manuals
Make the escaping topic a section of its own in systemd.unit manual
page, refer from other pages not only for options but for escaping as
well - I were unable to learn about escaping from the manual because it
is not visible via titles and headlines.
#2 Command invocation
Having the "-" case fixed, what next if an instance name contains "."?
What about delivering unit names via stdin, or sh-like delimiting with
"{ }" (not a complete solution for desktop naming with all possible
characters, but for system configuration/startup).
> Lennart, what do you think? Would you merge such a patch upstream?
> If so, I'm willing to work on it.
Would be worth the effort IMO.
Regards,
Gero
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]