services: file-system: Do not try to unmount /dev and /.

Previously, when being stopped, the ‘user-file-systems’ service would
attempt to unmount / and /dev, which was bound to fail.  This was
harmless, apart from a couple of lines in /var/log/messages, but it was
wrong.

* gnu/services/base.scm (file-system-shepherd-services)[user-unmount]:
Remove “/” and “/dev” from the list of file systems subject to
unmounting.

Change-Id: Ieb68fe46c114909a64d54f885c94a9d7cd61f5e0
This commit is contained in:
Ludovic Courtès 2024-09-19 16:54:06 +02:00
parent 80709f1411
commit 447bcead88
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -496,7 +496,10 @@ upon boot."
(stop #~(lambda args (stop #~(lambda args
(define (known? mount-point) (define (known? mount-point)
(member mount-point (member mount-point
(cons* "/proc" "/sys" '#$known-mount-points))) ;; Count file systems mounted by the initrd to as
;; "known" and not user-mounted file systems.
(cons* "/" "/dev" "/proc" "/sys"
'#$known-mount-points)))
;; Make sure we don't keep the user's mount points busy. ;; Make sure we don't keep the user's mount points busy.
(chdir "/") (chdir "/")