virecover revision 78344
178344Sobrien#!/bin/sh 278344Sobrien# 378344Sobrien# $NetBSD: virecover,v 1.3 2000/07/26 00:11:49 lukem Exp $ 478344Sobrien# 578344Sobrien 678344Sobrien# PROVIDE: virecover 778344Sobrien# REQUIRE: mountcritremote 878344Sobrien# 978344Sobrien# XXX: should require `mail'! 1078344Sobrien 1178344Sobrien. /etc/rc.subr 1278344Sobrien 1378344Sobrienname="virecover" 1478344Sobrienstart_cmd="virecover_start" 1578344Sobrienstop_cmd=":" 1678344Sobrien 1778344Sobrienvirecover_start() 1878344Sobrien{ 1978344Sobrien recover=`find /var/tmp/vi.recover -name 'recover.*' -type f -print` 2078344Sobrien if [ -n "$recover" ]; then 2178344Sobrien echo "Preserving editor files." 2278344Sobrien for i in $recover; do 2378344Sobrien sendmail -t < $i 2478344Sobrien done 2578344Sobrien fi 2678344Sobrien} 2778344Sobrien 2878344Sobrienload_rc_config $name 2978344Sobrienrun_rc_command "$1" 30