On Tue, 13.05.14 23:01, Gero Treuner (gt_72_debian....@innocircle.com) wrote:
> > Hello Lennart! > > On Mon, May 12, 2014 at 06:52:59PM +0200, Lennart Poettering wrote: > > On Mon, 12.05.14 18:40, Michael Biebl (bi...@debian.org) wrote: > > > > 1/ I don't want to re-implement the escaping rules outside of systemd, > > > especially since I don't know the escaping rules. > > > 2/ It's hard to escape the interface name from withing a udev rule, > > > unless I call a shell script, where I do the escaping using sed dances. > > > This is ugly, to say the least. > > > 3/ systemctl status ifup@my-eth.service is much more intuitive then > > > systemctl status ifup@my\x2deth.service. > > > Auto-completing helps a bit, but it doesn't get the quoting right [0], > > > so the failure mode is very confusing. > > > Unit names must be escaped. And then %I can be used to undo that. > > > > Hence you cann include anything unescaped in the unit name, it just > > doesn't work... > > Now it is clear that it is the caller's responsibility to do encoding of > unit names. Caller can be: administrating user, software packager i. e. > distributor, software author, etc. > > As such one doesn't have knowledge about the exact details how the > encoding has to be done, and "sed dances" tend to be error prone but > nevertheless will be implemented many times in an ad-hoc manner. > ==> systemd could help with a small utility around unit_name_escape() > > So that this is possible: > > systemctl start sys-devices-virtual-net-@$(encodeunitname my-dev).device > > What about such addition resp. accepted patch? Well, we cannot extend the shell... Not entirely sure how this really could look like... but of course, if oyu make a convincing argument how this could look like, then I am all ears. Might be a good idea to bring this up on the systemd ML, maybe somebody there has a good idea, how to teach systemctl escaping in a way that feels good. Lennart -- Lennart Poettering, Red Hat -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org