Changeset 4a36a1b in lab.git for iproute


Ignore:
Timestamp:
Jul 1, 2009 2:49:18 PM (15 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
39eda0b
Parents:
84c2881
Message:
  • add a simple explanation to a script
  • setnapt.sh
    • script for setting up IP MASQUERADE

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@8 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iproute/setroute.sh

    r84c2881 r4a36a1b  
    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.