zram-swap: bail out early if the kernel doesn't support swap
authorRui Salvaterra <rsalvaterra@gmail.com>
Thu, 1 Apr 2021 13:36:33 +0000 (14:36 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 18 Apr 2021 10:05:53 +0000 (12:05 +0200)
commitab610f5af30bbdd937f4e8d93bb718b25b589d00
tree6e24a1550520967ae101b197fdec6a1a99f51159
parent8bbf5bc4b0f27d6f71b5746da8579390ff9be9e4
zram-swap: bail out early if the kernel doesn't support swap

Since KERNEL_SWAP is only enabled by default for !SMALL_FLASH targets, we need
to check if the current kernel supports swap before trying to configure
zram-swap, as opkg can't check for kernel dependencies.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit 565dfeb1280343fb3f838581169e5d7a1c947862)
package/system/zram-swap/files/zram.init