Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!casbah.acns.nwu.edu!ucsd!nosc!crash!jagat!rwhite From: rwhite@jagat.uucp (Robert White) Newsgroups: comp.unix.sysv386 Subject: Re: autobooting with asking to save Message-ID: <1991Jun4.040523.9668@jagat.uucp> Date: 4 Jun 91 04:05:23 GMT References: <1991Jun01.175255.16245@nstar.rn.com> Organization: My House (no organization to speak of) Lines: 53 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