|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ F T
Length: 3938 (0xf62)
Types: TextFile
Notes: @(#)Form.restore 13.4 (RC International) 91/11/29
Names: »Form.restore«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/sadm/sysadm/add-ons/sysadm/restores/Form.restore«
# Ident: @(#)Form.restore 13.4 (RC International) 91/11/29
lifetime=longterm
`set -l RESTORE_DIR="$OAMBASE/add-ons/sysadm/restores"`
form="Restore "
help=OPEN TEXT $INTFBASE/Text.itemhelp $LININFO
`set -l verbose= ""`
`pwd | set -l curr`
`set -l cmd=""`
close=`cd $curr`
done=`
set -l fms1="";
set -l fms2="";
set -l fms3="";
set -l fms4="";
set -l fms5="";
set -l fms6="";
regex -v "$F3" yes v '.*' '' | set -l verbose;
if [ $F5 = "all files on tape" ];
then
if [ $F4 = "yes" ];
then
run sh -c "cd $F1; /etc/restore -tfs $F2 $F6 ";
else
run sh -c "cd $F1; /etc/restore -r${verbose}fs $F2 $F6 ";
fi;
set -l cmd="goto getfrm";
elif [ $F5 = "interactive mode" ];
then
if [ $F4 = "yes" ];
then
message -t "Path name survey without load is not possible in interactive mode";
else
run sh -c "cd $F1; /etc/restore -i${verbose}fs $F2 $F6 ";
fi;
set -l cmd="goto getfrm";
elif [ $F5 = "one or more files" ];
then
set -l restore_dir_no=$F1;
set -l dev_node=$F2;
set -l display_files=$F4;
set -l tape_file_no=$F6;
set -l cmd="OPEN FORM $RESTORE_DIR/sgl_files/Form.sgl_files";
fi;
`$cmd
begrow=any
begcol=any
# Table field - F1
name=Top path name:
lininfo=F1
nrow=1
ncol=2
frow=1
fcol=17
scroll=true
rows=1
columns=58
`set -l fms1="Enter the full pathname of the directory where to place the loaded files."`
value=/
rmenu= { "/" ▶a0◀`/etc/mount | awk '{if ( substr($2,1,1) == "/" ) print $2}' - ` }
fieldmsg=$fms1
valid=`echo $F1 | awk '{print substr($1,1,1)}' - | set -l pr;
[ ( -d $F1 ) -a ( "$pr" = "/" ) ]`
invalidmsg="$F1 is not a valid directory for restore"
# Table field - F2
name=Tape device node:
lininfo=F2
nrow=2
ncol=2
frow=2
fcol=20
rows=1
columns=55
value=$TAPE
rmenu=OPEN MENU $OAMBASE/add-ons/sysadm/backup_service/dump/Menu.mt
`set -l fms2="Enter the device node from where you want to load."`
fieldmsg=$fms2
# Table field - F3
name=Display the path name of the loaded files:
lininfo=F3
nrow=3
ncol=2
frow=3
fcol=46
rows=1
columns=3
value=yes
rmenu={ yes no }
`set -l fms3="Enter 'no' if you don't want get a list of the loaded files."`
fieldmsg=$fms3
valid=`
if [ $F3 = "yes" ];
then
set -l fms3="Enter 'no' if you don't want get a list of the loaded files.";
echo true;
elif [ $F3 = "no" ];
then
set -l fms3="Enter 'yes' if you want get a list of the loaded files.";
echo true;
else
echo false;
fi;`
invalidmsg="$F3 is not valid"
# Table field - F4
name=Path name survey without load:
lininfo=F4
nrow=4
ncol=2
frow=4
fcol=34
rows=1
columns=3
value=no
rmenu={ yes no }
`set -l fms4="Enter 'yes' if you only want get a list of the specified files."`
fieldmsg=$fms4
valid=`
if [ $F4 = "yes" ];
then
set -l fms4="Enter 'no' if you want to load the specified files.";
echo true;
elif [ $F4 = "no" ];
then
set -l fms4="Enter 'yes' if you only want get a list of the specified files.";
echo true;
else
echo false;
fi;`
invalidmsg="$F4 is not valid"
# Table field - F5
name=Restore Method:
lininfo=F5
nrow=5
ncol=2
frow=5
fcol=21
rows=1
columns=17
`set -l fms5="Use the choice key to enter the restore method."`
value="all files on tape"
rmenu= { "all files on tape" "interactive mode" "one or more files" }
menuonly
fieldmsg=$fms5
invalidmsg="$F5 is not a valid method"
# Table field - F6
name=Tape file number:
lininfo=F6
nrow=5
ncol=46
frow=5
fcol=64
rows=1
columns=2
`set -l fms6="Select the tape file number as an integer greater than zero"`
value=1
valid= [ $F6 -ge 1 ]
fieldmsg="Select the tape file number as an integer greater than zero"
fieldmsg=$fms6
invalidmsg="$F6 is not valid as tape file number"