aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-16 18:50:39 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-16 18:50:39 -0300
commitc1a056abb797d7dc5c2c133842cf206ccfde026f (patch)
tree3efb5940f50ca562b5cfa8d7268c084e527691aa /share
parent0fe8186c72afde4a54ac3e215e6462b4df653b12 (diff)
downloadkvmx-c1a056abb797d7dc5c2c133842cf206ccfde026f.tar.gz
kvmx-c1a056abb797d7dc5c2c133842cf206ccfde026f.tar.bz2
Provision: hibernation support at development script
Diffstat (limited to 'share')
-rwxr-xr-xshare/provision/development15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/provision/development b/share/provision/development
index bca3847..011c548 100755
--- a/share/provision/development
+++ b/share/provision/development
@@ -43,3 +43,18 @@ fi
apps/inception init
apps/metadot/metadot load-bundle development
apps/metadot/metadot deps-bundle development
+
+# Hibernation support
+# https://wiki.archlinux.org/index.php/Swap#Swap_file
+# https://wiki.archlinux.org/index.php/Uswsusp
+if ! grep -q "/swapfile" /etc/fstab; then
+ echo "Configuring hibernation..."
+ sudo fallocate -l 2G /swapfile
+ sudo chmod 600 /swapfile
+ sudo mkswap /swapfile
+ sudo swapon /swapfile
+ echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab > /dev/null
+ $APT_INSTALL uswsusp
+ echo "RESUME=/swapfile" | sudo tee /etc/initramfs-tools/conf.d/resume > /dev/null
+ sudo update-initramfs -v -u
+fi