From d1066678b367942a74ab8c93e65f7bd29b7e3a92 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 10 Jan 2014 15:39:54 +0100 Subject: [smartctl] Also parse health status reported by drive --- .../smartctl/data/opt/openslx/scripts/systemd-smartctl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'remote/modules') diff --git a/remote/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl b/remote/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl index 6025c962..6a798563 100755 --- a/remote/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl +++ b/remote/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl @@ -2,18 +2,30 @@ # Check Reallocated_Sector_Ct and Spin_Retry_Count of local disk(s) +. /opt/openslx/config + +[ -z "$SLX_SMARTCTL_MIN_REALLOC" ] && SLX_SMARTCTL_MIN_REALLOC=0 + FILE=$(mktemp) for dev in /dev/sd?; do - smartctl -A "$dev" -f "brief" > "$FILE" || continue # should we report devices where smartctl doesn't work? + smartctl -H -A -f "brief" "$dev" > "$FILE" || continue # should we report devices where smartctl doesn't work? + # parse + OVERALL=$(grep -o "test result: .*$" "$FILE" | cut -c 14-) + [ "x$OVERALL" = "xPASSED" ] && OVERALL="" REALLOC=$(grep "^ *5 " "$FILE" | awk '{print $8}') SPINRETRY_VAL=$(grep "^ *10 " "$FILE" | awk '{print $4}') SPINRETRY_THR=$(grep "^ *10 " "$FILE" | awk '{print $6}') - if [ -n "$REALLOC" ] && [ "$REALLOC" != "0" ]; then + # report if applicable + if [ -n "$OVERALL" ]; then + slxlog "smartctl-fail" "Failed HDD: $dev reports health as $OVERALL" "$FILE" + fi + if [ -n "$REALLOC" ] && [ "$REALLOC" -gt "$SLX_SMARTCTL_MIN_REALLOC" ]; then slxlog "smartctl-realloc" "Failing HDD: $dev has $REALLOC reallocated sectors!" "$FILE" fi if [ -n "$SPINRETRY_VAL" ] && [ "$SPINRETRY_VAL" -le "$SPINRETRY_THR" ]; then slxlog "smartctl-spinretry" "Failing HDD: $dev has bad spin retry count! ($SPINRETRY_VAL/$SPINRETRY_THR)" "$FILE" fi done +sleep 2 # give slxlog a little time, as it's running async rm -f -- "$FILE" -- cgit v1.2.3-55-g7522 From 9cceb9cedb8d06ddd1621f4ed2167ad98ef5a589 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Jan 2014 11:23:14 +0100 Subject: update cups to work with ubuntu 13.10 --- remote/modules/cups/cups.conf.ubuntu.13.10 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 remote/modules/cups/cups.conf.ubuntu.13.10 (limited to 'remote/modules') diff --git a/remote/modules/cups/cups.conf.ubuntu.13.10 b/remote/modules/cups/cups.conf.ubuntu.13.10 new file mode 100644 index 00000000..eaf19ce8 --- /dev/null +++ b/remote/modules/cups/cups.conf.ubuntu.13.10 @@ -0,0 +1,10 @@ +REQUIRED_INSTALLED_PACKAGES=" + cups + cups-daemon + cups-filters +" +REQUIRED_CONTENT_PACKAGES=" + cups + cups-daemon + cups-filters +" -- cgit v1.2.3-55-g7522