On 2014-03-26 14:50, Kai Hendry wrote:
Thanks Michael for answering, :)
On 26 March 2014 18:59, Michael Biebl <mbi...@gmail.com> wrote:
2014-03-26 3:56 GMT+01:00 Kai Hendry <hen...@webconverger.com>:
If your daemon is not functional if the hardware is not present, I'd
probably start it via a udev rule and SYSTEMD_WANTS.
Do you have an example for this please?
I don't quite understand why I can't I just name the device in the
service file. Why does it have to be so confusing. Still don't
understand the need for escaping... is there a need?
While Jóhann has answered the technical part of your question, I'd like
to address the quoting part: in the various configuration locations you
were talking about earlier, quoting of filenames is required as these
config directives can take a wide range of arguments that can reference
many other things beside devices. Since those units are all defined in
files, whose names are the unit name, all those names have to be valid
file names. So a unit can also "Requires=foo.service", which will be
defined in a file called foo.service.
The specifics are described in
http://www.freedesktop.org/software/systemd/man/systemd.unit.html:
Some unit names reflect paths existing in the file system namespace.
Example: a device unit
dev-sda.device refers to a device with the device node /dev/sda in
the file system namespace.
If this applies, a special way to escape the path name is used, so
that the result is usable
as part of a filename. Basically, given a path, "/" is replaced by
"-", and all unprintable
characters and the "-" are replaced by C-style "\x20" escapes. The
root directory "/" is
encoded as single dash, while otherwise the initial and ending "/" is
removed from all
paths during transformation. This escaping is reversible.
Regards, David
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel