home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 January / PCpro_2005_01.ISO / isolinux / all.rdz / initrd / etc / pcmcia / network < prev    next >
Encoding:
Text File  |  2004-03-24  |  731 b   |  30 lines

  1. #! /bin/sh
  2. #
  3. # network.sample $Revision: 1.1 $ $Date: 1995/05/25 04:30:06 $ (David Hinds)
  4. #
  5. # Initialize or shutdown a PCMCIA ethernet adapter
  6. #
  7. # This script should be invoked with two arguments.  The first is the
  8. # action to be taken, either "start", "stop", or "restart".  The
  9. # second is the network interface name.
  10.  
  11. action=$1
  12. device=$2
  13.  
  14. case "${action:?}" in
  15. 'start')
  16.     #
  17.     # We don't do *anything* here. We get a hotplug event when the ethX device
  18.     # is registered, and we bring the device up there
  19.     #
  20.     ;;
  21. 'stop')
  22.     #
  23.     [ -f /etc/sysconfig/network-scripts/ifcfg-${device} ] && \
  24.       /etc/sysconfig/network-scripts/ifdown ifcfg-${device}
  25.     ;;
  26. 'restart')
  27.     /sbin/ifconfig ${device:?} down up
  28.     ;;
  29. esac
  30.