[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/13: guix-install.sh: Install SELinux policy only if tools are present
From: |
guix-commits |
Subject: |
01/13: guix-install.sh: Install SELinux policy only if tools are present. |
Date: |
Sun, 23 Jul 2023 14:40:07 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit c89e0b4d2008e930af4fe428ef4a954384e150ce
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 16 02:00:01 2023 +0200
guix-install.sh: Install SELinux policy only if tools are present.
* etc/guix-install.sh (sys_maybe_setup_selinux): Silently return if
the ‘semodule’ or ‘restorecon’ commands are missing.
---
etc/guix-install.sh | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index fc14471f1a..10645ac7ac 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -600,15 +600,26 @@ fi
sys_maybe_setup_selinux()
{
- if [ -f /sys/fs/selinux/policy ]
+ if ! [ -f /sys/fs/selinux/policy ]
then
- prompt_yes_no "Install SELinux policy required to run guix-daemon?" \
- || return
-
- local var_guix=/var/guix/profiles/per-user/root/current-guix
- semodule -i "${var_guix}/share/selinux/guix-daemon.cil"
- restorecon -R /gnu /var/guix
+ return
fi
+
+ local c
+ for c in semodule restorecon
+ do
+ if ! command -v "$c" &>/dev/null
+ then
+ return
+ fi
+ done
+
+ prompt_yes_no "Install SELinux policy that might be required to run
guix-daemon?" \
+ || return
+
+ local var_guix=/var/guix/profiles/per-user/root/current-guix
+ semodule -i "${var_guix}/share/selinux/guix-daemon.cil"
+ restorecon -R /gnu /var/guix
}
welcome()
- branch master updated (445a035908 -> 80afaaf4e3), guix-commits, 2023/07/23
- 02/13: guix-install.sh: Fix incomplete installation., guix-commits, 2023/07/23
- 03/13: gnu: python-compreffor: Update to 0.5.4., guix-commits, 2023/07/23
- 04/13: gnu: python-compreffor: Mark up description., guix-commits, 2023/07/23
- 07/13: gnu: mplayer: Use G-expressions., guix-commits, 2023/07/23
- 08/13: gnu: mplayer: Use #:configure-flags., guix-commits, 2023/07/23
- 12/13: gnu: hwinfo: Remove input labels., guix-commits, 2023/07/23
- 01/13: guix-install.sh: Install SELinux policy only if tools are present.,
guix-commits <=
- 05/13: gnu: mplayer: Update to 1.5., guix-commits, 2023/07/23
- 06/13: gnu: mplayer: Remove input labels., guix-commits, 2023/07/23
- 13/13: gnu: darktable: Update to 4.4.2., guix-commits, 2023/07/23
- 11/13: gnu: hwinfo: Update to 23.2., guix-commits, 2023/07/23
- 09/13: gnu: emacs-pos-tip: Update to 0.4.7., guix-commits, 2023/07/23
- 10/13: gnu: godot: Update to 4.1.1., guix-commits, 2023/07/23