home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / etc / sysconfig / network / scripts / dhcp-interfaces < prev    next >
Text File  |  2006-11-29  |  458b  |  19 lines

  1. #!/bin/bash
  2.  
  3. . /etc/sysconfig/network/scripts/functions
  4. . /etc/sysconfig/network/dhcp
  5. : ${DHCLIENT_BIN:=dhcpcd}
  6. if [ -x $DHCLIENT_BIN ]; then :
  7. elif [ -x /sbin/$DHCLIENT_BIN ]; then DHCLIENT_BIN=/sbin/$DHCLIENT_BIN;
  8. elif [ -x /sbin/dhclient ]; then DHCLIENT_BIN=/sbin/dhclient
  9. fi
  10. DHCLIENT=${DHCLIENT_BIN##*/}
  11.  
  12. for i in `my_pidof $DHCLIENT`; do 
  13.     for device in `cat -A /proc/$i/cmdline`; do 
  14.         device=${device%^@} 
  15.         echo -e ${device##*^@} 
  16.     done
  17. done
  18. exit 0
  19.