3 # $NetBSD: swap1,v 1.10 2009/04/21 16:08:57 joerg Exp $
10 $_rc_subr_loaded .
/etc
/rc.subr
13 start_cmd
="swap1_start"
16 # Add all block-type swap devices; these might be necessary
21 # Treat exit status 2 from swapctl(8) as successful; it means
22 # "no error, but no suitable swap devices were configured".
24 if ! checkyesno no_swap
; then
25 swapctl
-A -t blk ||
[ $?
= 2 ]
29 # Remove all block-type swap devices
33 if checkyesno swapoff ||
[ -n "$rc_force" ]; then
34 echo "Removing block-type swap devices"
35 swapctl
-U -t blk ||
[ $?
= 2 ]