|
|
|
@ -52,6 +52,13 @@ get_mask() {
|
|
|
|
|
echo $mask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Gets device MTU
|
|
|
|
|
get_mtu() {
|
|
|
|
|
mtu=$(get_iface_var "MTU")
|
|
|
|
|
|
|
|
|
|
echo $mtu
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
is_gateway() {
|
|
|
|
|
if [ -z "$GATEWAY_IFACE_NUM" ]; then
|
|
|
|
|
true
|
|
|
|
@ -105,6 +112,9 @@ gen_iface_conf() {
|
|
|
|
|
NETMASK=$MASK
|
|
|
|
|
IPADDR=$IP
|
|
|
|
|
EOT
|
|
|
|
|
if [ -n "$MTU" ]; then
|
|
|
|
|
echo "MTU=$MTU"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -n "$GATEWAY" ]; then
|
|
|
|
|
echo "GATEWAY=$GATEWAY"
|
|
|
|
@ -119,6 +129,10 @@ IPV6INIT=yes
|
|
|
|
|
IPV6ADDR=$IPV6
|
|
|
|
|
EOT
|
|
|
|
|
|
|
|
|
|
if [ -n "$MTU" ]; then
|
|
|
|
|
echo "MTU=$MTU"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -n "$GATEWAY6" ]; then
|
|
|
|
|
echo "IPV6_DEFAULTGW=$GATEWAY6"
|
|
|
|
|
fi
|
|
|
|
@ -159,6 +173,7 @@ gen_network_configuration()
|
|
|
|
|
IP=$(get_ip)
|
|
|
|
|
NETWORK=$(get_network)
|
|
|
|
|
MASK=$(get_mask)
|
|
|
|
|
MTU=$(get_mtu)
|
|
|
|
|
GATEWAY=$(get_gateway)
|
|
|
|
|
|
|
|
|
|
IPV6=$(get_iface_var "IPV6")
|
|
|
|
|