|
|
@ -106,7 +106,7 @@ EOT
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$GATEWAY" ]; then
|
|
|
|
if [ -n "$GATEWAY" ]; then
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
echo "default $GATEWAY - -" >> /etc/sysconfig/network/routes
|
|
|
|
echo "default $GATEWAY - $DEV" >> /etc/sysconfig/network/ifroute-$DEV
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "GATEWAY=$GATEWAY"
|
|
|
|
echo "GATEWAY=$GATEWAY"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -130,7 +130,7 @@ EOT
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$GATEWAY6" ]; then
|
|
|
|
if [ -n "$GATEWAY6" ]; then
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
echo "default $GATEWAY6 - -" >> /etc/sysconfig/network/routes
|
|
|
|
echo "default $GATEWAY6 - $DEV" >> /etc/sysconfig/network/ifroute-$DEV
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "IPV6_DEFAULTGW=$GATEWAY6"
|
|
|
|
echo "IPV6_DEFAULTGW=$GATEWAY6"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -193,18 +193,18 @@ gen_network_configuration()
|
|
|
|
[ -z "${DEV}" ] && continue
|
|
|
|
[ -z "${DEV}" ] && continue
|
|
|
|
|
|
|
|
|
|
|
|
(
|
|
|
|
(
|
|
|
|
rm -f /etc/sysconfig/network/routes
|
|
|
|
rm -f /etc/sysconfig/network/ifroute-$DEV
|
|
|
|
cat <<EOT
|
|
|
|
cat <<EOT
|
|
|
|
DEVICE=$DEV
|
|
|
|
DEVICE=$DEV
|
|
|
|
BOOTPROTO=static
|
|
|
|
BOOTPROTO=static
|
|
|
|
NM_CONTROLLED=no
|
|
|
|
NM_CONTROLLED=no
|
|
|
|
TYPE=Ethernet
|
|
|
|
TYPE=Ethernet
|
|
|
|
EOT
|
|
|
|
EOT
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then
|
|
|
|
echo "STARTMODE=auto"
|
|
|
|
echo "STARTMODE=auto"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "ONBOOT=yes"
|
|
|
|
echo "ONBOOT=yes"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
[[ -n $IP ]] && gen_iface_conf
|
|
|
|
[[ -n $IP ]] && gen_iface_conf
|
|
|
|
[[ -n $IP6 ]] && gen_iface6_conf
|
|
|
|
[[ -n $IP6 ]] && gen_iface6_conf
|
|
|
|