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

⟦aaa048548⟧ TextFile

    Length: 13124 (0x3344)
    Types: TextFile
    Notes: @(#)Form.modify 13.3 (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/periodic_time/modify/Form.modify« 

TextFile


# Ident: @(#)Form.modify	13.3 (RC International) 91/12/03
form="Modify Periodic Backup(s)       "
lifetime=permanent
`set -l done_performed="no"`
close=`
      if [ $done_performed = "yes" ] ;
      then
        message -f "working on modifying the dump job";
        echo "$ARG1" | fmlcut -d: -f2- | set -l A1;
        /bin/rm cron_job;
        /usr/bin/crontab -l | /usr/bin/fgrep -v "$A1" > cron_jobs;
        echo "$job" >> cron_jobs;
        /usr/bin/crontab cron_jobs;
        /bin/rm cron_job;
      fi;
    `

help=OPEN TEXT $INTFBASE/Text.itemhelp per:modify:$LININFO
`set -l cmd=""`
done=`
     message -f "working on set up the new parameters";
     set -l MINUTE=$F1;
     set -l HOUR=$F2;
     set -l MONTH=$F3;
     set -l DAY=$F4;
     set -l WEEKDAYS=$F5;
     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 job="$MINUTE $HOUR $DAY $MONTH $WEEKDAYS";
     set -l job="$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;
     set -l done_performed="yes";
      `close

begrow=any
begcol=any
`set -l cmd=""`
 `echo "$ARG1" | awk '{print $1}' - | awk -F: '{print $2}' - | set -l MINUTE`
 `echo "$ARG1" | awk '{print $2}' - | set -l HOUR`
 `echo "$ARG1" | awk '{print $3}' - | set -l DAY`
 `echo "$ARG1" | awk '{print $4}' - | set -l MONTH`
 `echo "$ARG1" | awk '{print $5}' - | set -l WEEKDAYS`
 `echo "$ARG1" | awk '{print substr($7,1,1)}' - | set -l LEVEL`
 `echo "$ARG1" | awk '{print $12}' - | set -l VOLNAME`
 `echo "$ARG1" | awk '{print substr($11,1,32)}' - | set -l DEVNODE`
 `echo "$ARG1" | awk '{print substr($7,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" | awk '{print $8}' - | set -l MGB`
 `echo "$ARG1" | awk '{print $8}' - | set -l LEN`
 `echo "$ARG1" | awk '{print $9}' - | set -l BLKSIZE`
 `echo "$ARG1" | awk '{print $10}' - | set -l DEN`

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

frow=0
fcol=28
rows=1
columns=40

value="$MINUTE"
fieldmsg="Enter the minute(s) for the backup time"
choicemsg="Enter one or more integers from (0,..59) as the minute(s) for the backup time"
valid=`message -t "Working on validation of the minute";
echo $F1 | awk '{ if ( NF > 1 || ( $1 < 0 || $1 > 59 ) ) { print "false" } else { print "true" } } ';
message -t "";`
invalidmsg="$F1 is not in (0..59)" 

# Table field - F2
name=Hour(s):
lininfo=F1
nrow=1
ncol=2

frow=1
fcol=28
rows=1
columns=40

value="$HOUR"
rmenu=OPEN FORM $DUMP_DIR/schedule/periodic_time/add/Form.read_list hour 0 23
fieldmsg="Enter the hour(s) for the backup time"
choicemsg="Enter the hour(s) as a single integer or as an interval"
invalidmsg="$F2 is not valid"
valid=`message -t "Working on validation of the hour(s)";
echo $F2 | awk '{ if ( NF == 1 ) { print $0 } else { print 300 } } ' |
awk -F, '{ for (i=1;i<=NF;i++) printf"%s\n",$i}' | 
awk -F- 'BEGIN {res="true"} { for (i=1;i<=NF;i++) if ( ( $i <0 || $i>23 ) && $i != "*" ) res="false"} ; END { print res }' - ;
message -t ""`

# Table field - F3
name=Month(s):
lininfo=F1
nrow=2
ncol=2

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

value="$MONTH"
rmenu=OPEN FORM $DUMP_DIR/schedule/periodic_time/add/Form.read_list month 1 12
fieldmsg="Enter the month(s) for the backup time"
choicemsg="Enter the month(s) as a single integer or as an interval"
valid=`message -t "Working on validation of the month(s)";
echo $F3 | awk '{ if ( NF == 1 ) { print $0 } else { print 300 } } ' |
awk -F, '{ for (i=1;i<=NF;i++) printf"%s\n",$i}' | 
awk -F- 'BEGIN {res="true"} { for (i=1;i<=NF;i++) if ( ( $i <1 || $i>12 ) && $i != "*" )  res="false"} ; END { print res }' -;
message -t ""`
invalidmsg="3: $F3 is not valid"

# Table field - F4
name=Date(s):
lininfo=F1
nrow=3
ncol=2

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

value="$DAY"
rmenu=OPEN FORM $DUMP_DIR/schedule/periodic_time/add/Form.read_list date 1 31
fieldmsg="Enter the date(s) for the backup time"
choicemsg="Enter the date(s) as a single integer or as an interval"
valid=`message -t "Working on validation of the date(s)";
echo $F4 | awk '{ if ( NF == 1 ) { print $0 } else { print 300 } } ' |
awk -F, '{ for (i=1;i<=NF;i++) printf"%s\n",$i}' | 
awk -F- 'BEGIN {res="true"} { for (i=1;i<=NF;i++) if ( ( $i <1 || $i>31)  && $i != "*" ) res="false"} ; END { print res }' -;
message -t""`
invalidmsg="4: $F4 is not valid"

# Table field - F5
name=Day(s) of the week:
lininfo=F1
nrow=4
ncol=2

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

value="$WEEKDAYS"
rmenu=OPEN FORM $DUMP_DIR/schedule/periodic_time/add/Form.read_list weekday 0 6
fieldmsg="Enter the weekday(s) for the backup time"
choicemsg="Enter the weekday(s) for backup time from (0,1,2,3,4,5,6) where 0=sunday"
valid=`message -t "Working on validation of the weekday(s)";
echo $F5 | awk '{ if ( NF == 1 ) { print $0 } else { print 300 } } ' |
awk -F, '{ for (i=1;i<=NF;i++) printf"%s\n",$i}' | 
awk -F- 'BEGIN {res="true"} { for (i=1;i<=NF;i++) if ( ( $i <0 || $i>6) && $i != "*" ) res="false"} ; END { print res }' -;
message -t ""`
invalidmsg="5: $F5 is not valid"

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

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

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

scroll=TRUE
menuonly
fieldmsg="Enter the name of the volume you want to backup"
valid=`
       message -t "Working on validation of the volume name";
       echo "$F6" | awk '{ 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 ;
       message -t "";
       [ -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=6
ncol=2

frow=6
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=7
ncol=2

frow=7
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=8
ncol=2

frow=8
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=9
ncol=2

frow=9
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=10
ncol=2

frow=10
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=11
ncol=2

frow=11
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=12
ncol=2

frow=12
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=13
ncol=2

frow=13
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=14
ncol=2

frow=14
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:"  '.*' ""`
inactive=`regex -v "$AUTOLOAD" no true  '.*' false`
lininfo=F1
nrow=14
ncol=35

frow=14
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." 
`if [ "$AUTOLOAD" = "yes" ] ;
 then
   set -l fms16="Enter 'no' if you want to wait for operator intervention to load the next tape.";
 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=--------------------------------------------------------------------
inactive=true
nrow=15
ncol=1
frow=15
fcol=1
rows=1
columns=0
value=false
name=Move the cursor to the field you want to change, and change it, or
nrow=16
ncol=1
frow=16
fcol=1
rows=1
columns=0
name=enter SAVE to insert the backup job as a periodically executed jobs.
nrow=17
ncol=1
frow=17
fcol=1
columns=0