Changeset 8 in lab


Ignore:
Timestamp:
Jul 1, 2009 2:49:18 PM (15 years ago)
Author:
mitty
Message:
  • add a simple explanation to a script
  • setnapt.sh
    • script for setting up IP MASQUERADE
Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/iproute/setroute.sh

    r7 r8  
    11#!/bin/sh 
     2 
     3# set individualized routing table and policy for each network device 
     4 
    25 
    36set -x 
     
    2932# get IP address, network mask, default gateway info 
    3033IPADDR=`/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 
     34if [ -z "${IPADDR}" ]; then 
    3235    # fail to bind IP address to device 
    3336    echo "${IFACE} has no IP address." 
Note: See TracChangeset for help on using the changeset viewer.