autobooting with asking to save
Robert White
rwhite at jagat.uucp
Tue Jun 4 14:05:23 AEST 1991
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 at jagat <Home | through nusdhub, please re-send it if it
rwhite at nusdecs <Work | was important. Implementation Details!
"Like most endevors, life is seriously over-advertised and under-funded"
More information about the Comp.unix.sysv386
mailing list