etc: Enable mount unit only if it exists.

* etc/guix-install.sh (sys_enable_guix_daemon): Enable gnu-store.mount only
if it was actually installed.

Reported by peanutbutterandc on #guix.
This commit is contained in:
Tobias Geerinckx-Rice 2020-07-10 13:25:26 +02:00
parent c465980220
commit d6f303d4e5
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -350,6 +350,8 @@ sys_enable_guix_daemon()
cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" \ cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" \
/etc/systemd/system/; /etc/systemd/system/;
chmod 664 /etc/systemd/system/gnu-store.mount; chmod 664 /etc/systemd/system/gnu-store.mount;
systemctl daemon-reload &&
systemctl enable gnu-store.mount;
fi fi
cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \ cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \
@ -367,8 +369,8 @@ sys_enable_guix_daemon()
fi; fi;
systemctl daemon-reload && systemctl daemon-reload &&
systemctl start gnu-store.mount guix-daemon && systemctl enable guix-daemon &&
systemctl enable gnu-store.mount guix-daemon; } && systemctl start guix-daemon; } &&
_msg "${PAS}enabled Guix daemon via systemd" _msg "${PAS}enabled Guix daemon via systemd"
;; ;;
sysv-init) sysv-init)