- Timestamp:
- Jul 6, 2009 2:49:54 PM (15 years ago)
- Branches:
- master, trunk
- Children:
- c8daa69
- Parents:
- 71b798c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
iptables/setnapt.sh
rc109418 r84d8293 31 31 32 32 if [ -z "${GATEWAYS}" ]; then 33 GATEWAYS=`/sbin/ip route show table main | grep -w default | cut -d ' ' -f 5`33 GATEWAYS=`/sbin/ip route show table main | grep -w default | tr -s ' ' | cut -d ' ' -f 5` 34 34 fi 35 35 … … 40 40 fi 41 41 42 IPADDR=`/sbin/ip addr show dev ${GW} | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2| cut -d / -f 1`42 IPADDR=`/sbin/ip addr show dev ${GW} | grep -w inet | tr -s ' ' | cut -d ' ' -f 3 | cut -d / -f 1` 43 43 if [ -z "${IPADDR}" ]; then 44 44 # device doesn't seem to have an IP address
Note: See TracChangeset
for help on using the changeset viewer.