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

⟦4fb94cd02⟧ TextFile

    Length: 8857 (0x2299)
    Types: TextFile
    Notes: UNIX file
    Names: »el«

Derivation

└─⟦8c4f54e61⟧ Bits:30004068/disk2.imd Interactive TCP/IP v.1.2
└─⟦8c4f54e61⟧ UNIX Filesystem
    └─⟦this⟧ »hb/new/usr/admin/menu/packagemgmt/tcpipmgmt/hbtcpmgmt/el« 

TextFile

#help#  
#help#  Selecting this menu item will configure the
#help#  3COM Etherlink II (3C503) Board into the system
#menu#  3COM Etherlink II (3C503) Board

#ident	"@(#)el	2.9	90/01/31"

#  The following is an installation script for use with System V, Release 3
#  using either linkable or installable device drivers.
#  
#  This script does the following:
#    -- Finds the current major numbers and driver configuration parameters.
#    -- Asks the user if the major numbers need changing.
#    -- If yes, it prompts for new major numbers and modifies the driver
#       config files as appropriate.
#    -- Asks the user if the driver configuration parameters needs changing.
#    -- If the system requires any driver config parameters to be changed, it
#       modifies the space.c and config file.
#    -- Checks for conflicts on the interrupt vector set in the previous
#       steps; if one is found then a bunch of instructions on how to
#       proceed are written to the screen.
#    -- Adds the driver(s) to the kernel configuration files.
#    -- If necessary, changes netd.cf for the driver.
#    -- Removes any existing special files and create the special files
#       (devices) required by HBTCP.
#    -- Calls kconfig to build a kernel if the user wants to.

changed=no
CONFDIR=/etc/conf
CNFMODS=${CONFDIR}/pack.d
SDEVICEDIR=${CONFDIR}/sdevice.d
SDEVICE=${CONFDIR}/cf.d/sdevice
MDEVICE=${CONFDIR}/cf.d/mdevice
LOCNAME=`uname -n`
NAME=3C503
DNAME=el
TEMPF=/tmp/$DNAME.$$
TEMPSDEV=/tmp/sdev.$DNAME.$$
VERSION=`uname -v`
export CONFDIR CNFMODS NAME DNAME LOCNAME SDEVICEDIR SDEVICE MDEVICE TEMPF VERSION

#   Set trap after variables defined
trap "rm -f ${T1:-/tmp/il?.*} ${TEMPF}; exit 3" 2 3 15
flags="-qq -k$$"

#	Use 1.0.6 method to get transceiver from space.c file
sed -n "/3COM internal transceiver/s/^.*EL_XCV0[^0-9]*\([0-9]\).*$/intxcvr=\1/p" \
    ${CNFMODS}/$DNAME/space.c >>${TEMPF}
chmod 755 ${TEMPF}
. ${TEMPF}

#  Stop right now if for some reason the file is not there.
if [ ! -f ${SDEVICEDIR}/$DNAME ]
then
	echo "Cannot find configuration file ${SDEVICEDIR}/$DNAME, aborting."
	exit 1
fi
cp ${SDEVICEDIR}/$DNAME ${TEMPSDEV}

#	Get configurable values
set `awk '/'$DNAME'/ { print $6, $7, $8, $9, $10 }' ${TEMPSDEV}`
irqvec=$1; stioa=$2; endioa=$3; shbase=$4; endshbase=$5

cat <<EOF


                          INTERACTIVE UNIX
                Host Based TCP/IP Software Installation
                   UNIX System V Release 3 Version



EOF

#
#  Offer the user a chance to change the interrupt vector line
#
cat <<EOF


                     $NAME Hardware Configuration

The $DNAME driver is currently configured with the following $NAME hardware
settings:

	Interrupt Request Line (IRQ)     $irqvec
	Start I/O Address                0x$stioa
	End I/O Address                  0x$endioa
	Shared Memory Start Address      0x$shbase
	Shared Memory End Address        0x$endshbase
	Use Onboard Transceiver?         $intxcvr

EOF

echo "Do you want to use the current IRQ value [ Yes ]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	  oirq=$irqvec; changed=yes; echo " "
	  while true
	       do echo "Please enter the IRQ value for the board [ $oirq ]: \c"
	       read irqvecx; irqvec=${irqvecx:-$oirq}
	       case "$irqvec" in
		    [3-7]) break ;;
		    *)
			 echo "\nOnly 3 through 7 are valid \c"
			 echo "interrupt levels for the $NAME board." ;;
	       esac
	  done
	  awk '/'$DNAME'/ { OFS="\t"; $6="'$irqvec'" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
	  irqlev=$irqvec 
	  mv ${TEMPF} ${TEMPSDEV}
	  echo " "

	  ;;
esac

echo "Do you want to use the current I/O Port address range [ Yes ]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	  oio=$stioa; changed=yes; echo " "
	  while true
	       do echo "Please enter the Start I/O Port address for the board [ $oio ]: \c"
	       read stioax; stioa=${stioax:-$oio}
	       case "$stioa" in
		    [0-9a-fA-F]*) break ;;
		    *) echo The I/O Port address must be specified in hexadecimal ;;
	       esac
	  done
	  awk '/'$DNAME'/ { OFS="\t"; $7="'$stioa'" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
	  mv ${TEMPF} ${TEMPSDEV}

	  oendioa=$endioa; changed=yes;
	  while true
	       do echo "Please enter the End I/O address for the board in hex [ $oendioa ]: \c"
	       read newendioa; endioa=${newendioa:-$oendioa}
	       case "$endioa" in
		    [0-9a-fA-F]*) break ;;
		    *) echo The End I/O address must be specified in hexadecimal ;;
	       esac
	  done
	  awk '/'$DNAME'/ { OFS="\t"; $8="'$endioa'" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
	  mv ${TEMPF} ${TEMPSDEV}
	  echo " "
