Previous Next Table of Contents

9. APPENDIX B - Scripts for Linux

--- areths.csh ---
#!/bin/csh
# areths.csh -- A very brain-dead script for initializing a Linux system's
# ARP and RARP tables.
#
# /etc/ethers entries must be in the format
# <hw ethernet address> <hostname>
# Examples:
#
# aa:bb:cc:dd:0e:0f hostname1
#
#   is also equivalent to 
#
# aa:bb:cc:dd:e:f hostname1
#
# Any other format or extraneous information for /etc/ethers will confuse and
# break the script.  Don't even bother trying as it would be too easy.

# specify arp and rarp commands to use
set arp  = /sbin/arp
set rarp = /sbin/rarp

# get /etc/ethers contents, ignore comment lines
set etherlist = `grep -v "^#" /etc/ethers`

set i = 1
while ( $i < $#etherlist )
  set eaddr = $etherlist[$i]
  @ i += 1
  set hname = $etherlist[$i]
  @ i += 1
  $arp  -s $hname $eaddr
  $rarp -s $hname $eaddr
end
# end of areths.csh

--- vaxboot-sysv.sh ---
#!/bin/sh
#
# vaxboot-sysv.sh  VAX bootserver components
# Author:          Brian Chase, <bdc@world.std.com>
#

# See how we were called.
case "$1" in
  start)
        echo "Starting VAX bootserver..."
        /usr/local/sbin/areths.csh &
        /usr/local/sbin/mopd -a
        /usr/local/sbin/bootparamd
        ;;
  stop)
        echo "Shutting down VAX bootserver..."
        /usr/bin/killall bootparamd
        /usr/bin/killall mopd
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0
# end of vaxboot-sysv.sh

--- vaxboot-bsd.sh ---
#!/bin/sh
#
# vaxboot-bsd.sh  VAX bootserver components
# Author:         Brian Chase, <bdc@world.std.com>
#

echo "Starting VAX bootserver..."
/usr/local/sbin/areths.csh &
/usr/local/sbin/mopd -a
/usr/local/sbin/bootparamd

exit 0
# end of vaxboot-bsd.sh


Previous Next Table of Contents