More cleanups, localize variables, clean formatting.
This commit is contained in:
parent
87e7121332
commit
d71b799e75
|
@ -326,6 +326,9 @@ setDHCPCD() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setStaticIPv4() {
|
setStaticIPv4() {
|
||||||
|
local IFCFG_FILE
|
||||||
|
local IPADDR
|
||||||
|
local CIDR
|
||||||
if [[ -f /etc/dhcpcd.conf ]];then
|
if [[ -f /etc/dhcpcd.conf ]];then
|
||||||
# Debian Family
|
# Debian Family
|
||||||
if grep -q "$IPv4_address" /etc/dhcpcd.conf; then
|
if grep -q "$IPv4_address" /etc/dhcpcd.conf; then
|
||||||
|
@ -366,9 +369,8 @@ setStaticIPv4() {
|
||||||
nmcli con load "${IFCFG_FILE}" > /dev/null
|
nmcli con load "${IFCFG_FILE}" > /dev/null
|
||||||
fi
|
fi
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Setting IP to $IPv4_address. You may need to restart after the install is complete."
|
echo "::: Setting IP to ${IPv4_address}. You may need to restart after the install is complete."
|
||||||
echo ":::"
|
echo ":::"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "::: Warning: Unable to locate configuration file to set static IPv4 address!"
|
echo "::: Warning: Unable to locate configuration file to set static IPv4 address!"
|
||||||
|
|
Loading…
Reference in New Issue