diff --git a/Makefile b/Makefile index 21fd9c3..e75b823 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,8 @@ install-kde-distro-addons: dist-update cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/ cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/ -install-openmamba-makereport: - $(INSTALL_SCRIPT) openmamba-makereport/openmamba-makereport $(DESTDIR)$(bindir) +install-os-makereport: + $(INSTALL_SCRIPT) os-makereport/os-makereport $(DESTDIR)$(bindir) install-desktop: @$(INSTALL_DIR) $(DESTDIR)$(distrodesktopdir) @@ -132,7 +132,7 @@ install: $(pck_infiles:.in=) \ install-kde-distro-addons \ install-desktop \ install-openmamba-update \ - install-openmamba-makereport \ + install-os-makereport \ install-locales dist: clean diff --git a/openmamba-makereport/openmamba-makereport b/os-makereport/os-makereport similarity index 83% rename from openmamba-makereport/openmamba-makereport rename to os-makereport/os-makereport index ef0e74e..feaa9c5 100755 --- a/openmamba-makereport/openmamba-makereport +++ b/os-makereport/os-makereport @@ -1,14 +1,15 @@ #!/bin/bash # -# openmamba system report generation tool +# GNU/Linux O.S. report generation tool # # Copyright (c) 2008-2022 by Silvan Calarco # -VERSION=20220618 +MAKEREPORT_VERSION=20220728 TEMPFILE=`mktemp` . ${ROOT}/etc/sysconfig/machine +. ${ROOT}/etc/os-release [ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && { 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_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 NOTE="$1" @@ -118,8 +119,8 @@ _EOF } -echo "openmamba report generation tool $VERSION" -echo "Copyright (c) 2008-2022 by Silvan Calarco " +echo "${NAME} report generation tool ${MAKEREPORT_VERSION}" +echo "Copyright (c) 2008-2022 by Silvan Calarco " echo [ $UID = 0 ] || { @@ -127,13 +128,12 @@ echo exit 1 } + echo "Gathering information..." - - cat > $TEMPFILE << _EOF **************************************************************************** -* openmamba diagnostic information $VERSION for host $HOSTNAME (`date`) +* ${NAME} diagnostic information ${MAKEREPORT_VERSION} for host $HOSTNAME (`date`) **************************************************************************** _EOF @@ -146,14 +146,14 @@ echo >> $TEMPFILE fi # 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 /proc/cpuinfo "processor(s) 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 /sbin/lsmod "Loadel kernel modules" -catcommand "rpm -qa|grep kernel-mamba" "Installed kernel packages" +catcommand /usr/sbin/lsmod "Loadel kernel modules" +catcommand "rpm -qa|grep ^kernel-" "Installed kernel packages" catcommand "ls -l /etc/alternatives" "System alternatives" # kernel and system logs @@ -193,14 +193,14 @@ catfile "/etc/asound.conf" "Alsa configuration" catfile "/var/lib/alsa/asound.state" "Alsa mixer settings" # Network -catcommand "/sbin/ifconfig -a" "Network interfaces list" +catcommand "/usr/sbin/ifconfig -a" "Network 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" # Disks -for d in /dev/sd[a-z]; do - catcommand "smartctl -ia $d" "S.M.A.R.T. status for device $d" +for d in /dev/{sd[a-z],nvme[0-9]}; do + [ -e $d ] && catcommand "smartctl -ia $d" "S.M.A.R.T. status for device $d" done # 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" # 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 chmod +r $REPORTNAME rm -f $TEMPFILE 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."