summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-05 10:39:55 +0100
committerSimon Rettberg2016-01-05 10:39:55 +0100
commit96f7cc1216729783ddee5acee25bdc67b7323176 (patch)
treefc4d6f9c27e8e0ccf9bfc555321a6a0ed3e7db3c /remote/modules
parent[hardware-stats] Switch to C locale before calling any tools (diff)
downloadtm-scripts-96f7cc1216729783ddee5acee25bdc67b7323176.tar.gz
tm-scripts-96f7cc1216729783ddee5acee25bdc67b7323176.tar.xz
tm-scripts-96f7cc1216729783ddee5acee25bdc67b7323176.zip
[hardware-stats] Log /dev path of HDD for each smartctl
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
index 8de902b3..2b54e3e7 100755
--- a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
+++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
@@ -108,6 +108,7 @@ if which smartctl; then
for dev in $(fdisk -l | grep -o '^Disk /dev/\S*:' | cut -c 6-); do
dev=${dev:0:-1}
smartctl -i -H -A -f "brief" "$dev" > "$FILE" || continue
+ echo "NEXTHDD=$dev" >> "$ALLSMART"
cat "$FILE" >> "$ALLSMART"
# parse
OVERALL=$(grep -o "test result: .*$" "$FILE" | cut -c 14-)