Changeset 84c2881 in lab.git for iproute/setroute.sh
- Timestamp:
- Jun 30, 2009 10:50:47 PM (15 years ago)
- Branches:
- master, trunk
- Children:
- 4a36a1b
- Parents:
- 8c804d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
iproute/setroute.sh
r8c804d8 r84c2881 29 29 # get IP address, network mask, default gateway info 30 30 IPADDR=`/sbin/ip addr show dev ${IFACE} | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1` 31 if [ -z ${IPADDR} ]; then 32 # fail to bind IP address to device 33 echo "${IFACE} has no IP address." 34 exit 35 fi 31 36 NETWORK=`/sbin/ip route show dev ${IFACE} | grep -w ${IPADDR} | cut -d ' ' -f 1` 32 37
Note: See TracChangeset
for help on using the changeset viewer.