Changeset 4a36a1b in lab.git for iproute/setroute.sh
- Timestamp:
- Jul 1, 2009 2:49:18 PM (15 years ago)
- Branches:
- master, trunk
- Children:
- 39eda0b
- Parents:
- 84c2881
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
iproute/setroute.sh
r84c2881 r4a36a1b 1 1 #!/bin/sh 2 3 # set individualized routing table and policy for each network device 4 2 5 3 6 set -x … … 29 32 # get IP address, network mask, default gateway info 30 33 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}]; then34 if [ -z "${IPADDR}" ]; then 32 35 # fail to bind IP address to device 33 36 echo "${IFACE} has no IP address."
Note: See TracChangeset
for help on using the changeset viewer.