Lines 41-47
Link Here
|
41 |
|
41 |
|
42 |
# If the current address does not match or we are deconfiguring |
42 |
# If the current address does not match or we are deconfiguring |
43 |
# then we take the all the addresses on the interface down |
43 |
# then we take the all the addresses on the interface down |
44 |
cur=$( ifconfig eth1 | grep 'inet ' | awk -F: '{ print $2,$3 }' | awk '{ print $1,$3 }' ) |
44 |
cur=$( ifconfig ${interface} | grep 'inet ' | awk -F: '{ print $2,$3 }' | awk '{ print $1,$3 }' ) |
45 |
if [[ ${cur} != "${ip} ${subnet}" || ${action} == deconfig ]]; then |
45 |
if [[ ${cur} != "${ip} ${subnet}" || ${action} == deconfig ]]; then |
46 |
# Remove all aliases |
46 |
# Remove all aliases |
47 |
for i in $( ifconfig | grep -o "^${interface}:[0-9]*" | tac | xargs ); do |
47 |
for i in $( ifconfig | grep -o "^${interface}:[0-9]*" | tac | xargs ); do |