[fix] Network functions

* Rename network-manager.service references to NetworkManager for compatibility
* Fix array expansion in function to disable unused NICs
This commit is contained in:
William Wernert
2020-04-02 20:47:19 -04:00
parent a38299d4ea
commit baa5dba199

View File

@@ -234,7 +234,7 @@ check_network_manager_conf() {
{
mv "$gmdconf" "${gmdconf}.bak"
touch "$gmdconf"
systemctl restart network-manager
systemctl restart NetworkManager
} >> $SETUPLOG 2>&1
fi
@@ -458,8 +458,8 @@ detect_os() {
fi
# Install network manager so we can do interface stuff
apt-get install -y network-manager
/bin/systemctl enable network-manager
/bin/systemctl start network-manager
/bin/systemctl enable NetworkManager
/bin/systemctl start NetworkManager
else
echo "We were unable to determine if you are using a supported OS." >> $SETUPLOG 2>&1
exit
@@ -486,7 +486,7 @@ disable_onion_user() {
}
disable_misc_network_features() {
for UNUSED_NIC in "${FNICS[@]}"; do
for UNUSED_NIC in ${FNICS[@]}; do
# Disable DHCPv4/v6 and autoconnect
nmcli con mod "$UNUSED_NIC" \
ipv4.method disabled \