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

File: [cvs.NetBSD.org] / src / etc / rc.d / virecover (download)

Revision 1.3, Wed Jul 26 00:11:49 2000 UTC (19 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.2: +2 -2 lines

* add new dummy dependancy `NETWORK' to be REQUIREd by services which need
  networking to be operational before starting, and use as appropriate.
  NETWORK depends upon network and dhclient.
* move the guts of systemfs into mountcritlocal
* replace the dependancy on systemfs with mountcritremote, and remove the
  former.
* SERVERS now also depends upon ppp

Notes:
* dhclient (and others) needs /var to be a $critical_filesystem_beforenet
* dhclient now starts before syslogd (because the latter needs /usr, and
  /usr might need dhclient to be mounted)

Should fix PRs:
    [install/9853] [bin/10002] [misc/10349] [port-i386/10633] [misc/10641]

#!/bin/sh
#
# $NetBSD: virecover,v 1.3 2000/07/26 00:11:49 lukem Exp $
#

# PROVIDE: virecover
# REQUIRE: mountcritremote
#
# XXX: should require `mail'!

. /etc/rc.subr

name="virecover"
start_cmd="virecover_start" 
stop_cmd=":"

virecover_start()
{
	#	XXX: replace me with a script that works!
	#
	virecovery=`echo /var/tmp/vi.recover/recover.*`
	if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
		echo "Preserving editor files."
		for i in $virecovery; do
			if [ -f $i ]; then
				sendmail -t < $i
			fi
		done
	fi
}

load_rc_config $name
run_rc_command "$1"