[BACK]Return to swap2 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

Annotation of src/etc/rc.d/swap2, Revision 1.6

1.1       lukem       1: #!/bin/sh
                      2: #
1.6     ! thorpej     3: # $NetBSD: swap2,v 1.5 2000/08/21 23:35:41 lukem Exp $
1.1       lukem       4: #
                      5:
                      6: # PROVIDE: nonlocalswap
                      7: # REQUIRE: mountcritremote
1.6     ! thorpej     8: # BEFORE:  DAEMON
1.1       lukem       9:
                     10: . /etc/rc.subr
                     11:
                     12: name="swap2"
                     13: start_cmd="swap2_start"
                     14:
                     15: swap2_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: #
                     33: stop_cmd="swapctl -U -t noblk"
                     34:
1.4       lukem      35: load_rc_config swap
1.1       lukem      36: run_rc_command "$1"

CVSweb <webmaster@jp.NetBSD.org>