services: user-unmount: Change directory to "/" before unmounting.

* gnu/services/base.scm (user-unmount-service): Add 'chdir' call.
This commit is contained in:
Ludovic Courtès 2014-11-14 00:48:43 +01:00
parent cd4a3cb359
commit 48bd76e009
1 changed files with 3 additions and 0 deletions

View File

@ -161,6 +161,9 @@ in KNOWN-MOUNT-POINTS when it is stopped."
(cons* "/proc" "/sys"
'#$known-mount-points)))
;; Make sure we don't keep the user's mount points busy.
(chdir "/")
(for-each (lambda (mount-point)
(format #t "unmounting '~a'...~%" mount-point)
(catch 'system-error