aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/zram-swap
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/zram-swap')
-rw-r--r--package/system/zram-swap/Makefile2
-rwxr-xr-xpackage/system/zram-swap/files/zram.init4
2 files changed, 4 insertions, 2 deletions
diff --git a/package/system/zram-swap/Makefile b/package/system/zram-swap/Makefile
index bcada98a81..ee5e85927f 100644
--- a/package/system/zram-swap/Makefile
+++ b/package/system/zram-swap/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=zram-swap
PKG_VERSION:=1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init
index ae432f3b00..49140ad406 100755
--- a/package/system/zram-swap/files/zram.init
+++ b/package/system/zram-swap/files/zram.init
@@ -172,6 +172,8 @@ start()
local zram_size="$( zram_getsize )"
local zram_dev="$( zram_getdev )"
zram_applicable "$zram_dev" || return 1
+ local zram_priority="$( uci -q get system.@system[0].zram_priority )"
+ zram_priority=${zram_priority:+-p $zram_priority}
logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MegaBytes)"
@@ -180,7 +182,7 @@ start()
zram_comp_streams "$zram_dev"
echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize"
mkswap "$zram_dev"
- swapon "$zram_dev"
+ swapon $zram_priority "$zram_dev"
}
stop()