esac

echo "Do you want to use the current Controller Shared Memory address range [Yes]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	  oio=$shbase; changed=yes;
	  while true
	       do echo "Please enter the Shared Memory Start address for the board [ $oio ]: \c"
	       read shbasex; shbase=${shbasex:-$oio}
	       case "$shbase" in
		    [0-9a-fA-F]*) break ;;
		    *) echo The Shared Memory addresses must be specified in hexadecimal ;;
	       esac
	  done
	  awk '/'$DNAME'/ { OFS="\t"; $9="'$shbase'" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
	  mv ${TEMPF} ${TEMPSDEV}
	  oio=$endshbase; changed=yes;
	  while true
	       do echo "Please enter the Shared Memory End address for the board [ $oio ]: \c"
	       read shbasex; endshbase=${shbasex:-$oio}
	       case "$endshbase" in
		    [0-9a-fA-F]*) break ;;
		    *) echo The Shared Memory addresses must be specified in hexadecimal ;;
	       esac
	  done
	  awk '/'$DNAME'/ { OFS="\t"; $10="'$endshbase'" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
	  mv ${TEMPF} ${TEMPSDEV}
	  echo " "
	  ;;
esac

echo "Do you want to keep the current setting for the onboard transceiver [ Yes ]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	  oio=$intxcvr; changed=yes; echo " "
	  while true
	       do echo "Do you want to use the onboard transceiver [ $oio ]: \c"
	       read ans;
	       case "$ans" in
		    [nN]*)
			intxcvr=0
			break ;;
		    *) intxcvr=1 
			break;;
	       esac
	  done
	  ed - $CNFMODS/$DNAME/space.c > /dev/null <<-EOF
		/3COM internal transceiver /s/\([ 	]\)[0-9]\([ 	]\)/\1$intxcvr\2/
		w
		q
		EOF

	  ;;
esac

# 	Set the driver to be configured
awk '/'$DNAME'/ { OFS="\t"; $2="Y" ; print $0 }' ${TEMPSDEV} > ${TEMPF}
mv ${TEMPF} ${TEMPSDEV}

#
# check for conflicts in the interrupt vector
#
echo
echo "Checking for interrupt vector conflicts - Please wait..."
match=No
> ${TEMPF}

cat ${SDEVICEDIR}/* | awk '{  if ( $1 != "'$DNAME'" && $2 != "N" && $6 == "'$irqvec'" ) {
		printf "matchdev=%s\n",$1
		print "match=y"
	}
} ' >> ${TEMPF}

chmod +x ${TEMPF}
. ${TEMPF}
rm -f ${TEMPF}

    case "${match:-No}" in
	[yY]*)
		cat <<EOF

There is a conflict with the device "$matchdev" on interrupt level
$irqvec.  Please resolve this conflict by changing the Interrupt
Request line of either the conflicting device or the $NAME board.

Change the IRQ value of "$DNAME" in ${SDEVICEDIR}/$DNAME file or make
modifications to the configuration file of each conflicting device
resident in ${SDEVICEDIR} directory named after the corresponding
device.  If you are changing the interrupt vector and request
line of the $NAME board then you will need to do the following:

     1    Abort this installation.
     2    Change the IRQ jumper on the $NAME board to the desired IRQ
	  level to reflect the desired IRQ level.
     3    Restart this installation script by executing sysadm, giving
	  the correct value for the interrupt level when asked by the
	  script.

This conflict must be resolved before the new kernel can be linked.
Please refer to the INTERACTIVE UNIX TCP/IP software and $NAME hardware
installation manual for more detailed instructions on changing the
interrupt vector, I/O address and etc..

Now interrupt this script (usually the DEL key) to abort the
installation...
EOF
	read junk ;;
    esac


#  Set up real sdevice file
mv ${TEMPSDEV} ${SDEVICEDIR}/$DNAME 
echo "\nNew ${SDEVICEDIR}/$DNAME file is:"
cat ${SDEVICEDIR}/$DNAME
echo ""

#
#  Add driver to kernel description file and kernel configuration file
#
if fgrep "$NAME Ethernet Driver" /etc/conf/kconfig.d/description >/dev/null 2>&1
then :
	echo $NAME Ethernet Driver already in description file.
else
	cat >> /etc/conf/kconfig.d/description <<!
el      -    -     hbtcp    -             3COM 3C503 Ethernet Driver
llc     -    -     hbtcp    -             Link level protocol pseudo driver
!
fi

#
#  change /etc/netd.cf to use DNAME
#  set the hostname in /etc/netd.cf
#
cp /usr/admin/menu/packagemgmt/tcpipmgmt/hbtcpmgmt/_netd.cf /etc/netd.cf
chmod  755 /etc/netd.cf
ed - /etc/netd.cf > /dev/null <<-EOF
	g/DEV/s//$DNAME/g
	g/local_site_name/s//$LOCNAME/
	w
	q
	EOF

if checkyn ${flags} -f "Do you wish to build a new kernel at this time?"
then
	sh runlevel
	/etc/kconfig  -r /
fi
/bin/rm -f ${TEMPF} ${TEMPSDEV} $T1
exit 0