- Shell 100%
| debian | ||
| payload | ||
| tests | ||
| .gitignore | ||
| build.sh | ||
| README.md | ||
shadaos-zram-config
Selects the zram compression algorithm on each boot from MemTotal in
/proc/meminfo: zstd through and including 8388608 KiB, and lz4 above that
threshold. If memory detection fails, the sourced defaults fall back to lz4.
The swap size remains 50% of RAM and its priority remains 100.
The package diverts the zram-tools defaults file, retains the upstream copy
as .distrib, and resets the service's EnvironmentFile= list because the
defaults file is sourced as shell code by zramswap. The policy applies in
both the live session and installed system.
The replacement files are ordinary package files rather than a second set of
dpkg conffiles, avoiding competing ownership of zram-tools' conffile. On
package removal the diversion is removed and the latest upstream defaults are
restored before the helper and service override are removed. A locally edited
ShadaOS defaults file is retained as /etc/default/zramswap.shadaos-zram-config.
Build with ./build.sh. Run tests/check-package.sh with the package and a
trusted zram-tools Debian package to test payload and dpkg lifecycle behavior.