aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/zram-swap/files/zram.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/zram-swap/files/zram.init')
-rwxr-xr-xpackage/system/zram-swap/files/zram.init5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init
index 685648aae5..d97e85efa5 100755
--- a/package/system/zram-swap/files/zram.init
+++ b/package/system/zram-swap/files/zram.init
@@ -150,6 +150,11 @@ zram_compact()
start()
{
+ [ -e /proc/swaps ] || {
+ logger -s -t zram_start -p daemon.crit "kernel doesn't support swap"
+ return 1
+ }
+
if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then
logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted"
return 1