#! /bin/sh # # network.sample $Revision: 1.1 $ $Date: 1995/05/25 04:30:06 $ (David Hinds) # # Initialize or shutdown a PCMCIA ethernet adapter # # This script should be invoked with two arguments. The first is the # action to be taken, either "start", "stop", or "restart". The # second is the network interface name. action=$1 device=$2 case "${action:?}" in 'start') /etc/sysconfig/network-scripts/ifup ifcfg-${device} /etc/rc.d/init.d/named restart /etc/rc.d/init.d/smb restart /etc/rc.d/init.d/atalk restart ;; 'stop') /etc/sysconfig/network-scripts/ifdown ifcfg-${device} /etc/rc.d/init.d/named stop /etc/rc.d/init.d/smb stop /etc/rc.d/init.d/atalk stop ;; 'restart') /sbin/ifconfig ${device:?} down up /etc/rc.d/init.d/named restart /etc/rc.d/init.d/smb restart /etc/rc.d/init.d/atalk restart ;; esac