X-Git-Url: http://lab.mitty.jp/git/?a=blobdiff_plain;f=iproute%2Fsetroute.sh;h=2ff477e2eda3bf5100bd75967e63b3c4fa90ccdf;hb=39eda0b67765385af21a00eb6d61e1d9b9915e51;hp=668fc591d49622e5b3f790bc75bae88defeeffef;hpb=84c2881946d389e9ef241cfbf7434d7dca598196;p=lab.git diff --git a/iproute/setroute.sh b/iproute/setroute.sh index 668fc59..2ff477e 100644 --- a/iproute/setroute.sh +++ b/iproute/setroute.sh @@ -1,5 +1,8 @@ #!/bin/sh +# set individualized routing table and policy for each network device + + set -x ## INTERFACES(5) @@ -28,7 +31,7 @@ fi # get IP address, network mask, default gateway info IPADDR=`/sbin/ip addr show dev ${IFACE} | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1` -if [ -z ${IPADDR} ]; then +if [ -z "${IPADDR}" ]; then # fail to bind IP address to device echo "${IFACE} has no IP address." exit