Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Enable swap file support (#574) #585
This implements swap file support (as discussed in #574), and also removes swap partition settings from the N900.
New deviceinfo variable
If the config file doesn't exist, then the service defaults looks to
PR configures the
If a user wants to reconfigure the swap size while pmos is booted, they just have to edit the config file and to
Also, as discussed previously, "encrypted swap" comes for "free" since this file exists on the rootfs, which would presumably be encrypted (assuming no
I incorporated your changes and then added some logic to handle a 'bug' I identified.. So now the script will look at
The reason I did this is because it allows the value in
Wait a second, could it be that the magical overwrite comes from the
I write the value from
Turns out, OpenRC replaces the line, in case it is set to `#swap_size=1024` (which would be consistent with other conf.d files), but not if it is set to `# swap_size=1024`. See also: OpenRC/openrc#165
This adds a custom swap file service, which allows specifying a recommended swap size in the deviceinfo file via `deviceinfo_swap_size_recommended`. For the N900 this defaults to 1024 MB now. As the swap file is created in the root partition, we have encrypted swap now (unless encryption is disabled with `--no-fde`).