aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-12-21 13:30:24 +0000
committerArun Isaac2022-12-22 10:27:22 +0000
commitdc20709ace1f15c3bf5e6cfda07f4d86ac0d97a9 (patch)
treefda0580b2861e38c7679db53a603cb10c9ac9722
parent630ecc936f8758afde291aa1a937f21cfaa193ce (diff)
downloadgn-machines-dc20709ace1f15c3bf5e6cfda07f4d86ac0d97a9.tar.gz
Separate out sudo into a variable.
* genenetwork-development.scm (genenetwork-projects): Separate out "/run/setuid-programs/sudo" into ... (sudo): ... new variable.
-rw-r--r--genenetwork-development.scm17
1 files changed, 7 insertions, 10 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm
index 2e7c728..8176d0d 100644
--- a/genenetwork-development.scm
+++ b/genenetwork-development.scm
@@ -71,6 +71,11 @@
(define %guix-daemon-uri
"/var/host-guix/daemon-socket/socket")
+;; We cannot refer to sudo in the store since that sudo does not have
+;; the setuid bit set. See "(guix) Setuid Programs".
+(define sudo
+ "/run/setuid-programs/sudo")
+
(define (manifest-cons package onto-manifest)
"Return a manifest with PACKAGE and all packages in ONTO-MANIFEST."
(manifest (cons (package->manifest-entry package)
@@ -222,11 +227,7 @@ command to be executed."
#~(begin
(use-modules (guix build utils))
(when (string=? (getenv "RESULT") "success")
- ;; We cannot refer to sudo in the
- ;; store since that sudo does not have
- ;; the setuid bit set. See "(guix)
- ;; Setuid Programs".
- (invoke "/run/setuid-programs/sudo"
+ (invoke #$sudo
#$(file-append shepherd "/bin/herd")
"restart" "genenetwork2")
(invoke #$(file-append laminar "/bin/laminarc")
@@ -256,11 +257,7 @@ command to be executed."
#~(begin
(use-modules (guix build utils))
(when (string=? (getenv "RESULT") "success")
- ;; We cannot refer to sudo in the
- ;; store since that sudo does not have
- ;; the setuid bit set. See "(guix)
- ;; Setuid Programs".
- (invoke "/run/setuid-programs/sudo"
+ (invoke #$sudo
#$(file-append shepherd "/bin/herd")
"restart" "genenetwork3")
(invoke #$(file-append laminar "/bin/laminarc")