diff options
Diffstat (limited to 'shutdown.d/80-filesystems.sh')
-rw-r--r-- | shutdown.d/80-filesystems.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shutdown.d/80-filesystems.sh b/shutdown.d/80-filesystems.sh new file mode 100644 index 0000000..95dcce4 --- /dev/null +++ b/shutdown.d/80-filesystems.sh @@ -0,0 +1,14 @@ +if [ -z "$VIRTUALIZATION" ]; then + msg "Unmounting filesystems, disabling swap..." + swapoff -a + umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs + msg "Remounting rootfs read-only..." + mount -o remount,ro / +fi + +sync + +if [ -z "$VIRTUALIZATION" ]; then + deactivate_vgs + deactivate_crypt +fi |