[comp.unix.sysv386] autobooting with asking to save

larry@nstar.rn.com (Larry Snyder) (06/02/91)

Where is the flag that is set to automatically recheck the
file systems after a reset without the file systems being
properly closed out (with ISC 2.21)?

With 2.20 - the system would automatically come back up -
but now with 2.21 with system prompts if I want to save
the what's in the root filesystem (or something like that)..

-- 
      Larry Snyder, NSTAR Public Access Unix 219-289-0287/317-251-7391
                         HST/PEP/V.32/v.32bis/v.42bis 
                        regional UUCP mapping coordinator 
               {larry@nstar.rn.com, ..!uunet!nstar.rn.com!larry}

rwhite@jagat.uucp (Robert White) (06/04/91)

In mys system there is a file called /etc/dumpsave which is a shell
script that asks the question.  You can simply comment out the
call to that function so that the prompt neve apears and things go on
as usual.

However, I found theis homemade hack quite nice for those times
when you *DO* want to save the dump from the swap space durring
development.  It is "obvious" shell programming.

timeout () {
	sleep $1
	echo "Timeout!"
	kill $2
}

# Setup Prompt Timeout Deamon
	trap 'exit 0' 15
	timeout 30 $$ &
	ALARMPROC=$!

echo 'There may be a system dump memory image in the swap device.'
while :
do
	echo 'Do you want to save it? (y/n)> \c'
	read ans
	case $ans in
	  y )   break ;;
	  n )   kill ${ALARMPROC} ; exit 0 ;;
	esac
	echo '???'
done

# Kill Timeout Deamon If Continue
	kill ${ALARMPROC}
	trap 15

The original code only echo(ed) the questions and while(ed) the
answer loop looking for good responses.  In the sense that
AT&T might guess that some of the original bits were from the
distribution file, they may narf at me, but it is identical
to what I would have written for the same loop.  The entire
timeout process thingy and the associated killings (8-)
are mine and you may use them to your harts content.  As many
rights reserved as I can get away with, so if you use it
for yourself feel free, but if it shows up in an offical distribution
I expect cash!

Shame we don't always get what we expect.
-- 
Robert C. White Jr.          |  If you sent me mail and it bounced going
rwhite@jagat           <Home |  through nusdhub, please re-send it if it
rwhite@nusdecs         <Work |  was important.  Implementation Details!
"Like most endevors, life is seriously over-advertised and under-funded"