mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
more readable/safer
This commit is contained in:
parent
d415d9ac40
commit
f3b010a5f0
1 changed files with 8 additions and 6 deletions
|
@ -16,21 +16,21 @@ if [ ! -f /etc/iiab/config_vars.yml ]; then
|
||||||
echo "{}" > /etc/iiab/config_vars.yml
|
echo "{}" > /etc/iiab/config_vars.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit
|
||||||
if [ -f /etc/iiab/iiab.env ]; then
|
if [ -f /etc/iiab/iiab.env ]; then
|
||||||
source /etc/iiab/iiab.env
|
source /etc/iiab/iiab.env
|
||||||
else
|
|
||||||
OS="unknown"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Start=`date`
|
Start=`date`
|
||||||
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
||||||
End=`date`
|
End=`date`
|
||||||
|
|
||||||
echo "" >> iiab-network.log
|
echo "" >> iiab-network.log
|
||||||
# redhat path
|
# redhat path
|
||||||
if [ "OS" == "centos" ] || [ "OS" == "fedora" ]; then
|
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
|
fi
|
||||||
# ubuntu destop might be using NM - split out.
|
# Ubuntu desktop might be using NM - split out.
|
||||||
if [ $(which nmcli) ]; then
|
if [ $(which nmcli) ]; then
|
||||||
nmcli d >> iiab-network.log
|
nmcli d >> iiab-network.log
|
||||||
nmcli c >> iiab-network.log
|
nmcli c >> iiab-network.log
|
||||||
|
@ -43,6 +43,8 @@ echo "run start: $Start" >> iiab-network.log
|
||||||
echo "run end: $End" >> iiab-network.log
|
echo "run end: $End" >> iiab-network.log
|
||||||
echo "" >> iiab-network.log
|
echo "" >> iiab-network.log
|
||||||
echo "" >> iiab-network.log
|
echo "" >> iiab-network.log
|
||||||
|
|
||||||
|
# Put the same stuff on screen
|
||||||
ip r
|
ip r
|
||||||
brctl show
|
brctl show
|
||||||
echo "run start:$Start"
|
echo "run start:$Start"
|
||||||
|
|
Loading…
Reference in a new issue