Use swapctl for NetBSD.
This commit is contained in:
parent
e55cb5dd5b
commit
6ca5e8e0dc
@ -10,14 +10,22 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "Activating swap"
|
ebegin "Activating swap devices"
|
||||||
swapon -a >/dev/null
|
if type swapctl >/dev/null 2>&1; then
|
||||||
|
swapctl -A -t noblk >/dev/null
|
||||||
|
else
|
||||||
|
swapon -a >/dev/null
|
||||||
|
fi
|
||||||
eend 0 # If swapon has nothing todo it errors, so always return 0
|
eend 0 # If swapon has nothing todo it errors, so always return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
ebegin "Deactivating swap"
|
ebegin "Deactivating swap devices"
|
||||||
swapoff -a >/dev/null
|
if type swapctl >/dev/null 2>&1; then
|
||||||
|
swapctl -U -t noblk >/dev/null
|
||||||
|
else
|
||||||
|
swapoff -a >/dev/null
|
||||||
|
fi
|
||||||
eend 0
|
eend 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user