diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-03-21 15:26:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-03-21 15:26:47 +0100 |
commit | 37cbc1d57992f49b3607bd66973dd30e0a8d1073 (patch) | |
tree | 495e940367f2cf5534c43b14af602c344969accf /src/basic/parse-util.c | |
parent | b85aca4f9218adf52f6c09d490f189d59b4dacd5 (diff) | |
download | systemd-37cbc1d57992f49b3607bd66973dd30e0a8d1073.tar.gz systemd-37cbc1d57992f49b3607bd66973dd30e0a8d1073.tar.bz2 systemd-37cbc1d57992f49b3607bd66973dd30e0a8d1073.zip |
When mangling names, optionally emit a warning (#8400)
The warning is not emitted for absolute paths like /dev/sda or /home, which are
converted to .device and .mount unit names without any fuss.
Most of the time it's unlikely that users use invalid unit names on purpose,
so let's warn them. Warnings are silenced when --quiet is used.
$ build/systemctl show -p Id hello@foo-bar/baz
Invalid unit name "hello@foo-bar/baz" was escaped as "hello@foo-bar-baz" (maybe you should use systemd-escape?)
Id=hello@foo-bar-baz.service
$ build/systemd-run --user --slice foo-bar/baz --unit foo-bar/foo true
Invalid unit name "foo-bar/foo" was escaped as "foo-bar-foo" (maybe you should use systemd-escape?)
Invalid unit name "foo-bar/baz" was escaped as "foo-bar-baz" (maybe you should use systemd-escape?)
Running as unit: foo-bar-foo.service
Fixes #8302.
Diffstat (limited to 'src/basic/parse-util.c')
0 files changed, 0 insertions, 0 deletions