From abe2045babc93a670261b245fcea239d5f2df40d Mon Sep 17 00:00:00 2001 From: Peter Collinson Date: Mon, 29 Apr 1985 20:45:38 -0800 Subject: [PATCH] Give better control in selecting which dump is to be done. SCCS-vsn: local/ukc/dump/dumpall/dumpall.sh 1.5 --- usr/src/local/ukc/dump/dumpall/dumpall.sh | 37 ++++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/usr/src/local/ukc/dump/dumpall/dumpall.sh b/usr/src/local/ukc/dump/dumpall/dumpall.sh index a48251d0a5..b8c2d316bc 100644 --- a/usr/src/local/ukc/dump/dumpall/dumpall.sh +++ b/usr/src/local/ukc/dump/dumpall/dumpall.sh @@ -1,21 +1,36 @@ #!/bin/sh -# dumpall.sh 1.4 %G% +# dumpall.sh 1.5 %G% # shell script to do all pending dumps # Asks for confirmation before proceeding PATH=:/etc:/bin:/usr/bin: list=`dump w|sed -e '/^ /!d /^ /s/^ // s/ .*$//'` +echo 'File systems which require dumping are:-' +echo $list for fi in $list do - echo "File system to dump is $fi" - echo -n "Do you wish to continue? " - read ans - if [ "$ans" = "yes" -o "$ans" = "y" -o "$ans" = "Y" ] - then - doadump $fi - /etc/dumplogclean - else - exit 1 - fi + askagain=yes + while [ $askagain = yes ] + do + echo -n "Dump file system $fi [yne]? " + read ans + case $ans in + yes|y|Y) + doadump $fi + /etc/dumplogclean + askagain=no + ;; + exit|e|E) + exit 1 + ;; + no|n|N) + echo "Abandoned dump of $fi" + askagain=no + ;; + *) + echo 'Answer "y" to do a dump, "n" to skip this filesystem, "e" to exit from dumpall' + ;; + esac + done done -- 2.20.1