mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
iiab-diagnostics: test & warn re: non-existent commands
This commit is contained in:
parent
a0c6de35b6
commit
7db7998b74
1 changed files with 14 additions and 2 deletions
|
@ -87,7 +87,11 @@ function cat_cmd() { # $1 = command + params, $2 = explan
|
|||
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
|
||||
if [ -z "$pth" ]; then
|
||||
echo "COMMAND NOT FOUND: $1" >> $outfile
|
||||
else
|
||||
$(echo $1) >> $outfile
|
||||
fi
|
||||
echo >> $outfile
|
||||
}
|
||||
|
||||
|
@ -151,6 +155,7 @@ cat_file /etc/iiab/iiab_state.yml
|
|||
cat_file /etc/iiab/config_vars.yml
|
||||
cat_file /etc/resolv.conf
|
||||
cat_file /etc/network/interfaces
|
||||
cat_file /etc/hostapd/hostapd.conf
|
||||
|
||||
# Record all Ansible variables: SLOW! OUTPUT TOO LARGE?
|
||||
#pushd /opt/iiab/iiab > /dev/null
|
||||
|
@ -178,13 +183,20 @@ cat_cmd 'blkid' 'Mount point details'
|
|||
cat_cmd 'ip addr' 'Network interfaces'
|
||||
cat_cmd 'ifconfig' 'Network interfaces (old view)'
|
||||
cat_cmd 'brctl show' 'Bridge for LAN side'
|
||||
cat_cmd 'ip route' 'Routing table'
|
||||
cat_cmd 'netstat -rn' 'Routing table'
|
||||
cat_cmd 'sudo netstat -natp' 'Ports/Services in use'
|
||||
cat_cmd 'systemctl status dnsmasq' 'Is dnsmasq Ok?'
|
||||
cat_cmd 'sudo journalctl -u dnsmasq' 'dnsmasq log'
|
||||
cat_cmd 'sudo journalctl -b 0 -u dnsmasq' 'dnsmasq log'
|
||||
cat_cmd 'env' 'Environment variables'
|
||||
#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" 27-31 lines above?
|
||||
cat_cmd 'dmesg' 'Linux diagnostic messages'
|
||||
cat_cmd 'networkctl' 'systemd-networkd status'
|
||||
cat_cmd 'nmcli d' 'NetworkManager status'
|
||||
cat_cmd 'sudo journalctl -b 0 -u networkd-dispatcher' 'networkd-dispatcher log'
|
||||
cat_cmd 'iw dev' 'list of wireless interfaces'
|
||||
cat_cmd 'systemctl status hostapd' 'Is hostapd Ok?'
|
||||
cat_cmd 'ps -AH' 'staging of wpa_supplicant service'
|
||||
|
||||
echo -e "\n 5. Firewall Rules:\n"
|
||||
echo -e "\n\n\n\n5. FIREWALL RULES\n" >> $outfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue