diff options
author | Marius Bakke <marius@gnu.org> | 2020-11-19 00:04:32 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-11-19 00:04:32 +0100 |
commit | 35ed83beae51c05069ed6754dd26cf0f549808ab (patch) | |
tree | fe09aa72524081aa54c74e6d5f99f1a1c006c06b /gnu/services/shepherd.scm | |
parent | 38f4c54d7e212fd26e6899fad29c2e604abb32f5 (diff) | |
parent | 0305bc91762f9d5e01abd3d55e8dd9d3d1ecbdad (diff) | |
download | guix-35ed83beae51c05069ed6754dd26cf0f549808ab.tar guix-35ed83beae51c05069ed6754dd26cf0f549808ab.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/services/shepherd.scm')
-rw-r--r-- | gnu/services/shepherd.scm | 13 |
1 files changed, 9 insertions, 4 deletions
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"))) |