summaryrefslogtreecommitdiff
path: root/hw-report
diff options
context:
space:
mode:
Diffstat (limited to 'hw-report')
-rwxr-xr-xhw-report14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw-report b/hw-report
new file mode 100755
index 0000000..790f0d9
--- /dev/null
+++ b/hw-report
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+if hash lshw 2>/dev/null ; then
+ report="lshw-$(hostname)-$(date +%F)"
+ report_txt="$report.txt"
+ report_html="$report.html"
+ sudo lshw > "$report_txt" 2>/dev/null
+ sudo lshw -html > "$report_html" 2>/dev/null
+else
+ echo No lshw command.
+ exit 1
+fi