+This tool collects information of the hardware this tool is being executed
+on. It can be executed as normal user to collect some basic information or
+with root permissions to collect as much information as possible. By
+default, a file named grml-hwinfo-TIMESTAMP.tar.bz2 storing all collected
+information will be created in the current working directory. Alternatively,
+you can have it create a directory with all information.
+
+Options:
+
+-h : Display this help
+-f : Create grml-hwinfo-TIMESTAMP.tar.bz2
+-d : Create grml-hwinfo-TIMESTAMP/
+
+-fd : Create both a file and a directory
+"
+
+ exit 0;;
+
+ d)
+ GENERATE_FILE=0
+ GENERATE_DIRECTORY=1
+ ;;
+
+ f) # generating file; default behaviour
+ GENERATE_FILE=1
+ ;;
+
+ esac
+ done
+
+
+TMPDIR=$(mktemp -d) || { echo "Error creating a temporary directory, can not continue. Exiting.">&2 ; exit 1; }
+INFODIR="info"
+
+bailout() {
+ [ -d "$TMPDIR" ] && rm -rf "$TMPDIR"
+ [ -n "$1" ] && exit 1 || exit 0
+}
+
+DATE="$(date $TIMESTAMP)"
+[ -n "$INFOFILE" ] || INFOFILE="grml-hwinfo-$DATE.tar.bz2"
+INFOFILE="${WORKING_DIR}/${INFOFILE}"
+[ -n "$INFOOUTDIR" ] || INFOOUTDIR="grml-hwinfo-$DATE"
+INFOOUTDIR="${WORKING_DIR}/${INFOOUTDIR}"
+
+if [ "$(id -u)" != "0" ] ; then