mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
remove 'System' from NetworkManager connection name
Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
parent
c3804877ed
commit
14ebb2fb93
1 changed files with 1 additions and 1 deletions
|
@ -857,7 +857,7 @@ setStaticIPv4() {
|
||||||
fi
|
fi
|
||||||
# if an ifcfg config does not exists for the interface name, try the connection name via network manager
|
# if an ifcfg config does not exists for the interface name, try the connection name via network manager
|
||||||
if is_command nmcli && nmcli general status &> /dev/null; then
|
if is_command nmcli && nmcli general status &> /dev/null; then
|
||||||
CONNECTION_NAME=$(nmcli dev show "${PIHOLE_INTERFACE}" | grep 'GENERAL.CONNECTION' | cut -d: -f2 | xargs | tr ' ' '_')
|
CONNECTION_NAME=$(nmcli dev show "${PIHOLE_INTERFACE}" | grep 'GENERAL.CONNECTION' | cut -d: -f2 | sed 's/^System//' | xargs | tr ' ' '_')
|
||||||
if [[ -f "/etc/sysconfig/network-scripts/ifcfg-${CONNECTION_NAME}" ]];then
|
if [[ -f "/etc/sysconfig/network-scripts/ifcfg-${CONNECTION_NAME}" ]];then
|
||||||
# If it exists,
|
# If it exists,
|
||||||
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${CONNECTION_NAME}
|
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${CONNECTION_NAME}
|
||||||
|
|
Loading…
Reference in a new issue