28 lines
375 B
Plaintext
28 lines
375 B
Plaintext
#!/sbin/openrc-run
|
|||
|
|
|
||
|
|
depend() {
|
||
|
|
after localmount
|
||
|
|
before display-manager tinydm
|
||
|
|
}
|
||
|
|
|
||
|
|
start() {
|
||
|
|
ebegin "Activating swap file"
|
||
|
|
swapfile
|
||
|
|
eend $?
|
||
|
|
}
|
||
|
|
|
||
|
|
stop() {
|
||
|
|
if [ "$RC_RUNLEVEL" = "shutdown" ]; then
|
||
|
|
return 0
|
||
|
|
fi
|
||
|
|
ebegin "Deactivating swap file"
|
||
|
|
swapoff /swapfile >/dev/null 2>&1 || true
|
||
|
|
eend 0
|
||
|
|
}
|
||
|
|
|
||
|
|
restart() {
|
||
|
|
ebegin "Restarting swap file"
|
||
|
|
start
|
||
|
|
eend $?
|
||
|
|
}
|