install: when linking a file, create the link first or abort
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Mar 2022 13:27:46 +0000 (14:27 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Mar 2022 14:17:56 +0000 (16:17 +0200)
commit20d68b3aec62110351bdc695fd1a55adcf3a6ee5
treeb2fe2f02a82fb5fb9dca36b44b48224f120a9b6a
parent17a2679e9925c9ec3c5764d01def92c5627973e4
install: when linking a file, create the link first or abort

We'd create aliases and other symlinks first, and only then try to create
the main link. Since that can fail, let's do things in opposite order, and
abort immediately if we can't link the file itself.
src/shared/install.c
test/test-systemctl-enable.sh