swap revision 126744
178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $NetBSD: swap1,v 1.8 2002/03/24 15:52:41 lukem Exp $ 478344Sobrien# $FreeBSD: head/etc/rc.d/swap1 126744 2004-03-08 12:25:05Z pjd $ 578344Sobrien# 678344Sobrien 778344Sobrien# PROVIDE: localswap 8136224Smtm# REQUIRE: disks 978344Sobrien# KEYWORD: FreeBSD nojail shutdown 1078344Sobrien 1178344Sobrien. /etc/rc.subr 1278344Sobrien 13179966Smtmname="swap1" 14189694Sguidostart_cmd='swapon -a' 1578344Sobrienstop_cmd=':' 1678344Sobrien 1778344Sobrien# Add all block-type swap devices; these might be necessary 18# during disk checks. 19# 20swap1_start() 21{ 22 if ! checkyesno no_swap; then 23 swapctl -A -t blk 24 fi 25} 26 27# Remove all block-type swap devices 28# 29swap1_stop() 30{ 31 if checkyesno swapoff || [ -n "$rc_force" ]; then 32 echo "Removing block-type swap devices" 33 swapctl -U -t blk 34 fi 35} 36 37load_rc_config swap 38run_rc_command "$1" 39