diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-16 18:50:39 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-16 18:50:39 -0300 |
commit | c1a056abb797d7dc5c2c133842cf206ccfde026f (patch) | |
tree | 3efb5940f50ca562b5cfa8d7268c084e527691aa | |
parent | 0fe8186c72afde4a54ac3e215e6462b4df653b12 (diff) | |
download | kvmx-c1a056abb797d7dc5c2c133842cf206ccfde026f.tar.gz kvmx-c1a056abb797d7dc5c2c133842cf206ccfde026f.tar.bz2 |
Provision: hibernation support at development script
-rwxr-xr-x | share/provision/development | 15 |
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 |