summaryrefslogtreecommitdiffstats
path: root/hosts/alsvid200
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/alsvid200')
-rw-r--r--hosts/alsvid20013
1 files changed, 10 insertions, 3 deletions
diff --git a/hosts/alsvid200 b/hosts/alsvid200
index 077e5c0..964e897 100644
--- a/hosts/alsvid200
+++ b/hosts/alsvid200
@@ -5,10 +5,10 @@ part_script='
,+,83,*
'
-# fs mp type options dump pass
+# fs mp type options dump pass
fstab='
- @DEV1@ / ext4 errors=remount-ro 0 1
- /var/swap swap swap defaults 0 0
+ @DEV1@ / ext4 errors=remount-ro 0 1
+ /var/swap0 swap swap defaults,pri=100 0 0
'
mirror='http://httpredir.debian.org/debian'
@@ -91,6 +91,13 @@ postinst_pkgs='
do_postinst()
{
+ # Make swap file and set vm.swappiness.
+ in_target fallocate -l 4GiB /var/swap0
+ in_target chmod 0600 /var/swap0
+ in_target mkswap /var/swap0
+ printf 'vm.swappiness = 10\n' \
+ >"${target}/etc/sysctl.d/vm-swappiness.conf"
+
# Add "deb-src" line and backports.
cat >"${target}/etc/apt/sources.list" <<-EOF
deb http://httpredir.debian.org/debian jessie main