summaryrefslogtreecommitdiffstats
path: root/draklive-install-lock-storage
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-04-08 08:53:39 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-04-08 08:53:39 +0100
commitff0b0ade51bcc90326ec7c3446a11a78cf0b663e (patch)
tree8292b6b1959b41657e815b8d12ba5e45b3d062a2 /draklive-install-lock-storage
parent5f82a8534769a5c5a226c190c4e68a53780c4f10 (diff)
downloaddraklive-install-ff0b0ade51bcc90326ec7c3446a11a78cf0b663e.tar
draklive-install-ff0b0ade51bcc90326ec7c3446a11a78cf0b663e.tar.gz
draklive-install-ff0b0ade51bcc90326ec7c3446a11a78cf0b663e.tar.bz2
draklive-install-ff0b0ade51bcc90326ec7c3446a11a78cf0b663e.tar.xz
draklive-install-ff0b0ade51bcc90326ec7c3446a11a78cf0b663e.zip
Avoid out-of-memory error at end of install.
draklive-install mounts the swap partitions of the installed system. On machines with low memory, these will get used during installation. If we unmount the swap partitions before draklive-install exits, there may not be enough free memory to copy back the swapped out data, leading to a kernel out-of-memory error. So let draklive-install-lock-storage unmount them instead, after draklive-install has exited and freed up some memory. When the installer is run from the boot menu, draklive-install-lock-storage is not used, but the swap partitions will be automatically unmounted on reboot.
Diffstat (limited to 'draklive-install-lock-storage')
-rwxr-xr-xdraklive-install-lock-storage3
1 files changed, 3 insertions, 0 deletions
diff --git a/draklive-install-lock-storage b/draklive-install-lock-storage
index 8d42a5b..a580705 100755
--- a/draklive-install-lock-storage
+++ b/draklive-install-lock-storage
@@ -10,3 +10,6 @@ else
fi
# run without udisks lock if it fails
[ "$?" != 0 ] && $CMD
+
+# draklive-install will leave swap partitions mounted. Unmount them now.
+swapoff -a