SUMMARY: 5.1a Preinstall script nightmares

From: McCracken, Denise (Denise.McCracken@misyshealthcare.com)
Date: Thu Nov 21 2002 - 17:10:50 EST


        Well, this was quick. The problem is that 5.1a during the install
does not use the read stuff?"Enter some stuff" syntax properly.

        The answer was to echo the prompts and just do a read.

        Thanks to all who replied.

-----Original Message-----
From: McCracken, Denise
Sent: Thursday, November 21, 2002 2:46 PM
To: tru64-unix-managers@ornl.gov
Subject: 5.1a Preinstall script nightmares

        I'm trying to create a preinstall script for a 5.1a installation,
and I'm running into a few problems. The script is supposed to go out to a
tape drive and get the install.cdf file. It works perfectly from the 5.1a
single-user mode prompt, and doing a 4.0f install, but trying to use it for
a 5.1a install, it doesn't work.

        First of all, I've had to use /bin/ksh. If I try to use /sbin/sh,
like the install docs say, I get an error that it can't execute.

        When I run it from 5.1a install, it can't echo anything to the
screen. The example file in the install docs shows using the echo command,
so this should work. When I give it the input it is looking for anyway,
which is <ENTER>tz5<ENTER>, it goes on and creates the device files (they
are 4.0f device file types, but they work from the 5.1a command prompt), and
then the tar command comes back with "no input".

        I can then break out of the installation, run this script by hand
and do a restart to finish the install, but I need it to run without any
user effort.

        The script follows. Any ideas would be appreciated.

#!/bin/ksh
#
# This script brings in the install.cdf file for tru64 5.1a upgrade
# from a tape drive. It is appended to by the setup program.
#
# It should never be run from the command line
#
 
echo ""
read JUNK?"Insert the upgrade directory saveout tape. Press ENTER when
ready."
 
echo ""
read tapedev?"What is the name of the raw tape device? >"
 
cd /dev
./MAKEDEV $tapedev
 
cd /var/tmp
tar xvsf /dev/nrmt0h /install.cdf
mt -f /dev/nrmt0h rewind
 
if [ -f /var/tmp/install.cdf ]
then
        echo "The install configuration has been restored from tape."
else
        echo "Fatal error! Unable to restore the configuration!."
        read JUNK?"Press enter to quit."
fi

Denise McCracken
MiSys Healthcare Systems
Denise.McCracken@misyshealthcare.com
(520) 570-2521



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:00 EDT