summaryrefslogtreecommitdiff
path: root/config-mgmt-swap.PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'config-mgmt-swap.PKGBUILD')
-rw-r--r--config-mgmt-swap.PKGBUILD13
1 files changed, 11 insertions, 2 deletions
diff --git a/config-mgmt-swap.PKGBUILD b/config-mgmt-swap.PKGBUILD
index 6d0492b..05bf209 100644
--- a/config-mgmt-swap.PKGBUILD
+++ b/config-mgmt-swap.PKGBUILD
@@ -1,16 +1,25 @@
. ${BUILDFILE%/*}/common.sh
-pkgver=20170204
+pkgver=20170204.2
package() {
preamble
depends=(systemd-swap)
+# In addition to what's configured in fstab, we use systemd-swap to
+# manage advanced swap devices. There are 3 things we enable in
+# systemd-swap:
+#
+# - zswap: compress pages on disk
+# - zram: compress pages in ram
+# - swapfc: in emergencies, allocate space in the filesystem to swap
+# to
add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/systemd/swap.conf.holoscript <<EOF
#!/bin/sh
sed '
s/^# Zswap$/& (compress pages on disk)/
- /zswap_zspool=z3fold/ {
+ s/zswap_enabled=.*/zswap_enabled=1/
+ /zswap_zpool=z3fold/ {
a# The systemd-swap default '\''z3fold'\'' was added in Linux 4.7; because we
a# are running an -lts kernel, we'\''re still on 4.4, so we fall back to
a# zbud.