summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 00:56:27 +0000
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 00:56:27 +0000
commita08025b5ff69959c0b684c6a1d37c10a2a0bcdd4 (patch)
tree26b032c19fab161b3144a60fd5c7610f5bf3c055
parent6739b95463268ae68b90fabefbc00a9752001f30 (diff)
fix config-mgmt-swap
-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.