mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Swap Sections 3 & 4, so iptables info is in 1 spot
This commit is contained in:
parent
734e62f55e
commit
c7f7d6dd5b
1 changed files with 20 additions and 20 deletions
|
@ -66,6 +66,17 @@ function cat_file() {
|
|||
cat_file_raw $1
|
||||
}
|
||||
|
||||
function cat_cmd() { # $1 = command + params, $2 = explanation
|
||||
echo " $1 # $2"
|
||||
echo "=IIAB==========================================================================" >> $outfile
|
||||
cmd=$(echo $1 | sed 's/\s.*$//') # Keep command on left; Drop params on right
|
||||
pth=$(which $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right
|
||||
echo "COMMAND: $pth$1 # $2" >> $outfile
|
||||
echo >> $outfile
|
||||
$(echo $1) >> $outfile
|
||||
echo >> $outfile
|
||||
}
|
||||
|
||||
function cat_dir() {
|
||||
echo " $1"
|
||||
echo "=IIAB==========================================================================" >> $outfile
|
||||
|
@ -80,17 +91,6 @@ function cat_dir() {
|
|||
fi
|
||||
}
|
||||
|
||||
function cat_cmd() { # $1 = command + params, $2 = explanation
|
||||
echo " $1 # $2"
|
||||
echo "=IIAB==========================================================================" >> $outfile
|
||||
cmd=$(echo $1 | sed 's/\s.*$//') # Keep command on left; Drop params on right
|
||||
pth=$(which $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right
|
||||
echo "COMMAND: $pth$1 # $2" >> $outfile
|
||||
echo >> $outfile
|
||||
$(echo $1) >> $outfile
|
||||
echo >> $outfile
|
||||
}
|
||||
|
||||
function cat_tail() { # $1 = path/filename; $2 = # of lines, for tail
|
||||
echo " $1"
|
||||
echo "=IIAB==========================================================================" >> $outfile
|
||||
|
@ -148,15 +148,7 @@ cat_file /usr/bin/iiab-gen-iptables
|
|||
#popd > /dev/null
|
||||
#cat_file /tmp/all-ansible-vars
|
||||
|
||||
echo -e "\n 3. Content of Directories, 1-level deep:\n"
|
||||
cat_dir /etc/network/interfaces.d
|
||||
cat_dir /etc/systemd/network
|
||||
cat_dir /etc/NetworkManager/system-connections
|
||||
cat_dir /etc/netplan
|
||||
#cat_dir /etc/sysconfig/network-scripts/if-cfg* # No longer common.
|
||||
#cat_dir /etc/network # Above file /etc/network/interfaces suffices
|
||||
|
||||
echo -e "\n 4. Output of Commands:\n"
|
||||
echo -e "\n 3. Output of Commands:\n"
|
||||
cat_cmd 'uname -a' 'Linux kernel'
|
||||
cat_cmd 'free' 'RAM memory'
|
||||
cat_cmd 'lscpu' 'CPU details'
|
||||
|
@ -173,6 +165,14 @@ cat_cmd 'systemctl status dnsmasq' 'Is dnsmasq Ok?'
|
|||
cat_cmd 'journalctl -u dnsmasq' 'dnsmasq log'
|
||||
#cat_cmd 'ansible localhost -m setup 2>/dev/null' 'All Ansible facts' # For cleaner scraping of Ansible vars, consider "./runrole all-vars /tmp/all-ansible-vars" 15-19 lines above?
|
||||
|
||||
echo -e "\n 4. Content of Directories, 1-level deep:\n"
|
||||
cat_dir /etc/network/interfaces.d
|
||||
cat_dir /etc/systemd/network
|
||||
cat_dir /etc/NetworkManager/system-connections
|
||||
cat_dir /etc/netplan
|
||||
#cat_dir /etc/sysconfig/network-scripts/if-cfg* # No longer common.
|
||||
#cat_dir /etc/network # Above file /etc/network/interfaces suffices
|
||||
|
||||
echo -e "\n 5. Log Files: (last 100 lines of each)\n"
|
||||
cat_tail /opt/iiab/iiab/iiab-install.log 100
|
||||
cat_tail /opt/iiab/iiab/iiab-network.log 100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue