diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-06-29 14:05:56 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-06-29 14:05:56 +0200 |
commit | 9ef83cebf3c9709fa0f0f5a57f03c2ae1931e87a (patch) | |
tree | 8d4f275ff2951b428f998a7544761c845d292061 | |
parent | 0f291d422d6bc8a9f4a1e1da6271808a77871c96 (diff) | |
download | i486tcc-linux-9ef83cebf3c9709fa0f0f5a57f03c2ae1931e87a.tar.gz i486tcc-linux-9ef83cebf3c9709fa0f0f5a57f03c2ae1931e87a.tar.bz2 |
testing shutdown, we will require some shutdown tmpfs for nbd-mounted root
-rwxr-xr-x | local/etc/rc.shutdown | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/local/etc/rc.shutdown b/local/etc/rc.shutdown index 4d0c164..edd0e0a 100755 --- a/local/etc/rc.shutdown +++ b/local/etc/rc.shutdown @@ -1,11 +1,20 @@ #!/bin/oksh echo "Shutting down all processes.." -killall5 -s KILL +PID_NBD_CLIENT=`pidof nbd-client` +PID_SDHCP=`pidof sdhcp` +killall5 -o $PID_NBD_CLIENT,$PID_SDHCP -s TERM -echo "Synching and unmounting filesystems.." +sleep 5 + +echo "Synching filesystems.." sync -umount -a + +echo "Mounting root file system read-only.." +mount -o remount,ro / + +echo "Killing all processes.." +killall5 -o $PID_NBD_CLIENT,$PID_SDHCP -s KILL case "$1" in reboot) |