X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-hwinfo;h=8c1c590e4ab497371c482133b267e9c71359242b;hb=d4d215a2333e456655043428dab5db237fd61db5;hp=b96d2e842b4614cecd6de302878ecff3112b0572;hpb=b7cd41bfdd638dd5306cc85cc8599677d7bf9e92;p=grml-hwinfo.git diff --git a/grml-hwinfo b/grml-hwinfo index b96d2e8..8c1c590 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Jun 11 12:15:04 CEST 2007 [mika] +# Latest change: Die Jun 12 18:44:00 CEST 2007 [mika] ################################################################################ # Notice: Some ideas have been taken from # http://club.black.co.at/david/hwdb/infodump @@ -21,7 +21,7 @@ VERSION='0.3' if [ "$(id -u)" != 0 ] ; then NOTROOT=1 - echo "Notice: you are running $PN without root permissions! Not all information could be collected!" + echo "Notice: you are running $PN without root permissions. Not all information will be collected." echo fi @@ -114,6 +114,7 @@ mkdir info || exit -1 # hwinfo exectest discover && discover -v --type-summary --enable-bus all > discover 2> discover.2 exectest hwinfo && hwinfo log=hwinfo + exectest x86info && x86info > x86info 2>x86info.2 # net stuff exectest ifconfig && ifconfig -v -a > ifconfig @@ -130,9 +131,9 @@ mkdir info || exit -1 # powermanagement exectest laptop-detect && laptop-detect 1>/dev/null 2>/dev/null && echo "0" > laptop_detected - exectest acpi_available && acpi_available && cat /proc/acpi/info > acpi_info - exectest acpi && acpi > acpi 2> acpi.error && acpi -v > acpi.version - [ -r /proc/apm/ ] && apm > acpi + exectest acpi_available && acpi_available && cat /proc/acpi/info > acpi_info + exectest acpi && acpi > acpi 2> acpi.error && acpi -v > acpi.version + [ -r /proc/apm/ ] && apm > apm # kernel stuff if [ -r /proc/config.gz ] ; then @@ -182,10 +183,12 @@ fi # finally create the tarball if [ -f "$INFOFILE" ] ; then - DATE="$(date +%Y%m%d_%H:%M:%S)" - INFOFILE="info_$DATE.tar.bz2" - echo "Warning: $INFOFILE exists already, using $INFOFILE instead.">&1 - tar jcf $INFOFILE info/ && rm -Rf info/ + DATE="$(date +%Y%m%d_%H%M%S)" + NEW_INFOFILE="info_$DATE.tar.bz2" + echo + echo "Warning: $INFOFILE exists already, using $NEW_INFOFILE instead.">&2 + tar jcf $NEW_INFOFILE info/ && rm -Rf info/ + INFOFILE="$NEW_INFOFILE" # adjust variable for final info message else tar jcf $INFOFILE info/ && rm -Rf info/ fi