services: file-system: Change directory to root before unmounting.

* gnu/services/base.scm (file-system-service)[stop]: Add 'chdir' call.
This commit is contained in:
Ludovic Courtès 2014-09-17 09:20:38 +02:00
parent d656c14ec9
commit 6a3f4c74fd
1 changed files with 4 additions and 0 deletions

View File

@ -137,6 +137,10 @@ names such as device-mapping services."
(stop #~(lambda args (stop #~(lambda args
;; Normally there are no processes left at this point, so ;; Normally there are no processes left at this point, so
;; TARGET can be safely unmounted. ;; TARGET can be safely unmounted.
;; Make sure PID 1 doesn't keep TARGET busy.
(chdir "/")
(umount #$target) (umount #$target)
#f)))))) #f))))))