Home | History | Annotate | Line # | Download | only in rc.d
swap1 revision 1.4.4.2
      1      1.1    lukem #!/bin/sh
      2      1.1    lukem #
      3  1.4.4.2       he # $NetBSD: swap1,v 1.4.4.2 2001/09/30 15:50:15 he Exp $
      4      1.1    lukem #
      5      1.1    lukem 
      6      1.1    lukem # PROVIDE: localswap
      7      1.3  thorpej # REQUIRE: disks
      8      1.1    lukem 
      9      1.1    lukem . /etc/rc.subr
     10      1.1    lukem 
     11      1.1    lukem name="swap1"
     12  1.4.4.2       he start_cmd="swap1_start"
     13      1.1    lukem 
     14      1.1    lukem #		Add all block-type swap devices; these might be necessary
     15      1.1    lukem #		during disk checks.
     16      1.1    lukem #
     17  1.4.4.2       he swap1_start()
     18  1.4.4.2       he {
     19  1.4.4.2       he 	if ! checkyesno no_swap; then
     20  1.4.4.2       he 		swapctl -A -t blk
     21  1.4.4.2       he 	fi
     22  1.4.4.2       he }
     23      1.1    lukem 
     24      1.1    lukem #		Remove all block-type swap devices
     25      1.1    lukem #
     26      1.1    lukem stop_cmd="swapctl -U -t blk"
     27      1.1    lukem 
     28  1.4.4.1    lukem load_rc_config swap
     29      1.1    lukem run_rc_command "$1"
     30