postmarketos-zram: explicitly set zram priority

There may be other swap on the device, e.g. swapfile. Setting an
explicit high priority value ensures zram is given first preference.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9106>
This commit is contained in:
Sicelo A. Mhlongo 2026-07-19 22:03:33 +02:00 committed by The Friendly Meow (merge) Bot
parent 7b4e2925ee
commit 161bea9d15
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=postmarketos-zram
pkgver=3
pkgver=4
pkgrel=0
pkgdesc="zram swap configuration for postmarketOS"
url="https://postmarketos.org"
@ -27,6 +27,6 @@ package() {
sha512sums="
ca91be78a47c00f40f3e645f79a72b2cd7ba3f080e2feb256998bb121f64c0394041f2ed822ad307ac36e86398b8175b3284dc5097a7017947e520a304b0a37d postmarketos-zram-swap.initd
5c1787bc2d597726113aaf3ea59229b5a56b8fc3446c78406a202e163a0b37ac564a87b2acc1c1f1a7dcdc18ff863c45e13aa687b93fa537c5ef000b9e8d6d19 postmarketos-zram-swap.service
b08a59a624e4b56f2f88987ce4e246b86effea31bb9a3f8d1581c1bf3444bc0f9ed96a17bf64b5942bd9cc1eca5ab8a295f8220d86d52ed6ac95f9362ba587ac zramstart
7dc744513e4fc619e9a612eaf1b8ca5ceee7d5555ca9ffd715cd44a0c3131dfcbf535b87e8c4fdec01699a860d1a43d9868ed2856eec900a30f9a1d445973d74 zramstart
a70d2bcb26c1af42a71811a1c1cd2984808f5ce09d7af52b26824cf5c15c8a9c819691fc6290cf3028226fca39f6e7a495546c5573c582a14d5a8c7c65dbfe3e zramstop
"

View file

@ -77,7 +77,7 @@ fi
modprobe -q zram num_devices=1
dev="$(zramctl -f -a "$algo" -s "${size}"M)"
mkswap "$dev" >/dev/null
swapon "$dev" >/dev/null
swapon "$dev" -p 300 >/dev/null
# ZRAM-optimized sysctl settings
sysctl -w \