diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2009-11-14 12:33:33 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2009-11-14 12:33:33 +0000 |
commit | cc415305a049ca523f2a8cf674009fa77c54fee6 (patch) | |
tree | 6cf30da0266c6ffa712f243cc23f3c1b5c4a4fb8 /sysutils/smartmontools-devel/files/smart.in | |
parent | - Now fix to use this port on !i386. (diff) |
This commit was manufactured by cvs2svn to create tag 'RELEASE_8_0_0'.release/8.0.0
Diffstat (limited to 'sysutils/smartmontools-devel/files/smart.in')
-rw-r--r-- | sysutils/smartmontools-devel/files/smart.in | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/sysutils/smartmontools-devel/files/smart.in b/sysutils/smartmontools-devel/files/smart.in deleted file mode 100644 index d4ba696d5212..000000000000 --- a/sysutils/smartmontools-devel/files/smart.in +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# This script is in the public domain. Original author: Garrett Wollman -# -# $FreeBSD$ -# - -if [ -r /etc/defaults/periodic.conf ]; then - . /etc/defaults/periodic.conf - source_periodic_confs -fi - -smartctl=%%PREFIX%%/sbin/smartctl -: ${daily_status_smartctl_flags="-H"} -: ${daily_status_smartctl_extra_status_flags="-a"} - -case "${daily_status_smart_devices}" in - # XXX AUTO mode selects only regular ad/da disks - [Aa][Uu][Tt][Oo]) - daily_status_smart_devices=`sysctl -n kern.disks` - ;; - *) ;; -esac - -if [ -z "${daily_status_smart_devices}" ]; then - : ${daily_status_smart_enable="NO"} -else - : ${daily_status_smart_enable="YES"} -fi - -trim_junk="tail -n +4" - -tmpfile="$(mktemp /var/run/daily.XXXXXXXX)" -trap "rm -f ${tmpfile}" 0 1 3 15 - -rc=0 -case "${daily_status_smart_enable}" in - [Yy][Ee][Ss]) - cd /dev - for device in ${daily_status_smart_devices}; do - if [ -e ${device} ]; then - echo - echo "Checking health of ${device}:" - echo - ${smartctl} ${daily_status_smartctl_flags} ${device} > "${tmpfile}" - status=$? - if [ $((status & 3)) -ne 0 ]; then - rc=2 - ${trim_junk} "${tmpfile}" - elif [ $status -ne 0 ]; then - rc=1 - ${smartctl} ${daily_status_smartctl_extra_status_flags} ${device} | ${trim_junk} - else - ${trim_junk} "${tmpfile}" - fi - fi - done - ;; -esac - -exit "$rc" |