[OT] Old Timers Please? Vintage 1989 problem

Declan Moriarty declan.moriartyt at ntlworld.ie
Wed Apr 21 08:54:00 PDT 2004


Dagmar d'Surreal enlightened us
> On Sun, 2004-04-11 at 13:14, Declan Moriarty wrote:
> > Dagmar d'Surreal enlightened us
> > > On Sat, 2004-04-10 at 21:56, Dagmar d'Surreal wrote:
> > > 
> > > > Oh christ this thing *is* oooooold.  What hardware is it on and what
> > > > exactly is he trying to do with it?  More details might stimulate my
> > > > memory.  (I was mainly "working" remotely on these back then.  Heh)

Wanna see some 1895 scripting er... 1985 scripting? I thought folks
might be interested, so I attached one. The thing is ATE - Automated
Test Equipment - worth going after.

Anyone remember what either of these did? (Wild guesses follow)

bstat ? Bind statistics ?
xmem ? Some primitive memory management tool?


-- 

	With best Regards,


	Declan Moriarty.
-------------- next part --------------

# static char  *SccsId ="@(#)net.add    1.15    3/20/91"
#   Installation tsh shell script for installing the TCP/IP
#   Software on STS Testers (Series 6000/8000)
#
#
#           shell variables
#
#   chgdef          whether to use the default settings
#   nsocket         number of socket devices
#   maxsock         maximum sockets
#   nxtty           number of remote terminal connections
#   maxtty          maximum ttys
#   admindev        admin device major number
#   xmemdev         xmem device major number
#   xttydev         xty device major number
#   sockdev         socket device major number
#   defdev          0 - default major device numbers
#   man             online man pages installed
#   ldman           load online manual pages
#   mask            subnet mask number
#   gway            gateway
set xttydev 20
set admindev 21
set xmemdev 22
set sockdev 23
set nsocket 32
set maxsock 64
set nxtty 2
set maxtty 16
set man yes
set subnet no
set ldman 0
set mtdev /dev/mt0
set chgdef 0
set mask 0
set gway 0


set host localhost
if(  -e /etc/hosts ) then
    set thost `grep localhost /etc/hosts`
    if( X$thost != X ) then
        set host $thost[2]
    endif
endif

echo "Starting the installation of the STS TCP/IP Network Update."
echo "The default installation parameters are as follows:"
echo
echo "  Host Name                      = $host "
echo "  Online Manual Pages installed  = $man "
echo "  Enable subnetting              = $subnet "
echo


set ans 0
while ( $ans == 0 )
    echo -n "Do you wish to use the default settings (y/n)? "
    input ans
    switch ($ans)
        case y:
        case Y:
            break
        case n:
        case N:
            set chgdef 1
            break
        default:
            echo "Please answer 'y' or 'n'."
            set ans 0
    end
end

if( $chgdef == 1 )  then
    echo -n "Enter the host name for this system? "
    input thost
    if( X$thost != X ) then
        set host $thost
    endif
    set ans 0
    while ( $ans == 0 )
        echo -n "Do you wish to install the online manual pages (y/n)? "
        input ans
        switch ($ans)
            case y:
            case Y:
                break
            case n:
            case N:
                set ldman  1
                break
            default:
                echo "Please answer 'y' or 'n'."
                set ans 0
        end
    end
    set ans 0
    while ( $ans == 0 )
        echo -n "Do you wish to enable subnetting (y/n)? "
        input ans
        switch ($ans)
            case y:
            case Y:
#########################################################################
#           Ask some advance question used for netload                  #
#           subnet mask & gateway                                       #
#########################################################################
                echo;echo
                echo "################################################"
                echo "# If you are not sure to any of the questions  #"
                echo "# just hit the RETURN key to continue.         #"
                echo "################################################"
                echo;echo
                echo "Enter the subnet mask for this system "
                echo -n "(i.e 0xff.0xff.0xff.0x00): "
                input thmask
                if( X$thmask != X ) then
                    set mask $thmask
                endif
                echo -n "Enter the name of the gateway to send default packets: "
                input thgway
                if( X$thgway != X ) then
                    set gway $thgway
                endif
                break
            case n:
            case N:
                set subnet 0
                break
            default:
                echo "Please answer 'y' or 'n'."
                set ans 0
        end
    end
endif
###################
# Install objects #
###################
echo "Installing network object files "
if( ! (-d /net) ) then
    mkdir /net
endif
rm -f /net/ftpd /net/rshd /net/net /net/netload
cp -l /net2.0/ftpd /net2.0/rshd /net2.0/net /net2.0/netload /net
rm -f /sbe/libexos.a
cp -l /net2.0/libexos.a /sbe/libexos.a
/bin/ranlib /sbe/libexos.a
if ( -f /net2.0/confnet.c ) then
    rm -f /sbe/confnet.c
    cp -l /net2.0/confnet.c /sbe/confnet.c
