From 9343438b143bb2afeb80e8bf3a93c74b061ddf9b Mon Sep 17 00:00:00 2001 From: Jeff Lane Date: Fri, 17 May 2019 11:33:21 -0400 Subject: check other netplan dirs, and instead of E/N/I for non-netplan systems (e.g. desktop) query NetworkManager instead --- bin/network_configs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/network_configs b/bin/network_configs index f546f3e..b2fcc99 100755 --- a/bin/network_configs +++ b/bin/network_configs @@ -1,12 +1,16 @@ #!/bin/bash if `grep -q "replaced by netplan" /etc/network/interfaces`; then - for configfile in `find /etc/netplan -type f`; do - echo "Config File $configfile:" - cat $configfile - echo "" + # Get our configs from netplan + for directory in "etc" "run" "lib"; do + for configfile in `find /$directory/netplan -type f -name *.yaml`; do + echo "Config File $configfile:" + cat $configfile + echo "" + done done else - echo "/etc/network/interfaces:" - cat /etc/network/interfaces + # get configs from Network Manager instead + echo "Network Manager:" + nmcli device show fi -- cgit v1.2.3