From f3b010a5f04c307642a766173ede2c2487baa4d1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 7 Dec 2017 18:48:35 -0500 Subject: [PATCH 1/4] more readable/safer --- iiab-network | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/iiab-network b/iiab-network index 5488a6f14..cf3d69064 100755 --- a/iiab-network +++ b/iiab-network @@ -16,24 +16,24 @@ if [ ! -f /etc/iiab/config_vars.yml ]; then echo "{}" > /etc/iiab/config_vars.yml fi +OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit if [ -f /etc/iiab/iiab.env ]; then source /etc/iiab/iiab.env -else - OS="unknown" fi Start=`date` ansible-playbook -i ansible_hosts iiab-network.yml --connection=local End=`date` + echo "" >> iiab-network.log # redhat path if [ "OS" == "centos" ] || [ "OS" == "fedora" ]; then - ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log + ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log fi -# ubuntu destop might be using NM - split out. +# Ubuntu desktop might be using NM - split out. if [ $(which nmcli) ]; then - nmcli d >> iiab-network.log - nmcli c >> iiab-network.log + nmcli d >> iiab-network.log + nmcli c >> iiab-network.log fi echo "" >> iiab-network.log ip r >> iiab-network.log @@ -43,6 +43,8 @@ echo "run start: $Start" >> iiab-network.log echo "run end: $End" >> iiab-network.log echo "" >> iiab-network.log echo "" >> iiab-network.log + +# Put the same stuff on screen ip r brctl show echo "run start:$Start" From 4868b67f3ef7e4ff111a2afdc591ec12d385295c Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 7 Dec 2017 18:52:59 -0500 Subject: [PATCH 2/4] Update iiab-network --- iiab-network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-network b/iiab-network index cf3d69064..f74b8ba41 100755 --- a/iiab-network +++ b/iiab-network @@ -47,5 +47,5 @@ echo "" >> iiab-network.log # Put the same stuff on screen ip r brctl show -echo "run start:$Start" +echo "run start: $Start" echo "run end: $End" From 69a7b2abc55e5d89278e1c9cb116ad6874e36895 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 7 Dec 2017 18:54:10 -0500 Subject: [PATCH 3/4] Update iiab-network --- iiab-network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-network b/iiab-network index f74b8ba41..0ae6e2982 100755 --- a/iiab-network +++ b/iiab-network @@ -44,7 +44,7 @@ echo "run end: $End" >> iiab-network.log echo "" >> iiab-network.log echo "" >> iiab-network.log -# Put the same stuff on screen +# Put the same stuff on screen, for live operator ip r brctl show echo "run start: $Start" From e9316034418b1acffc7548c36ac3190fd29a5ce1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 7 Dec 2017 18:56:22 -0500 Subject: [PATCH 4/4] Update iiab-network --- iiab-network | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iiab-network b/iiab-network index 0ae6e2982..b7b42b7d1 100755 --- a/iiab-network +++ b/iiab-network @@ -16,7 +16,7 @@ if [ ! -f /etc/iiab/config_vars.yml ]; then echo "{}" > /etc/iiab/config_vars.yml fi -OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit +OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit if [ -f /etc/iiab/iiab.env ]; then source /etc/iiab/iiab.env fi @@ -25,6 +25,7 @@ Start=`date` ansible-playbook -i ansible_hosts iiab-network.yml --connection=local End=`date` +# Record critical diagnostics to [/opt/iiab/iiab/]iiab-network.log echo "" >> iiab-network.log # redhat path if [ "OS" == "centos" ] || [ "OS" == "fedora" ]; then @@ -44,7 +45,7 @@ echo "run end: $End" >> iiab-network.log echo "" >> iiab-network.log echo "" >> iiab-network.log -# Put the same stuff on screen, for live operator +# Put the same diagnostics on screen, for live operator ip r brctl show echo "run start: $Start"