endif
rm -f /usr/bin/rcp /usr/bin/rsh /usr/bin/rlogin /usr/bin/telnet /usr/bin/ftp
cp -l /net2.0/rcp /net2.0/rsh /net2.0/rlogin /net2.0/telnet /net2.0/ftp /usr/bin
rm -f /etc/arp /etc/route /etc/bstat /etc/exosid /etc/netdump /etc/netstat
cp -l /net2.0/arp /net2.0/route /net2.0/bstat /net2.0/exosid /net2.0/netdump /net2.0/netstat /etc
rm -f /lib/libsocket.a
cp -l /net2.0/libsocket.a /lib/libsocket.a
rm -rf /net/scripts
mkdir /net/scripts
cp -l /net2.0/scripts/* /net/scripts
rm -f /etc/net.menu
cp -l /net/scripts/net.menu /etc
rm -rf /usr/include/EXOS
mkdir /usr/include/EXOS
cp -r /net2.0/EXOS /usr/include/EXOS

if ( $ldman == 0 ) then
    echo "Loading manual pages"
    cp /net2.0/man1/* /usr/doc/man/cmnd
endif
#
#  Change file permisions
#
echo "Setting file permissions."
chown root /net/ftpd /net/rshd /net/netload
chown root /usr/bin/rcp /usr/bin/rsh /usr/bin/rlogin \
    /usr/bin/telnet /usr/bin/ftp
chown root /etc/arp /etc/route /etc/bstat \
    /etc/exosid /etc/netdump /etc/netstat
chown root /lib/libsocket.a

chmod 700 /etc/rc
chmod 751 /net/scripts/*
chmod 4751 /net/ftpd /net/rshd
chmod 4751 /usr/bin/rcp /usr/bin/rsh /usr/bin/rlogin \
            /usr/bin/telnet
chmod 751 /usr/bin/ftp /etc/arp /etc/route /etc/bstat \
    /etc/exosid /etc/netdump /etc/netstat
chmod 444 /lib/libsocket.a /net/net


##################
# Create devices #
##################

echo "Creating STS TCP/IP Network devices."
cd /dev
rm -rf EXOS
mkdir EXOS
cd EXOS
mknod admin c $admindev 0
mknod errlog c $admindev 1
mknod xmem c $xmemdev 0
let i = 0
while ( $i < $nsocket )
    mknod socket$i c $sockdev $i
    let i = $i + 1
end

#
# All devices must be writable
#
chmod 666 *

#
# Remove old xttys
#
cd /dev
set nonomatch
rm -f /dev/tty[cdefghijklmnopqr]
rm -f /dev/pty* /dev/xtty*
set nomatch

#
#  Create new xttys
#
let i = 0
foreach let in ( c d e f g h i j k l m n o p q r)
    mknod xtty$i c $xttydev $i
    mknod tty$let c $xttydev $i
    chmod 666 tty$let xtty$i
    let i = $i + 1
end

#####################
# Edit system files #
#####################

echo "Editing system data files to support networking."

#
#  Edit etc/rc.
#  remove old net start commands and insert new net start commands
#
grep -v '^/net/' /etc/rc > /tmp/rc$$
mv /tmp/rc$$ /etc/rc
echo "/net/scripts/start" >> /etc/rc

#
#  Edit /net/scripts/start
#
sed -e "/netload/s/-t [  ]*[0-9]*[ ]*/-t $nxtty /" /net/scripts/start >/tmp/start$$
if ( $mask != 0 ) then
    mv /tmp/start$$ /net/scripts/start
    sed -e "/netload/s/-t/-s $mask -t/" /net/scripts/start >/tmp/start$$
endif
sed -e "/netload/s/-h localhost/-h $host /" /tmp/start$$ > /net/scripts/start
if ( $gway != 0 ) then
    echo "route add 0.0.0.0 $gway" >> /net/scripts/start
endif
chmod 754 /net/scripts/start

#
#  Edit /etc/ttys.
#
grep -v "[01][cdefghijklmnopqr]0" /etc/ttys > /etc/ttys$$
mv /etc/ttys$$ /etc/ttys
let i = 0
foreach let in ( c d e f g h i j k l m n o p q r)
    if( $i < $nxtty ) then
        echo "1${let}0" >> /etc/ttys
    else
        echo "0${let}0" >> /etc/ttys
    endif
    let i = $i + 1
end

#######################
# Miscellaneous stuff #
#######################

#
# Put hosts file in place.
#
if ( ! (-e /etc/hosts) ) then
    echo "#Add your host entry." > /etc/hosts
    echo "#The host entry should look similiar to the following:" >> /etc/hosts
    echo 192.0.0.1 host1 h1 localhost >> /etc/hosts
    echo 192.0.0.2 host2 h2 >> /etc/hosts
    echo 192.0.0.3 host3 h3 >> /etc/hosts
    echo 127.0.0.0 loopback lb >> /etc/hosts
    echo host1  >> /etc/hosts.equiv
    echo host2  >> /etc/hosts.equiv
    echo host3  >> /etc/hosts.equiv
    echo loopback >> /etc/hosts.equiv
    set edithosts 1
else
    set edithosts 0
endif

#
#  All done.
#
rm -rf /net2.0
rm -rf /tmp/*$$
sync
echo
echo
echo "STS TCP/IP Network Installation is complete."
echo "System must be properly restarted with new kernel."
if ( $edithosts == 1 ) then
    echo
    echo "Before you can communicate to other systems, you will need"
    echo "to modify the /etc/hosts and /etc/hosts.equiv files."
    echo "In addition, the -h option to the netload command must"
    echo "contain the name of your host system, check the network"
    echo "startup file /net/scripts/start to be sure."
else
    echo
    echo "The /etc/hosts and /etc/hosts.equiv files which were previously"
    echo "on your system have been left unmodified.  Be sure to check these"
    echo "files before attempting to communicate to other systems."
endif
echo


More information about the blfs-support mailing list