Small logging fixes

Added lspci, fixed verbosity reading, when lshw is installed even more verbose output
This commit is contained in:
ThomasKaiser 2017-08-20 06:10:11 -07:00
parent bc58972f31
commit 680a8ca3d7
2 changed files with 9 additions and 3 deletions

View file

@ -275,8 +275,7 @@ log_hardware_info() {
echo -e "\n### boot environment:\n" >>${Log}
cat /boot/armbianEnv.txt >>${Log} 2>/dev/null || grep -v "^#" /boot/boot.ini | sed '/^\s*$/d' >>${Log}
echo -e "\n### lsusb:" >>${Log}
[ -f /boot/.force-verbose ] && USBVERBOSE="-v" || echo "" >>${Log}
lsusb ${USBVERBOSE} 2>/dev/null >>${Log}
lsusb 2>/dev/null >>${Log}
echo -e "\n### lscpu:\n" >>${Log}
lscpu >>${Log}
echo -e "\n### cpuinfo:\n" >>${Log}

View file

@ -743,8 +743,15 @@ gwYNGjRo0KBBw1eEfwH4UoBHAKAAAA==" | base64 --decode | tar xzf -
CollectSupportInfo() {
[[ -s /var/log/armhwinfo.log ]] && cat /var/log/armhwinfo.log || zcat /var/log/armhwinfo.log.1.gz
LOGLEVEL=$(awk -F'=' '/^verbosity/ {print $2}' /boot/armbianEnv.txt)
if [ ${LOGLEVEL} -gt 4 ]; then
VERBOSE='-v'
which lshw >/dev/null 2>&1 && (echo -e "\n### lshw:" ; lshw -quiet -sanitize -numeric)
fi
lsusb >/dev/null 2>&1 && (echo -e "\n### lsusb:" ; lsusb ${VERBOSE} 2>/dev/null ; echo "" ; lsusb -t 2>/dev/null)
lspci >/dev/null 2>&1 && (echo -e "\n### lspci:" ; lspci ${VERBOSE} 2>/dev/null)
[ -z $SUDO_USER ] || echo -e "\n### Group membership of $(groups $SUDO_USER)"
echo -e "\n### Installed packages:\n\n$(dpkg -l | egrep "armbian| linux-")"
echo -e "\n### Installed packages:\n\n$(dpkg -l | egrep "openmediavault|armbian| linux-")"
KernelVersion=$(awk -F" " '{print $3}' < /proc/version)
case ${KernelVersion} in
3.*)