ZRAM Enhancements - decouple swap config from tmp
Documenting enhancement by Uglymotha
Added 2 configuration parameters to armbian-zram-config.
First paramter (SWAP=) can explicitely disable zram swap (while leaving log and tmp untouched).
Second parameter (TMP_SIZE) can be used to explicitely set tmp ramdisk size.
The behaviour of existing configurations is not changed.
New function activate_zram() to initialize zram devices and parameters outside of swap functionality.
Changed script to use zramctl to more flexibly establish zram devices to use for log and tmp.
This also fixes issues which result from both armbian-zram-config and armbian-ramlog being hardcoded to use zram0
Permission on /tmp also set correctly to 1777 instead of 777.
The combination of ramlog and zram swap now functions as expected:
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo-rle 500M 432K 6.6K 96K 4 /tmp
/dev/zram1 zstd 100M 8.4M 2.2M 2.6M 4 /var/log
/dev/zram0 lzo-rle 375.3M 4K 73B 12K 4 [SWAP]