[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40601] [PATCH 07/28] guix-install.sh: Move code in a new function.
From: |
Vincent Legoll |
Subject: |
[bug#40601] [PATCH 07/28] guix-install.sh: Move code in a new function. |
Date: |
Sun, 17 May 2020 19:17:04 +0200 |
* etc/guix-install.sh (sys_enable_guix_daemon): Move code from here...
(sys_make_guix_available): ...to this new function, fixing whitespace...
(main): ...and call it here.
---
etc/guix-install.sh | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 078aa4a781..225cf532b8 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -330,16 +330,8 @@ sys_create_build_user()
sys_enable_guix_daemon()
{ # Run the daemon, and set it to automatically start on boot.
- local info_path
- local local_bin
- local var_guix
-
_debug "--- [ $FUNCNAME ] ---"
- info_path="/usr/local/share/info"
- local_bin="/usr/local/bin"
- var_guix="/var/guix/profiles/per-user/root/current-guix"
-
case "$INIT_SYS" in
upstart)
{ initctl reload-configuration;
@@ -391,11 +383,25 @@ sys_enable_guix_daemon()
echo " ${ROOT_HOME}/.config/guix/current/bin/guix-daemon
--build-users-group=guixbuild"
;;
esac
+}
+
+sys_make_guix_available()
+{ # add guix into PATH
+
+ local info_path
+ local local_bin
+ local var_guix
+
+ _debug "--- [ $FUNCNAME ] ---"
+
+ info_path="/usr/local/share/info"
+ local_bin="/usr/local/bin"
+ var_guix="/var/guix/profiles/per-user/root/current-guix"
_msg "${INF}making the guix command available to other users"
[ -e "$local_bin" ] || mkdir -p "$local_bin"
- ln -sf "${var_guix}/bin/guix" "$local_bin"
+ ln -sf "${var_guix}/bin/guix" "$local_bin"
[ -e "$info_path" ] || mkdir -p "$info_path"
for i in ${var_guix}/share/info/*; do
@@ -505,6 +511,7 @@ main()
sys_create_store "${TARBALL}" "${tmp_path}"
sys_create_build_user
sys_enable_guix_daemon
+ sys_make_guix_available
sys_authorize_build_farms
sys_create_init_profile
--
2.26.2
- [bug#40601] [PATCH 01/28] nix/local.mk: Add missing comment to sysvinit section., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 07/28] guix-install.sh: Move code in a new function.,
Vincent Legoll <=
- [bug#40601] [PATCH 04/28] guix-install.sh: Handle local binary tarball file., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 02/28] guix-install.sh: Add xz to requirements., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 03/28] guix-install.sh: Fix systemctl not found error message at probe., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 06/28] guix-install.sh: trivial whitespace fix., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 08/28] guix-install.sh: Use getent for both user & group presence checking., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 05/28] guix-install.sh, guix-binary tarball: Handle runit-based foreign distributions., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 10/28] guix-install.sh: Replace subshell-inducing command grouping., Vincent Legoll, 2020/05/17
- [bug#40601] [PATCH 12/28] guix-install.sh: Rework user & group handling, adding busybox support., Vincent Legoll, 2020/05/17