From 6a3f4c74fd07a8c28fda3cc7389765f30da7895a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Sep 2014 09:20:38 +0200 Subject: services: file-system: Change directory to root before unmounting. * gnu/services/base.scm (file-system-service)[stop]: Add 'chdir' call. --- gnu/services/base.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 9bc78bd1ae..bfe5f52af4 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -137,6 +137,10 @@ (define* (file-system-service device target type (stop #~(lambda args ;; Normally there are no processes left at this point, so ;; TARGET can be safely unmounted. + + ;; Make sure PID 1 doesn't keep TARGET busy. + (chdir "/") + (umount #$target) #f)))))) -- cgit v1.2.3