pmaports/main/postmarketos-base/swapfile/swapfile.init
clayton craft 28595f72ef Close #574: swap file support/encrypted swap on rx51 (#585)
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`).
2017-09-20 18:32:19 +00:00

27 lines
265 B
Text
Executable file

#!/sbin/openrc-run
depend()
{
after localmount
}
start()
{
ebegin "Activating swap file"
/sbin/swapfile
eend $?
}
stop()
{
ebegin "Deactivating swap file"
/sbin/swapoff -a >/dev/null
eend $?
}
restart()
{
ebegin "Restarting swap file"
start
eend $?
}