summaryrefslogtreecommitdiff
diff options
authorJeff Lane <jeffrey.lane@canonical.com>2019-05-17 11:33:21 -0400
committerJeff Lane <jeffrey.lane@canonical.com>2019-05-17 11:33:21 -0400
commit9343438b143bb2afeb80e8bf3a93c74b061ddf9b (patch)
tree84afaf377f5a1f91214aa1730f9e5cf64fdc865b
parentf6d1e77cb12539664935bafaae9159bb37058fb8 (diff)
check other netplan dirs, and instead of E/N/I for non-netplan systems (e.g. desktop) query NetworkManager instead
-rwxr-xr-xbin/network_configs16
1 files 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