Re: [systemd-devel] systemctl escaping of unit names

2014-07-08 Thread Michael Biebl
Am 08.07.2014 14:14 schrieb "Lennart Poettering" : > > On Tue, 08.07.14 00:22, Michael Biebl (mbi...@gmail.com) wrote: > > > > > 2014-07-07 23:50 GMT+02:00 Michael Biebl : > > > 2014-07-07 22:54 GMT+02:00 Lennart Poettering : > > >> I have now committed your original patch and beefed it up > > >> c

Re: [systemd-devel] systemctl escaping of unit names

2014-07-08 Thread Lennart Poettering
On Tue, 08.07.14 00:22, Michael Biebl (mbi...@gmail.com) wrote: > > 2014-07-07 23:50 GMT+02:00 Michael Biebl : > > 2014-07-07 22:54 GMT+02:00 Lennart Poettering : > >> I have now committed your original patch and beefed it up > >> considerably. Added Zbigniew's --template= switch, and a couple of

Re: [systemd-devel] systemctl escaping of unit names

2014-07-07 Thread Michael Biebl
2014-07-07 23:50 GMT+02:00 Michael Biebl : > 2014-07-07 22:54 GMT+02:00 Lennart Poettering : >> I have now committed your original patch and beefed it up >> considerably. Added Zbigniew's --template= switch, and a couple of other >> things. Also added docs, with a few examples. >> >> http://www.fre

Re: [systemd-devel] systemctl escaping of unit names

2014-07-07 Thread Michael Biebl
2014-07-07 22:54 GMT+02:00 Lennart Poettering : > I have now committed your original patch and beefed it up > considerably. Added Zbigniew's --template= switch, and a couple of other > things. Also added docs, with a few examples. > > http://www.freedesktop.org/software/systemd/man/systemd-escape.h

Re: [systemd-devel] systemctl escaping of unit names

2014-07-07 Thread Lennart Poettering
On Mon, 07.07.14 12:50, Lennart Poettering (lenn...@poettering.net) wrote: > On Sun, 06.07.14 22:28, Michael Biebl (mbi...@gmail.com) wrote: > > > +if (argc != 2) { > > +log_error("This program requires on argument."); > > +return EXIT_FAILURE; > > +

Re: [systemd-devel] systemctl escaping of unit names

2014-07-07 Thread Lennart Poettering
On Sun, 06.07.14 22:28, Michael Biebl (mbi...@gmail.com) wrote: > +if (argc != 2) { > +log_error("This program requires on argument."); > +return EXIT_FAILURE; > +} > + > +escaped_name = unit_name_escape(argv[1]); I'd prefer if we'd do this

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Michael Biebl
2014-07-06 23:22 GMT+02:00 Zbigniew Jędrzejewski-Szmek : > On Sun, Jul 06, 2014 at 10:28:55PM +0200, Michael Biebl wrote: >> +#include >> +#include >> + >> +#include "log.h" >> +#include "unit-name.h" >> + >> +int main(int argc, char *argv[]) { >> +char *escaped_name = NULL; >> + >> +

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Jul 06, 2014 at 10:28:55PM +0200, Michael Biebl wrote: > +#include > +#include > + > +#include "log.h" > +#include "unit-name.h" > + > +int main(int argc, char *argv[]) { > +char *escaped_name = NULL; > + > +if (argc != 2) { > +log_error("This program requi

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Michael Biebl
2014-07-06 22:28 GMT+02:00 Michael Biebl : > If there is consensus, I'll just move it from > rootlibexec_PROGRAMS to rootbin_PROGRAMS And moving it to $PATH probably means adding a short man page -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Michael Biebl
2014-07-06 22:12 GMT+02:00 Lennart Poettering : > (And I think I would prefer this as seperate tool from systemctl -- and > not just as new verbs), since this appears to not be directly related to > what systemctl otherwise does which is control the system...) I ended up with something like this.

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Lennart Poettering
On Sun, 06.07.14 16:01, Gero Treuner (gt_18_lists.freedesktop@innocircle.com) wrote: > > 1. Extend systemctl unit name interpretation with a syntax to escape in >controlled manner, preferably capable of escaping only parts of a >given name to support compound names with verbatim cont

Re: [systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Jul 06, 2014 at 04:01:52PM +0200, Gero Treuner wrote: > Hello everybody, > > I join this mailing list because I want to discuss extending systemctl > with a method to escape unit names. Currently systemd and systemctl > deal with escaped unit names but there are many potential name sources

[systemd-devel] systemctl escaping of unit names

2014-07-06 Thread Gero Treuner
Hello everybody, I join this mailing list because I want to discuss extending systemctl with a method to escape unit names. Currently systemd and systemctl deal with escaped unit names but there are many potential name sources which doesn't have out-of-the-box escaping methods. The issue is a Deb