[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/2] Unmount filesystems before shutdown or reboot on s390x (#605577)



Prevents unclean root filesystem on first reboot.  On all platforms but
s390x, this is handled by the unmountFilesystems() function in
loader/undomounts.c, but since init on s390x is a shell script, we need
this forced umount call.
---
 loader/linuxrc.s390 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index d8a8fda..610f3ca 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -106,6 +106,7 @@ function checkipv4()
 function doshutdown()
 {
     echo $"about to exec shutdown"
+    /sbin/umount -a -d -n >/dev/null 2>&1
     exec /sbin/shutdown
     exit 0
 }
@@ -123,6 +124,7 @@ function doreboot()
     fi
 
     echo $"about to exec shutdown -r"
+    /sbin/umount -a -d -n >/dev/null 2>&1
     exec /sbin/shutdown -r
     exit 0
 }
-- 
1.7.3.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]