#! /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 # if we don't have configuration for the device ifup/ifdown can't help us [ -f /etc/sysconfig/network-scripts/ifcfg-${device} ] || exit 0 case "${action:?}" in 'start' | 'resume') /etc/sysconfig/network-scripts/ifup ifcfg-${device} ;; 'stop') /etc/sysconfig/network-scripts/ifdown ifcfg-${device} ;; 'restart') /sbin/ifconfig ${device:?} down up ;; esac