X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-hwinfo;h=0070f83d19b04182fc3606b594417a13d80307a6;hb=b1a7dff70eb01b6e21768c381996a77ab1d63c5d;hp=1b572f40426c2f5b64d85ac79f24198ddc1c7bff;hpb=fc34c5d064aab1a288ef7fc0166a77b898343619;p=grml-hwinfo.git diff --git a/grml-hwinfo b/grml-hwinfo index 1b572f4..0070f83 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -112,7 +112,12 @@ fi # Generate output/temporary directory name & path, and output file path [ -n "$OUTDIRNAME" ] || OUTDIRNAME="grml-hwinfo-${DATE}" -OUTDIR="${WORKING_DIR}/${OUTDIRNAME}" +if $_opt_output_directory ; then + OUTDIR="${OUTDIRNAME}" +else + OUTDIR="${WORKING_DIR}/${OUTDIRNAME}" +fi + if $_opt_force ; then mkdir -p "${OUTDIR}" else @@ -156,7 +161,7 @@ checkdisk() { while read _ _ _ device _ ; do isdisk=1 # skip CDROMs - [ "$(stat -c %G /dev/$device)" = "disk" ] || isdisk=0 + [ "$(stat -c %G /dev/"${device}")" = "disk" ] || isdisk=0 [ "$isdisk" -eq 1 ] && echo "$device" done } @@ -214,6 +219,9 @@ cd "${OUTDIR}" || exit 1 exectest x86info && x86info > ./x86info 2>./x86info.error exectest lscpu && lscpu > ./lscpu + # EFI + exectest efibootmgr && efibootmgr -v > efibootmgr + # net stuff, net-tools: exectest ifconfig && ifconfig -v -a > ./ifconfig exectest route && route -n > ./route @@ -224,7 +232,7 @@ cd "${OUTDIR}" || exit 1 exectest ip && ip link show > ip_link exectest ip && ip maddr show > ip_maddr exectest ip && ip mroute show > ip_mroute - exectest ip && ip mrule show > ip_mrule + exectest ip && ip mrule show > ip_mrule 2>ip_mrule.error exectest ip && ip neigh show > ip_neigh exectest ip && ip netns list > ip_netns exectest ip && ip ntable show > ip_ntable @@ -250,7 +258,11 @@ cd "${OUTDIR}" || exit 1 cat /proc/acpi/info > acpi_info fi - exectest acpi && acpi > ./acpi 2>acpi.error && acpi -v > ./acpi.version + if exectest acpi ; then + acpi > ./acpi 2>acpi.error + acpi --everything > ./acpi.everything 2>./acpi.everything.error + acpi -v > ./acpi.version + fi [ -r /proc/apm/ ] && apm > ./apm if exectest mcelog ; then @@ -356,7 +368,7 @@ cd "${OUTDIR}" || exit 1 if exectest hdparm ; then echo -e "hdparm -iv /dev/${disk}:\n" >> hdparm - hdparm -iv "/dev/$disk" >> ./hdparm + hdparm -iv "/dev/$disk" >> ./hdparm 2>> ./hdparm.error echo -e "\n\n" >> hdparm fi @@ -380,7 +392,7 @@ cd "${OUTDIR}" || exit 1 if exectest sg_inq ; then echo -e "sg_inq /dev/${disk}:\n" >> sg_inq - sg_inq "/dev/$disk" >> ./sg_inq + sg_inq "/dev/$disk" >> ./sg_inq 2>> ./sg_inq.error echo -e "\n\n" >> sg_inq fi