DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

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

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦73d543e04⟧ TextFile

    Length: 5647 (0x160f)
    Types: TextFile
    Notes: UNIX file
    Names: »install.module«

Derivation

└─⟦bee8f15db⟧ Bits:30004169/disk2.imd Uniplex II+ V.6 release 1.0 (dansk)
└─⟦bee8f15db⟧ UNIX Filesystem
    └─⟦this⟧ »up/new/usr/UAP/install.cmds/install.module« 

TextFile


: 'install.module - main processing for UAP/install

L..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..R

Usage:   install.module MMM 'm m m' N N N

where:   MMM   is concatenated, and sorted, list of all modules installed
               or being installed
         m m m is MMM list separated by spaces, but as one arg
         N N N are module numbers, sorted, to be installed, as separate args.

Assumes: "PWD" is UAP
         Uredirect set/exported
         UNIPLEX_NAME set/exported
         TERM_DATA set/exported
         INSLANG set/exported

Exits:   undefined
'

CONF=$1
CONFS=$2
shift
shift

case "$1" in
*[12]*)  : Phase 0 of UAP install modules script only reqd. for 1/2 options
         echo "${EN}Phase 0: Creating user group names, if required: $CEE"
         for i in informix mail
         do
            echo "${EN}${i}, $CEE"
            set.GID $i
         done
         echo
         ;;
esac


: Phase 1 of UAP install modules script

echo "Phase 1: Updating UNIPLEX private configuration area..."
case "$TERM_DATA" in
 TERMINFO) : set and export TERMINFO here. Also copy it for use later.
                            TERMINFO=$Uredirect/UAP/TERMINFO export TERMINFO
 TERMCMD='"\$TERMINFO" \&\& TERMINFO=$Uredirect/UAP/TERMINFO;export TERMINFO'
           mkdir $TERMINFO >/dev/null 2>&1
           chmod 777 $TERMINFO;;
        *) : set and export TERMCAP here. Also copy it for use later.
                            TERMCAP=$Uredirect/UAP/termcap export TERMCAP
  TERMCMD='"\$TERMCAP" \&\& TERMCAP=$Uredirect/UAP/termcap;export TERMCAP';;
esac
TERM=UiNsT
export TERM

AL=
MODULES=
for i do
   m=`map.option $i`
   AL="$AL -m $m"
   MODULES="$MODULES$m "
done

echo "Checking files and setting permissions..."

chkfile -s -c $AL list_of_files >/dev/null 2>&1
if chkfile -c $AL list_of_files; then
   :
else
   echo "ERROR: Cannot proceed due to errors listed above"
   exit 1
fi

echo "Creating pseudonyms (links), control files and folders..."
for m in $MODULES; do
.installation/$m/install 1 || exit 1
done

echo "Creating menus and softkeys for: $MODULES..."
: Make new, menu

SAVEDIR=.installation/saved.files
mkdir $SAVEDIR >/dev/null 2>&1
OLDFILE=
if test -f uniplex.menu; then
   OLDFILE=$SAVEDIR/uniplex.menu
   mv uniplex.menu $OLDFILE
   echo "In folder, \"UAP/$SAVEDIR\", saving
   existing file \"UAP/uniplex.menu\" as \"uniplex.menu\""
fi

: 'Build uniplex.menu as: ???.sysmenu
                          1.menu
                          2.menu ... etc
                          COMMON.menu
'
F=menus/$CONF.sysmenu
for i in $CONFS; do
   F="$F menus/$i.menu"
done
if (cat $F menus/COMMON.menu > uniplex.menu ) 2>/dev/null; then
   chmod 444 uniplex.menu
else
   echo "ERROR: couldn't create system menu $BELL"
   if test -z "$OLDFILE"; then
      echo "Cannot proceed $BELL"
      exit 1
   fi
   echo "WARNING: Restoring saved \"uniplex.menu\", which may not
give you full access to UNIPLEX"
   mv $OLDFILE uniplex.menu
fi

: Create common softkey include file

OLDFILE=
if test -f general/general.fn; then
   OLDFILE=$SAVEDIR/general.fn
   mv general/general.fn $OLDFILE
   echo "In folder, \"UAP/$SAVEDIR\", saving
   existing file \"UAP/general/general.fn\" as \"general.fn\""
fi

if (cd general; cat $CONF.fn COMMON.fn > general.fn ) 2>/dev/null; then
   chmod 444 general/general.fn
else
   echo "ERROR: couldn't create \"general/general.fn\"$BELL"
   if test -z "$OLDFILE"; then
      echo "Cannot proceed $BELL"
      exit 1
   fi
   echo "WARNING: Restoring saved \"general/general.fn\","\
        "which may not give you full access to UNIPLEX"
   mv $OLDFILE general/general.fn
fi
rmdir $SAVEDIR >/dev/null 2>&1

for i in */*.fn; do
   case "$i" in
      general/*) ;;
              *) skcomp $i > /dev/null 2>&1;;
   esac
done

: PHASE 2

echo "Phase 2: Final system updates..."

for m in $MODULES; do
   .installation/$m/install 2 || exit 1

   echo "Last installed on:     `udate '+%d %h 19%y %H:%M'`
In:                    $Uredirect/UAP
Installed with:        $MODULES
"  > .installation/$m/.installed
   case "$m" in
    BASE) echo "Language:              $INSLANG
Front-end:             $UNIPLEX_DIR/$UNIPLEX_NAME
INFORMIX:              $INFORMIXDIR
"         >>.installation/$m/.installed
          ;;
   esac
   sync
done
sync

: '
   At end of BASE install, create front-end script
   Note that $1 is first module option number, which will be 1 if we have
   just installed BASE
'
case "$1" in
1) echo "Installing \"$UNIPLEX_NAME\" program in \"$UNIPLEX_DIR\" folder..."
: '
   Set SED substitution strings

   NOTE the "$Uredirect" string in the TERMCMD (set above) gets inserted
        into $UNIPLEX_NAME without expansion of the dollar - allowing
        system administrator to change only the Uredirect setting therein
        when shifting UAP to a different file system
'

   : INFORMIXDIR only set if changed to non-default value

   case "$INFORMIXDIR" in
   /usr/informix) INFORMIXCMD='';;
               *) INFORMIXCMD='test -z "\$INFORMIXDIR\" \&\& INFORMIXDIR'
                  INFORMIXCMD="$INFORMIXCMD=$INFORMIXDIR;export INFORMIXDIR";;
   esac

   test -f $UNIPLEX_DIR/$UNIPLEX_NAME && save.file $UNIPLEX_DIR $UNIPLEX_NAME
   sed "
s~^: Uredirect.*~\"\$Uredirect\" \&\& Uredirect=$Uredirect~
s~^: TERMCMD.*~$TERMCMD~
s~^: INFORMIXCMD.*~$INFORMIXCMD~
"  install.cmds/uniplex.sh > $UNIPLEX_DIR/$UNIPLEX_NAME
   chmod 555 $UNIPLEX_DIR/$UNIPLEX_NAME
   sync
esac

echo "The installation of Uniplex II Plus Version Six,
modules $MODULES, is complete"

: 'NOTE calling module - "UAP/install" - follows the exit with
   "RETURN to continue"
'
exit 0