]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/install: nicer error message is symlinking chokes on an existing file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Apr 2016 04:57:50 +0000 (00:57 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Apr 2016 17:41:59 +0000 (13:41 -0400)
commit7d782f265dda805f9e6a533410e17a94b79012e0
tree630d3bf0cc2f2fb48aceae48012d530c0981dbdc
parent964b26fe2127d28713bccf03603900a7691216ba
shared/install: nicer error message is symlinking chokes on an existing file

Fixes #1892.

Previously:
Failed to enable unit: Invalid argument

Now:
Failed to enable unit, file /etc/systemd/system/ssh.service already exists.

It would be nice to include the unit name in the message too. I looked into
this, but it would require major surgery on the whole installation logic,
because we first create a list of things to change, and then try to apply them
in a loop. To transfer the knowledge which unit was the source of each change,
the data structures would have to be extended to carry the unit name over into
the second loop. So I'm skipping this for now.
src/shared/install.c