3 # $NetBSD: swap2,v 1.7 2004/08/13 18:08:03 mycroft Exp $
6 # PROVIDE: nonlocalswap
7 # REQUIRE: mountcritremote
10 $_rc_subr_loaded .
/etc
/rc.subr
13 start_cmd
="swap2_start"
17 # "Critical" file systems are now mounted. Go ahead and swap
18 # to files now, since they will be residing in the critical file
19 # systems (or, at least, they should be...).
21 # Treat exit status 2 from swapctl(8) as successful; it means
22 # "no error, but no suitable swap devices were configured".
24 # Check for no swap, and warn about it unless that is desired.
30 if ! checkyesno no_swap
; then
31 if swapctl
-s |
grep "no swap devices configured" > /dev
/null
;
33 warn
"No swap space configured!"
40 # Remove all non-block-type swap devices
42 stop_cmd
="swapctl -U -t noblk || [ $? = 2 ]"