swap2 revision 1.1
11.1Slukem#!/bin/sh 21.1Slukem# 31.1Slukem# $NetBSD: swap2,v 1.1 2000/03/10 11:53:24 lukem Exp $ 41.1Slukem# 51.1Slukem 61.1Slukem# PROVIDE: nonlocalswap 71.1Slukem# BEFORE: daemon 81.1Slukem# REQUIRE: mountcritremote 91.1Slukem 101.1Slukem. /etc/rc.subr 111.1Slukem. /etc/rc.conf 121.1Slukem 131.1Slukemname="swap2" 141.1Slukemstart_cmd="swap2_start" 151.1Slukem 161.1Slukemswap2_start() 171.1Slukem{ 181.1Slukem # "Critical" file systems are now mounted. Go ahead and swap 191.1Slukem # to files now, since they will be residing in the critical file 201.1Slukem # systems (or, at least, they should be...). 211.1Slukem # Check for no swap, and warn about it unless that is desired. 221.1Slukem # 231.1Slukem swapctl -A -t noblk; 241.1Slukem if ! checkyesno no_swap; then 251.1Slukem if swapctl -s | grep "no swap devices configured" > /dev/null; 261.1Slukem then 271.1Slukem warn "No swap space configured!" 281.1Slukem fi 291.1Slukem fi 301.1Slukem} 311.1Slukem 321.1Slukem# Remove all non-block-type swap devices 331.1Slukem# 341.1Slukemstop_cmd="swapctl -U -t noblk" 351.1Slukem 361.1Slukemrun_rc_command "$1" 37