os-makereport: renamed from openmamba-makereport with fixes

This commit is contained in:
Silvan Calarco 2022-07-28 17:01:34 +02:00
parent 44dec445dc
commit 74e26daae0
2 changed files with 21 additions and 21 deletions

View File

@ -116,8 +116,8 @@ install-kde-distro-addons: dist-update
cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/ cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/
cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/ cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/
install-openmamba-makereport: install-os-makereport:
$(INSTALL_SCRIPT) openmamba-makereport/openmamba-makereport $(DESTDIR)$(bindir) $(INSTALL_SCRIPT) os-makereport/os-makereport $(DESTDIR)$(bindir)
install-desktop: install-desktop:
@$(INSTALL_DIR) $(DESTDIR)$(distrodesktopdir) @$(INSTALL_DIR) $(DESTDIR)$(distrodesktopdir)
@ -132,7 +132,7 @@ install: $(pck_infiles:.in=) \
install-kde-distro-addons \ install-kde-distro-addons \
install-desktop \ install-desktop \
install-openmamba-update \ install-openmamba-update \
install-openmamba-makereport \ install-os-makereport \
install-locales install-locales
dist: clean dist: clean

View File

@ -1,14 +1,15 @@
#!/bin/bash #!/bin/bash
# #
# openmamba system report generation tool # GNU/Linux O.S. report generation tool
# #
# Copyright (c) 2008-2022 by Silvan Calarco <silvan.calarco@mambasoft.it> # Copyright (c) 2008-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
VERSION=20220618 MAKEREPORT_VERSION=20220728
TEMPFILE=`mktemp` TEMPFILE=`mktemp`
. ${ROOT}/etc/sysconfig/machine . ${ROOT}/etc/sysconfig/machine
. ${ROOT}/etc/os-release
[ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && { [ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && {
SYSTEM_MANUFACTURER=unknown SYSTEM_MANUFACTURER=unknown
@ -26,7 +27,7 @@ SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _ | tr '-' _ | tr '/' _`
SYSTEM_PRODUCT_NAME=`echo $SYSTEM_PRODUCT_NAME | tr ' ' _ | tr '-' _ | tr '/' _` SYSTEM_PRODUCT_NAME=`echo $SYSTEM_PRODUCT_NAME | tr ' ' _ | tr '-' _ | tr '/' _`
SYSTEM_SERIAL_NUMBER=`echo $SYSTEM_SERIAL_NUMBER | tr ' ' _ | tr '-' _ | tr '/' _` SYSTEM_SERIAL_NUMBER=`echo $SYSTEM_SERIAL_NUMBER | tr ' ' _ | tr '-' _ | tr '/' _`
REPORTNAME="openmamba-report-$SYSTEM_MANUFACTURER-$SYSTEM_PRODUCT_NAME-$SYSTEM_SERIAL_NUMBER.txt" REPORTNAME="${NAME}-report-$SYSTEM_MANUFACTURER-$SYSTEM_PRODUCT_NAME-$SYSTEM_SERIAL_NUMBER.txt"
if [ "$1" ]; then if [ "$1" ]; then
NOTE="$1" NOTE="$1"
@ -118,8 +119,8 @@ _EOF
} }
echo "openmamba report generation tool $VERSION" echo "${NAME} report generation tool ${MAKEREPORT_VERSION}"
echo "Copyright (c) 2008-2022 by Silvan Calarco <info@openmamba.org>" echo "Copyright (c) 2008-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>"
echo echo
[ $UID = 0 ] || { [ $UID = 0 ] || {
@ -127,13 +128,12 @@ echo
exit 1 exit 1
} }
echo "Gathering information..." echo "Gathering information..."
cat > $TEMPFILE << _EOF cat > $TEMPFILE << _EOF
**************************************************************************** ****************************************************************************
* openmamba diagnostic information $VERSION for host $HOSTNAME (`date`) * ${NAME} diagnostic information ${MAKEREPORT_VERSION} for host $HOSTNAME (`date`)
**************************************************************************** ****************************************************************************
_EOF _EOF
@ -146,14 +146,14 @@ echo >> $TEMPFILE
fi fi
# system information # system information
catfile /etc/openmamba-release "release information" catfile /etc/os-release "O.S. release information"
catfile /etc/sysconfig/machine "machine information from BIOS" catfile /etc/sysconfig/machine "machine information from BIOS"
catfile /proc/cpuinfo "processor(s) information" catfile /proc/cpuinfo "processor(s) information"
catfile /proc/meminfo "System memory information" catfile /proc/meminfo "System memory information"
catcommand "/usr/sbin/lspci -nn" "PCI hardware information (short)" catcommand "/usr/bin/lspci -nn" "PCI hardware information (short)"
catcommand /usr/bin/lsusb "USB hardware information" catcommand /usr/bin/lsusb "USB hardware information"
catcommand /sbin/lsmod "Loadel kernel modules" catcommand /usr/sbin/lsmod "Loadel kernel modules"
catcommand "rpm -qa|grep kernel-mamba" "Installed kernel packages" catcommand "rpm -qa|grep ^kernel-" "Installed kernel packages"
catcommand "ls -l /etc/alternatives" "System alternatives" catcommand "ls -l /etc/alternatives" "System alternatives"
# kernel and system logs # kernel and system logs
@ -193,14 +193,14 @@ catfile "/etc/asound.conf" "Alsa configuration"
catfile "/var/lib/alsa/asound.state" "Alsa mixer settings" catfile "/var/lib/alsa/asound.state" "Alsa mixer settings"
# Network # Network
catcommand "/sbin/ifconfig -a" "Network interfaces list" catcommand "/usr/sbin/ifconfig -a" "Network interfaces list"
catcommand "/usr/sbin/iwconfig" "Wireless interfaces list" catcommand "/usr/sbin/iwconfig" "Wireless interfaces list"
catcommand "/sbin/route -n" "Routing table" catcommand "/usr/sbin/route -n" "Routing table"
catcommand "systemd-resolve --status" "DNS configuration" catcommand "systemd-resolve --status" "DNS configuration"
# Disks # Disks
for d in /dev/sd[a-z]; do for d in /dev/{sd[a-z],nvme[0-9]}; do
catcommand "smartctl -ia $d" "S.M.A.R.T. status for device $d" [ -e $d ] && catcommand "smartctl -ia $d" "S.M.A.R.T. status for device $d"
done done
# Installation # Installation
@ -208,11 +208,11 @@ catcommand "rpm -qa --last | head -n 100" "Last installed packages"
catfile /var/log/Xorg.5.log "Xorg installation test log" catfile /var/log/Xorg.5.log "Xorg installation test log"
# Other details # Other details
catcommand "/usr/sbin/lspci -vv" "PCI hardware information (verbose)" catcommand "/usr/bin/lspci -vv" "PCI hardware information (verbose)"
cp $TEMPFILE $REPORTNAME || exit 1 cp $TEMPFILE $REPORTNAME || exit 1
chmod +r $REPORTNAME chmod +r $REPORTNAME
rm -f $TEMPFILE rm -f $TEMPFILE
echo "Report saved as $REPORTNAME" echo "Report saved as $REPORTNAME"
echo "Please send this report to reports@openmamba.org." echo "Please visit $BUG_REPORT_URL for instructions to submit this report."