ensure override for nmcli exists in /etc

This commit is contained in:
Jason Ertel
2025-02-21 17:10:39 -05:00
parent 64996db86b
commit 7155ccaf96
2 changed files with 9 additions and 9 deletions

View File

@@ -763,6 +763,9 @@ up_to_2.4.130() {
# Integrations policies need to be updated # Integrations policies need to be updated
rm -f /opt/so/state/eaintegrations.txt rm -f /opt/so/state/eaintegrations.txt
# Ensure override exists to allow nmcli access to other devices
touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
INSTALLEDVERSION=2.4.130 INSTALLEDVERSION=2.4.130
} }

View File

@@ -167,17 +167,14 @@ check_manager_connection() {
} }
check_network_manager_conf() { check_network_manager_conf() {
local gmdconf="/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf" local gmdconf="/etc/NetworkManager/conf.d/10-globally-managed-devices.conf"
local nmconf="/etc/NetworkManager/NetworkManager.conf"
local preupdir="/etc/NetworkManager/dispatcher.d/pre-up.d" local preupdir="/etc/NetworkManager/dispatcher.d/pre-up.d"
if test -f "$gmdconf" && ! test -f "${gmdconf}.bak"; then
{ {
mv "$gmdconf" "${gmdconf}.bak" [[ -f $gmdconf ]] && mv "$gmdconf" "${gmdconf}.bak"
touch "$gmdconf" touch "$gmdconf"
systemctl restart NetworkManager systemctl restart NetworkManager
} >> "$setup_log" 2>&1 } >> "$setup_log" 2>&1
fi
if [[ ! -d "$preupdir" ]]; then if [[ ! -d "$preupdir" ]]; then
mkdir "$preupdir" >> "$setup_log" 2>&1 mkdir "$preupdir" >> "$setup_log" 2>&1