[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/16: guix-install.sh: Remove any old systemd units first.
From: |
guix-commits |
Subject: |
03/16: guix-install.sh: Remove any old systemd units first. |
Date: |
Sat, 15 Jul 2023 18:15:06 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 93243a6ca4e6b8f6b6c1aa9ee097bca8432a2b35
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 9 02:00:01 2023 +0200
guix-install.sh: Remove any old systemd units first.
Don't clobber /dev/null permissions if units are masked.
* etc/guix-install.sh (sys_enable_guix_daemon): Factor out unit
installation. Unconditionally remove any old units. Install and enable
gnu-store.mount after guix-daemon.service.
---
etc/guix-install.sh | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 74f7688cab..fc14471f1a 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -434,24 +434,27 @@ sys_enable_guix_daemon()
_msg "${PAS}enabled Guix daemon via upstart"
;;
systemd)
- { # systemd .mount units must be named after the target directory.
- # Here we assume a hard-coded name of /gnu/store.
- # XXX Work around <https://issues.guix.gnu.org/41356> until next
release.
- cp ~root/.config/guix/current/lib/systemd/system/gnu-store.mount
\
- /etc/systemd/system/;
- chmod 664 /etc/systemd/system/gnu-store.mount;
- systemctl daemon-reload &&
- systemctl enable gnu-store.mount;
-
- cp
~root/.config/guix/current/lib/systemd/system/guix-daemon.service \
- /etc/systemd/system/;
- chmod 664 /etc/systemd/system/guix-daemon.service;
+ { install_unit()
+ {
+ local dest="/etc/systemd/system/$1"
+ rm -f "$dest"
+ cp ~root/.config/guix/current/lib/systemd/system/"$1" "$dest"
+ chmod 664 "$dest"
+ systemctl daemon-reload
+ systemctl enable "$1"
+ }
+
+ install_unit guix-daemon.service
configure_substitute_discovery \
/etc/systemd/system/guix-daemon.service
+ # Install after guix-daemon.service to avoid a harmless warning.
+ # systemd .mount units must be named after the target directory.
+ # Here we assume a hard-coded name of /gnu/store.
+ install_unit gnu-store.mount
+
systemctl daemon-reload &&
- systemctl enable guix-daemon &&
systemctl start guix-daemon; } &&
_msg "${PAS}enabled Guix daemon via systemd"
;;
- branch master updated (49f74b67a4 -> d08bd19de0), guix-commits, 2023/07/15
- 01/16: guix-install.sh: Unconditionally install gnu-store.mount., guix-commits, 2023/07/15
- 03/16: guix-install.sh: Remove any old systemd units first.,
guix-commits <=
- 06/16: gnu: libxcrypt: Update to 4.4.36., guix-commits, 2023/07/15
- 11/16: gnu: oath-toolkit: Update to 2.6.9., guix-commits, 2023/07/15
- 13/16: gnu: snapraid: Update to 12.2., guix-commits, 2023/07/15
- 15/16: gnu: qpwgraph: Update to 0.4.5., guix-commits, 2023/07/15
- 09/16: gnu: Remove top-level (guix build utils) import., guix-commits, 2023/07/15
- 16/16: gnu: wimlib: Update to 1.14.1., guix-commits, 2023/07/15
- 02/16: guix-install.sh: Don't patch guix-daemon.service., guix-commits, 2023/07/15
- 05/16: gnu: xtl: Use G-expressions., guix-commits, 2023/07/15
- 12/16: gnu: oath-toolkit: Mark up description., guix-commits, 2023/07/15
- 07/16: gnu: signify: Update to 31., guix-commits, 2023/07/15