expand path of systemctl link argument (#6186)
authorBoucman <jeremy.rosen@enst-bretagne.fr>
Sun, 9 Jul 2017 23:52:25 +0000 (01:52 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 9 Jul 2017 23:52:25 +0000 (19:52 -0400)
commitdecd79829a02cc5b633e0e6ffcbd08f5c3492cfd
tree5b231c6738a2eabe693bfe9cbbdcaa9a231407e6
parente1bc3004ab8ef0266c71516a28e92e3ead08fe5a
expand path of systemctl link argument (#6186)

systemctl link is the only systemctl verb that takes a filename (and not
a unit name) as argument

use path_strv_make_absolute_cwd to expand the provided filename in order
to make it easier to use from the command line

keep the absolute pathname requirement when --root is used

[zj: add explicit error messages for the cases of --root and plain filename
instead of skipping normalization and just relying on systemd to refuse
to link non-absolute arguments. This allows us to make the error message
more informative.]
src/systemctl/systemctl.c