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

⟦ade89c171⟧ TextFile

    Length: 5604 (0x15e4)
    Types: TextFile
    Notes: UNIX file
    Names: »slip«

Derivation

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

TextFile

#help#  
#help#  Selecting this menu item will configure the
#help#  Serial Line IP Driver (SLIP) into the system
#menu#  SLIP Driver (Serial Line IP)

#ident	"%W - %E"

#  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
FULLNAME="SLIP"
NAME=SL
DNAME=sl
TEMPF=/tmp/$DNAME.$$
TEMPSDEV=/tmp/sdev.$DNAME.$$
LOCNAME=`uname -n`
SLIPPATH=/usr/admin/menu/packagemgmt/tcpipmgmt/hbtcpmgmt

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

#  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; iobase=$2; endiobase=$3; shbase=$4; endshbase=$5
set `cat $SLIPPATH/_slip.dat`
line=$1; baud=$2

cat << EOF


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

EOF

cat <<EOF 
                    $FULLNAME Hardware Configuration

The $DNAME driver is currently configured to use the following TTY Line settings:


	TTY Line...................... ${line}
	Baud Rate..................... ${baud}

EOF

#
#  Offer the user a chance to change the interrupt vector line
#
echo "Do you want to use the current TTY Line [ Yes ]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	       echo "Enter the new TTY Line [ $line ]: \c"
	       read nline; line=${nline:-$line}
esac

echo "Do you want to use the current baud rate [ Yes ]? \c"
read ans
case "${ans:-Yes}" in
     [nN]*)
	       echo "Enter the new baud rate [ $baud ]: \c"
	       read nbaud; baud=${nbaud:-$baud}
esac

echo
echo "Enter the name of the target system you are connecting to ?\c"
read TARGET

echo
echo "Is this SLIP connection going to be directly connected"
echo "to another system running SLIP (without a modem) [ No ] ?\c"
read ans
case "${ans:-No}" in
     [Yy]*)
	ln /etc/init.d/slip /etc/rc3.d/S80slip 2>1$
	ln /etc/init.d/slip /etc/rc2.d/K60slip 2>1$
	ln /etc/init.d/slip /etc/rc0.d/K70slip 2>1$
esac

echo
echo "Would you like to add an account for dialup Slip access [ No ] ? \c"
read ans
case "${ans:-No}" in
     [Yy]*)
	$SLIPPATH/_slipadduser
esac

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

awk '/'llc'/ { OFS="\t"; $2="Y" ; print $0 }' ${SDEVICEDIR}/llc > ${TEMPF}
mv ${TEMPF} ${SDEVICEDIR}/llc


#  
#   Set up the real sdevice file
#
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.
	echo $NAME driver must be already installed.
else
	cat >> /etc/conf/kconfig.d/description <<!
sl      -    -     hbtcp    -             Serial Line IP Driver
llc     -    -     hbtcp    -             Link level protocol pseudo driver
!
fi



#
#  change /etc/netd.cf to use DNAME
#  set the hostname in /etc/netd.cf
#
if diff $SLIPPATH/_netd.slip /etc/netd.cf > /dev/null
then
	cp $SLIPPATH/_netd.slip /etc/netd.cf
else
	echo "You already have a network interface configured. Do you wish"
	echo "to install SLIP driver in addition to the other one?"
	echo "(Y = both interfaces installed, N = Just SLIP) [No]?\c"
	read ans
	case "${ans:-N}" in
     	[nN]*)
		cp $SLIPPATH/_netd.slip /etc/netd.cf ;;
	[yY]*)
		cat /etc/netd.cf $SLIPPATH/_netd2.slip > /tmp/netd.cf
		cp /tmp/netd.cf /etc/netd.cf
		echo ""
		echo "Since you have 2 interfaces connected, you need to"
		echo "have another name for the SLIP interface. This name"
		echo "must be in the /etc/hosts file with a different internet"
		echo "number then the one given for '$LOCNAME'."
		echo "Enter the name you wish to use for the SLIP interface ?\c"
		read LOCNAME ;;
	esac
fi

chmod  755 /etc/netd.cf
ed - /etc/netd.cf > /dev/null <<-EOF
	g/DEV/s//$DNAME/g
	g/local_site_name/s//$LOCNAME/
	g/target_site_name/s//$TARGET/
	w
	q
	EOF

echo "Do you wish to build a new kernel at this time [Y]?\c"
read ans
case "${ans:-Y}" in
     [Yy]*)
	sh runlevel
	echo ""
	echo "Building a kernel with $NAME driver configured..."
	/etc/kconfig -r /
esac
exit 0