48 lines · 864 B · Text
RawDownload
#!/bin/rc# DANGER! This script obliterates fossils and resets them to a different score# fosreset rootscore [fossil] [venti] rfork escore=$1if(! ~ $score ???????????????????????????*){	echo $1 is not a fossil root score	exit no.rootscore}fossil=$2if(~ $fossil '')	fossil=/dev/sdC0/fossilif(! ~ $3 '')	venti=$3if(~ $venti ''){	echo 'please set a venti target for your fossil!'	exit no.venti}if(~ $fossil tcp*){	echo not disk	exit no.disk} if(! test -e /bin/foshalt)	fshaltif not	foshaltkill fossil |rcsleep 1Kill fossil |rcsleep 2slay fossil |rcsleep 1stillhere=`{ps |grep fossil}if(! ~ $stillhere ''){	echo 'fossil processes still running! exiting'	exit fossilzombie} if(~ $score vac*)	score=`{echo $score |sed 's/vac://g'}if(test -e /bin/flfmt)	flfmt -y -v $score $fossilif not	fossil/flfmt -y -v $score $fossil exit ''