[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.1, Fri Mar 10 11:53:24 2000 UTC (19 years, 7 months ago) by lukem
Branch: MAIN

Initial revision

#!/bin/sh
#
# $NetBSD: virecover,v 1.1 2000/03/10 11:53:24 lukem Exp $
#

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

. /etc/rc.subr
. /etc/rc.conf

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
}

run_rc_command "$1"