summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
authorDavid Boilleau <david_boilleau@gmx.fr>2024-11-08 15:10:22 +0100
committerLudovic Courtès <ludo@gnu.org>2024-11-14 15:41:19 +0100
commite02b3b0a666ed541b4393802129c1d1660ca0df5 (patch)
tree2cbe504d96a5ff31a7dbfd8e6bdec50d19d76c16 /etc
parent75fc77dc9981e5c3e0e676d3428d139f591f3eb8 (diff)
downloadguix-e02b3b0a666ed541b4393802129c1d1660ca0df5.tar.gz
guix-install.sh: Test if gnu-store.mount exists before removing the unit
The file /etc/systemd/system/gnu-store.mount has permissions 664, since the
`install_unit()` function installed it so. So the test prior to removing the
matching Systemd unit should not be wether this file is executable, otherwise
it will always fail. The relevant test is on the file existence.

* etc/guix-install.sh (sys_delete_guix_daemon): Test if gnu-store.mount file
exists rather than if it is executable.

Change-Id: Ic7cc186618b0b92fccf49a3b27805756a9126b89
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'etc')
-rwxr-xr-xetc/guix-install.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 9d9c294d75..e97190d964 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -576,7 +576,7 @@ sys_delete_guix_daemon()
             _msg "${INF}removing guix-daemon"
             rm -f /etc/systemd/system/guix-daemon.service
 
-            if [ -x /etc/systemd/system/gnu-store.mount ]; then
+            if [ -f /etc/systemd/system/gnu-store.mount ]; then
                 _msg "${INF}disabling gnu-store.mount"
                 systemctl disable gnu-store.mount
                 _msg "${INF}stopping gnu-store.mount"