DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: @ F T

⟦2e3343370⟧ TextFile

    Length: 12236 (0x2fcc)
    Types: TextFile
    Notes: @(#)Form.modify 13.4 (RC International) 91/12/03
    Names: »Form.modify«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/sadm/sysadm/add-ons/sysadm/backup_service/schedule/later_time/modify/Form.modify« 

TextFile


# Ident: @(#)Form.modify	13.4 (RC International) 91/12/03
form="Modify backup in queue       "
lifetime=longterm
help=OPEN TEXT $INTFBASE/Text.itemhelp at:modify:$LININFO
`set -l cmd=""`
`set -l done_performed="no"`
`/bin/date '+%y' | set -l YY; fmlexpr $YY % 4 | set -l YY`

close=`
     if [ $done_performed = "yes" ];
     then
       /bin/rm at_job;
       echo $job > at_job ;
       /usr/bin/at $ATDATE < at_job;
       /bin/rm at_job;
     fi;
     ` 
#framemsg="Enter SAVE to insert the backup job in the queue for later performed jobs"
done=`
     message -f "working";
     set -l done_performed="yes";
     set -l MINUTE=$F5;
     set -l HOUR=$F4;
     set -l DAY=$F3;
     set -l MONTH=$F1;
     set -l YEAR=$F2;
     set -l VOLNAME=$F6;
     set -l LEVEL=$F7;
     set -l DEVNODE=$F8;
     set -l BLKSIZE=$F13;
     set -l DEN=$F14;
     set -l LEN=$F15;
     regex -v "$F11" yes u '.*' '' | set -l UPDATE;
     regex -v "$F9" yes n '.*' '' | set -l NOTIFY;
     regex -v "$F10" yes r '.*' '' | set -l REWIND;
     regex -v "$F12" yes v '.*' '' | set -l VERIFY;
     regex -v "$F16" yes l '.*' '' | set -l AUTOLOAD;
     set -l ATDATE="$HOUR:$MINUTE $MONTH $DAY ,$YEAR";
     set -l job="/etc/dump";
     set -l job="$job ${LEVEL}${UPDATE}${NOTIFY}${REWIND}${VERIFY}${AUTOLOAD}";
     if [ "$TYPE" = "reel" ];
     then
       set -l job="${job}sbdf $LEN $BLKSIZE $DEN $DEVNODE $VOLNAME";
     else
       set -l job="${job}cbdf $MGB $BLKSIZE $DEN $DEVNODE $VOLNAME";
     fi;
      /usr/bin/at -r "$file_name";
      `close

begrow=any
begcol=any
`set -l cmd=""`
 `echo "$ARG1" | /usr/bin/nawk '{print $1}' - | set -l file_name`
 `echo "$ARG1" | /usr/bin/nawk '{print $2}' - | set -l WEEKDAYS`
 `echo "$ARG1" | /usr/bin/nawk '{print $3}' - | set -l MONTH`
 `echo "$ARG1" | /usr/bin/nawk '{print $4}' - | set -l DAY`
 `echo "$ARG1" | /usr/bin/nawk '{print substr($5,1,2)}' - | set -l HOUR`
 `echo "$ARG1" | /usr/bin/nawk '{print substr($5,4,2)}' - | set -l MINUTE`
 `echo "$ARG1" | /usr/bin/nawk '{print $6}' - | set -l YEAR`
 `echo "$ARG1" | /usr/bin/nawk '{print substr($8,1,1)}' - | set -l LEVEL`
 `echo "$ARG1" | /usr/bin/nawk '{print $13}' - | set -l VOLNAME`
 `echo "$ARG1" | /usr/bin/nawk '{print substr($12,1,32)}' - | set -l DEVNODE`
 `echo "$ARG1" | /usr/bin/nawk '{print substr($8,2,6)}' - | set -l p`
 `regex -v "$p" u yes '.*' no | set -l UPDATE`
 `regex -v "$p" n yes '.*' no | set -l NOTIFY`
 `regex -v "$p" r yes '.*' no | set -l REWIND`
 `regex -v "$p" v yes '.*' no | set -l VERIFY`
 `regex -v "$p" l yes '.*' no | set -l AUTOLOAD`
 `regex -v "$p" s reel c cartrigde | set -l TYPE`
 `echo "$ARG1" | /usr/bin/nawk '{print $9}' - | set -l MGB`
 `echo "$ARG1" | /usr/bin/nawk '{print $9}' - | set -l LEN`
 `echo "$ARG1" | /usr/bin/nawk '{print $10}' - | set -l BLKSIZE`
 `echo "$ARG1" | /usr/bin/nawk '{print $11}' - | set -l DEN`

# Table field - F1
name=Month:
lininfo=F1
nrow=1
ncol=2

frow=1
fcol=28
rows=1
columns=3

value="$MONTH"
rmenu={ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec }
menuonly
fieldmsg="Enter the month for the backup time"
choicemsg="Enter the month among Jan .. Dec"
invalidmsg="$F1 is not valid"

# Table field - F2
name=Year:
lininfo=F1
nrow=2
ncol=2

frow=2
fcol=28
rows=1
columns=4

`/bin/date '+%y' | set -l This_year`

value="$YEAR"
fieldmsg="Enter the Year for the backup time"
choicemsg="Enter the Year for the backup time"
valid=`fmlexpr $F2 % 4 | set -l YY; [ "$F2" -ge "$This_year" ] `
invalidmsg="Year must be greater than or equal to $This_year"

# Table field - F3
name=Date:
lininfo=F1
nrow=3
ncol=2

frow=3
fcol=28
rows=1
columns=2

value="$DAY"
rmenu= { 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 }
menuonly
fieldmsg="Enter the date for the backup time"
valid=`
if [ $F3 -ge 0 -a $F3 -le 31 ];
then
  set -l imsg="The date and the month and the year do not match: $F1 $F3 $F2";
else
  set -l imsg="$F3 is not valid as a date";
fi;
[ $F3 -le 28 -o $F1 = "Jan" -o $F1 = "Mar" -o $F1 = "May" -o $F1 = "Jul" -o $F1 = "Aug" -o $F1 = "Oct" -o $F1 = "Dec" -o
 $F3 -le 30 -a \( $F1 = "Apr" -o $F1 = "Jun" -o $F1 = "Sep" -o $F1 = "Nov" \) -o
 $F3 -le 29 -a $YY = 0 ]`
choicemsg="Enter the date for the backup time from the menu"
invalidmsg=$imsg

# Table field - F4
name=Hour:
lininfo=F1
nrow=4
ncol=2

frow=4
fcol=28
rows=1
columns=2

value="$HOUR"
fieldmsg="Enter the hour for the backup time from (0,..23)"
choicemsg="Enter an integer from (0,..23)"
valid=` [ "$F4" -ge 0 -o "F4" -le 23 ]`
invalidmsg="Hours must belong to (0..23)" 

# Table field - F5
name=Minute:
lininfo=F1
nrow=5
ncol=2

frow=5
fcol=28
rows=1
columns=2

value="$MINUTE"
fieldmsg="Enter the minute for the backup time from (0,..59)"
choicemsg="Enter an integer from (0,..59)"
valid=` [ "$F5" -ge 0 -o "$F5" -le 59 ] `
invalidmsg="Minutes must belong to (0..59)" 

# Table field - F6
name=Volume:
lininfo=F1
nrow=6
ncol=2

frow=6
fcol=28
rows=1
columns=39

value=$VOLNAME
rmenu= { ` message -p "working on validation of the volume name"; $DUMP_DIR/dump/get_logical_volumes; message -p "" ` }

scroll=TRUE
menuonly

fieldmsg="Enter the name of the volume you want to backup"
valid=`echo "$F6" | /usr/bin/nawk '{ if ( substr($0,1,7) == "/dev/lv" ) print substr($0,8,32); else { if ( substr($0,1,2) == "lv" ) print substr($0,3,32); else { if ( substr($0,1,1) == "/" ) print substr($0,2,32); else print $0 } } }' - | set -l volume ; 
rm dumpfs.wrk ; /etc/dumpfs /dev/lv"$volume" > dumpfs.wrk ; [ -s dumpfs.wrk  ] `

choicemsg="Enter the volume you want to backup"
invalidmsg="the volume must exist an be online"

# Table field - F7
name=Level:
lininfo=F1
nrow=7
ncol=2

frow=7
fcol=28
rows=1
columns=1

value=$LEVEL
rmenu=OPEN MENU $DUMP_DIR/dump/Menu.level $F6
fieldmsg="Select the level in (0..9), level 0 is the entire file system"
choicemsg="Enter an integer from (0,..9)"
invalidmsg="Use the choice key to enter a legal level"
valid=` [ $F7 -ge 0 -o $F7 -le 9 ] `

# Table field - F8
name=Tape device node:
lininfo=F1
nrow=8
ncol=2

frow=8
fcol=28
rows=1
columns=32

value=$DEVNODE
rmenu=OPEN MENU $DUMP_DIR/dump/Menu.mt
fieldmsg="Select the device node for the wanted tape"
choicemsg="Select the device node for the wanted tape"
valid=`/usr/bin/file "$F8"  | regex tape TRUE '.*' FALSE`
invalidmsg="$F8 is not valid, use the choice key to enter a legal value"

# Table field - F9
name=Operator notify:

lininfo=F1
nrow=9
ncol=2

frow=9
fcol=28
rows=1
columns=3

value="$NOTIFY"
rmenu= { yes no }
menuonly
choicemsg="yes: Operator notify on, no: Operator notify off" 
`if [ "$NOTIFY" = "yes" ] ;
 then
   set -l fms9="Enter 'no' for no operator notify.";
 else
   set -l fms9="Enter 'yes' for operator notify.";
 fi`
fieldmsg=$fms9 
valid=`
       if [ $F9 = "yes" ] ;
       then
         set -l fms9="Enter 'no' for no operator notify.";
         echo true;
       elif [ $F9 = "no" ];
       then
         set -l fms9="Enter 'yes' for operator notify.";
         echo true;
       else
         echo false;
       fi;
     `
invalidmsg"$F9 is not valid"

# Table field - F10
name=Rewind tape:

lininfo=F1
nrow=10
ncol=2

frow=10
fcol=28
rows=1
columns=3

value="$REWIND"
rmenu= { yes no }
menuonly
choicemsg="yes: Rewind when backup is complete, no: no rewind" 
`if [ "$REWIND" = "yes" ] ;
 then
   set -l fms10="Enter 'no' for no rewind when the backup is complete.";
 else
   set -l fms10="Enter 'yes' to rewind the tape when the backup is complete.";
 fi`
fieldmsg=$fms10 
valid=`
       if [ $F10 = "yes" ] ;
       then
         set -l fms10="Enter 'no' for no rewind when the backup is complete.";
         echo true;
       elif [ $F10 = "no" ];
       then
         set -l fms10="Enter 'yes' to rewind the tape when the backup is complete.";
         echo true;
       else
         echo false;
       fi;
     `
invalidmsg"$F10 is not valid"

# Table field - F11
name=Save date and level:

lininfo=F1
nrow=11
ncol=2

frow=11
fcol=28
rows=1
columns=3

value="$UPDATE"
rmenu= { yes no }
menuonly
choicemsg="yes: Level and date for this backup are saved, no: No save of level and date" 
`if [ "$UPDATE" = "yes" ] ;
 then
   set -l fms11="Enter 'no' for no save of the Level and the Date.";
 else
   set -l fms11="Enter 'yes' to save the Level and the Date.";
 fi`
fieldmsg=$fms11 
valid=`
       if [ $F11 = "yes" ] ;
       then
         set -l fms11="Enter 'no' for no save of the Level and the Date.";
         echo true;
       elif [ $F11 = "no" ];
       then
         set -l fms11="Enter 'yes' to save the Level and the Date.";
         echo true;
       else
         echo false;
       fi;
     `
invalidmsg"$F11 is not valid"

# Table field - F12
name=Verify tape after backup:

lininfo=F1
nrow=12
ncol=2

frow=12
fcol=28
rows=1
columns=3

value="$VERIFY"
rmenu= { yes no }
menuonly
choicemsg="yes: Tape is verified, no: No verify" 
`if [ "$VERIFY" = "yes" ] ;
 then
   set -l fms12="Enter 'no' for no verify when the backup is complete.";
 else
   set -l fms12="Enter 'yes' to verify the tape when the backup is complete.";
 fi`
fieldmsg=$fms12 
valid=`
       if [ $F12 = "yes" ] ;
       then
         set -l fms12="Enter 'no' for no verify when the backup is complete.";
         echo true;
       elif [ $F12 = "no" ];
       then
         set -l fms12="Enter 'yes' to verify the tape when the backup is complete.";
         echo true;
       else
         echo false;
       fi;
     `
invalidmsg"$F12 is not valid"

# Table field - F13
name=Tape block size:
lininfo=F1
nrow=13
ncol=2

frow=13
fcol=28
rows=1
columns=4

value="$BLKSIZE"
rmenu= {}
fieldmsg="Enter the tape block size as an integer in the range 1 to 64 kb"
choicemsg="Enter an integer in the range 1 to 64 kb"
invalidmsg="$F13 is not valid, it must belong to (1..64)"
valid=`[ "$F13" -le 64 -a "$F13" -ge 1 ]`

# Table field - F14
name=Tape density:

lininfo=F1
nrow=14
ncol=2

frow=14
fcol=28
rows=1
columns=4

value="$DEN"
rmenu= { 1600 6250 }
menuonly
fieldmsg="Enter the tape density as 1600 BPI or 6250 BPI"
choicemsg="The tape density must be 1600 BPI or 6250 BPI"
invalidmsg="The tape density must be 1600 BPI or 6250 BPI"

# Table field - F15
name=`regex -v "$TYPE" reel "Tape length:" cartrigde "Number of megabytes:" '.*' "?"`

lininfo=F1
nrow=15
ncol=2

frow=15
fcol=28
rows=1
columns=4

value=`regex -v "$TYPE" reel "$LEN" cartrigde "$MGB" '.*' "?"`
rmenu= {}
fieldmsg=`regex -v "$TYPE" reel "Enter the tape length length in feet" cartrigde "Enter the number of megabytes as an positiv integer" '.*' "?"`
choicemsg=`regex -v "$TYPE" reel "Enter the tape length length in feet" cartrigde "Enter the number of megabytes as an positiv integer" '.*' "?"`
valid=`[ "$F15" -gt 0 ]`
invalidmsg="$F15 is not valid"

name=`regex -v "$AUTOLOAD" yes "Autoload:"  '.*' ""`
lininfo=F1
nrow=15
ncol=35

frow=15
fcol=48
rows=1
columns=`regex -v "$AUTOLOAD" yes 3 '.*' 0`

value="$AUTOLOAD"
rmenu=`regex -v "$AUTOLOAD" yes "{ yes no }" '.*' ""`
menuonly
choicemsg="yes: Automatically load of next tape, no: Wait for operator ntervention." 
`set -l fms16="Enter 'yes' if you want automatical load of next tape."`
`if [ "$AUTOLOAD" = "yes" ] ;
 then
   set -l fms16="Enter 'no' if you want to wait for operator intervention to load the next tape.";
   echo true;
 else
   set -l fms16="Enter 'yes' if you want automatical load of next tape.";
 fi`
fieldmsg=$fms16 
valid=`
       if [ $F16 = "yes" ] ;
       then
         set -l fms16="Enter 'no' if you want to wait for operator intervention to load the next tape.";
         echo true;
       elif [ $F16 = "no" ];
       then
         set -l fms16="Enter 'yes' if you want automatical load of next tape.";
         echo true;
       else
         echo false;
       fi;
     `
invalidmsg"$F16 is not valid"

name=| Move the cursor to the field you
inactive=true
nrow=0
ncol=38
frow=0
fcol=38
rows=1
columns=0
name=| want to change, and change it, or
nrow=1
ncol=38
frow=1
fcol=38
rows=1
columns=0
name=| enter SAVE to insert the backup job
nrow=2
ncol=38
frow=2
fcol=38
rows=1
columns=0
name=| in the queue for later executed
nrow=3
ncol=38
frow=3
fcol=38
columns=0
name=| jobs.
nrow=4
ncol=38
frow=4
fcol=38
columns=0
name=\`------------------------------------
nrow=5
ncol=38
frow=5
fcol=38
rows=1
columns=0