Update linupx-scripts.sh
This commit is contained in:
@@ -728,12 +728,10 @@ ONBOOT=yes
|
|||||||
IPADDR=10.10.4.20
|
IPADDR=10.10.4.20
|
||||||
PREFIX=16
|
PREFIX=16
|
||||||
GATEWAY=10.10.0.1
|
GATEWAY=10.10.0.1
|
||||||
DNS1=10.10.10.10
|
|
||||||
DNS2=10.10.10.11
|
|
||||||
IPV6_DISABLED=yes
|
IPV6_DISABLED=yes
|
||||||
" > /etc/sysconfig/network-scripts/ifcfg-eth0
|
" > /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||||
|
|
||||||
/usr/bin/nmcli connection up eth0
|
/usr/bin/nmcli connection up eth0 >/dev/null 2>&1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -819,17 +817,13 @@ IPV6_DISABLED=yes
|
|||||||
|
|
||||||
elif [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ]; then
|
elif [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ]; then
|
||||||
/usr/bin/nmcli connection modify eth0 ipv4.addresses ${IPADDRESS}/${NEWSUB}
|
/usr/bin/nmcli connection modify eth0 ipv4.addresses ${IPADDRESS}/${NEWSUB}
|
||||||
|
|
||||||
/usr/bin/nmcli connection modify eth0 ipv4.dns "${PRIDNS}"
|
/usr/bin/nmcli connection modify eth0 ipv4.dns "${PRIDNS}"
|
||||||
[ "${SECDNS}" != "" ] && nmcli connection modify eth0 ipv4.dns "${SECDNS}"
|
[ "${SECDNS}" != "" ] && /usr/bin/nmcli connection modify eth0 ipv4.dns "${SECDNS}"
|
||||||
|
|
||||||
/usr/bin/nmcli connection modify eth0 ipv4.gateway ${GATEWAY}
|
/usr/bin/nmcli connection modify eth0 ipv4.gateway ${GATEWAY}
|
||||||
|
[ "${DOMAIN}" != "" ] && /usr/bin/nmcli connection modify eth0 ipv4.dns-search ${DOMAIN}
|
||||||
[ "${DOMAIN}" != "" ] && nmcli connection modify eth0 ipv4.dns-search ${DOMAIN}
|
/usr/bin/nmcli connection modify eth0 ipv4.method manual
|
||||||
|
/usr/bin/nmcli connection modify eth0 ipv6.method disabled
|
||||||
nmcli connection modify eth0 ipv4.method manual
|
/usr/bin/nmcli connection up eth0 >/dev/null 2>&1
|
||||||
|
|
||||||
/usr/bin/nmcli connection up eth0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user