summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/package-management.scm2
-rw-r--r--gnu/services/base.scm15
-rw-r--r--gnu/services/shepherd.scm13
3 files changed, 12 insertions, 18 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 6075df6afa..84864ded5c 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -338,7 +338,7 @@ $(prefix)/etc/init.d\n")))
(("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
#t)))
- ;; The 'guix' executable has 'OUT/libexec/guix/guile' has
+ ;; The 'guix' executable has 'OUT/libexec/guix/guile' as
;; its shebang; that should remain unchanged, thus remove
;; the 'patch-shebangs' phase, which would otherwise
;; change it to 'GUILE/bin/guile'.
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e6341e3cd9..065e89d312 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -291,19 +291,8 @@ This service must be the root of the service dependency graph so that its
(define (file-system->shepherd-service-name file-system)
"Return the symbol that denotes the service mounting and unmounting
FILE-SYSTEM."
- (define valid-characters
- ;; Valid store characters; see 'checkStoreName' in the daemon.
- (string->char-set
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-._?="))
-
- (define mount-point
- (string-map (lambda (chr)
- (if (char-set-contains? valid-characters chr)
- chr
- #\-))
- (file-system-mount-point file-system)))
-
- (symbol-append 'file-system- (string->symbol mount-point)))
+ (symbol-append 'file-system-
+ (string->symbol (file-system-mount-point file-system))))
(define (mapped-device->shepherd-service-name md)
"Return the symbol that denotes the shepherd service of MD, a <mapped-device>."
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index e14ceca231..1faeb350df 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -224,16 +224,21 @@ which is not provided by any service")
(for-each assert-satisfied-requirements services))
+(define %store-characters
+ ;; Valid store characters; see 'checkStoreName' in the daemon.
+ (string->char-set
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-._?="))
+
(define (shepherd-service-file-name service)
"Return the file name where the initialization code for SERVICE is to be
stored."
(let ((provisions (string-join (map symbol->string
(shepherd-service-provision service)))))
(string-append "shepherd-"
- (string-map (match-lambda
- (#\/ #\-)
- (#\ #\-)
- (chr chr))
+ (string-map (lambda (chr)
+ (if (char-set-contains? %store-characters chr)
+ chr
+ #\-))
provisions)
".scm")))