* original rules from /etc/ufw/*.rules
[lab.git] / iproute / setroute.sh
old mode 100644 (file)
new mode 100755 (executable)
index 668fc59..2ff477e
@@ -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