1#!/bin/sh 2# 3# $NetBSD: swap2,v 1.6 2002/03/22 04:34:00 thorpej Exp $ 4# 5 6# PROVIDE: nonlocalswap 7# REQUIRE: mountcritremote 8# BEFORE: DAEMON 9 10. /etc/rc.subr 11 12name="swap2" 13start_cmd="swap2_start" 14 15swap2_start() 16{ 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...). 20 # Check for no swap, and warn about it unless that is desired. 21 # 22 swapctl -A -t noblk; 23 if ! checkyesno no_swap; then 24 if swapctl -s | grep "no swap devices configured" > /dev/null; 25 then 26 warn "No swap space configured!" 27 fi 28 fi 29} 30 31# Remove all non-block-type swap devices 32# 33stop_cmd="swapctl -U -t noblk" 34 35load_rc_config swap 36run_rc_command "$1" 37