|
|
@ -66,18 +66,6 @@ get_gateway() {
|
|
|
|
echo $gateway
|
|
|
|
echo $gateway
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
get_interfaces() {
|
|
|
|
|
|
|
|
IFCMD="/sbin/ifconfig -a"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LANG=C
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$IFCMD | grep ^eth | sed 's/ *Link encap:Ethernet.*HWaddr /-/g'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_mac() {
|
|
|
|
|
|
|
|
echo $1 | cut -d'-' -f 2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_ip() {
|
|
|
|
get_ip() {
|
|
|
|
ip=$(get_iface_var "IP")
|
|
|
|
ip=$(get_iface_var "IP")
|
|
|
|
|
|
|
|
|
|
|
@ -95,10 +83,6 @@ get_iface_var() {
|
|
|
|
echo $var
|
|
|
|
echo $var
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
upcase() {
|
|
|
|
|
|
|
|
echo "$*" | tr '[:lower:]' '[:upper:]'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gen_iface_conf() {
|
|
|
|
gen_iface_conf() {
|
|
|
|
cat <<EOT
|
|
|
|
cat <<EOT
|
|
|
|
iface $DEV inet static
|
|
|
|
iface $DEV inet static
|
|
|
|