summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorIan Eure <ian@retrospec.tv>2026-04-15 15:06:05 -0700
committerIan Eure <ian@retrospec.tv>2026-04-15 15:06:05 -0700
commitc26c3d0f53885210968cd90ac5992bf83b679f97 (patch)
treef5dd04b6bbc76b5a548c6d75139bcfab5faad355 /gnu/services
parent0d11c221b8063d8db85a0353f702fc19f9a9efeb (diff)
gnu: autofs-service: Fix computing Shepherd requirements.
Handling of non-NFS/SMB mounts was buggy and did not work at all. * gnu/services/nfs.scm (autofs-configuration->requirements): Add an `else' to prevent losing the accumulator in the fold. (autofs-configuration->requirements): Call `delete-duplicates' on the input, not the output. Fixes #7927. Change-Id: I0cccde431d0bd19dc63be8754fb6dfa35a6f8a49
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/nfs.scm22
1 files changed, 12 insertions, 10 deletions
diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
index 03ef4e6f9a6..01856bacf22 100644
--- a/gnu/services/nfs.scm
+++ b/gnu/services/nfs.scm
@@ -895,16 +895,18 @@ requirements.
895If @var{config} contains SMB mounts, adds samba-nmbd and samba-winbindd to the 895If @var{config} contains SMB mounts, adds samba-nmbd and samba-winbindd to the
896service requirements. 896service requirements.
897" 897"
898 (delete-duplicates 898 (fold
899 (fold 899 (lambda (fs-type acc)
900 (lambda (fs-type acc) 900 (cond
901 (cond 901 ((string= "nfs" fs-type)
902 ((string= "nfs" fs-type) 902 (append acc '(rpc.statd)))
903 (append acc '(rpc.statd))) 903 ((string= "smb" fs-type)
904 ((string= "smb" fs-type) 904 (append acc '(samba-nmbd samba-winbindd)))
905 (append acc '(samba-nmbd samba-winbindd))))) 905 (else acc)))
906 '() 906 '()
907 (map autofs-map-entry-type (autofs-configuration->raw-entries config))))) 907 (delete-duplicates
908 (map autofs-map-entry-type
909 (autofs-configuration->raw-entries config)))))
908 910
909(define (autofs-shepherd-service config) 911(define (autofs-shepherd-service config)
910 (match-record config <autofs-configuration> (autofs timeout) 912 (match-record config <autofs-configuration> (autofs timeout)