Skip to content

Enable swap file support (#574)

Administrator requested to merge feature/574_swap_file into master

This implements swap file support (as discussed in #574 (closed)), and also removes swap partition settings from the N900.

New deviceinfo variable deviceinfo_swap_size_recommended can be used to specify a swap size for specific devices.

/etc/conf.d/swapfile contains two variables:

  • swap_size which will override deviceinfo_swap_size_recommended
  • swap_file which defaults to /swapfile

If the config file doesn't exist, then the service defaults looks to deviceinfo_swap_size_recommended for size. If that is unset, then the service will not set up any swap file.

PR configures the swapfile service to start on bootup.

If a user wants to reconfigure the swap size while pmos is booted, they just have to edit the config file and to sudo rc-service swapfile restart to have it applied.

Also, as discussed previously, "encrypted swap" comes for "free" since this file exists on the rootfs, which would presumably be encrypted (assuming no --no-fde at install time)

Please test!

Fixes #574 (closed)

Merge request reports

Loading