]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/system/smartenabler
unbound: Drop certificates for local control connection
[ipfire-2.x.git] / src / initscripts / system / smartenabler
CommitLineData
d7fb75d9
AF
1#!/bin/sh
2# Begin $rc_base/init.d/smartenabler
3
4. /etc/sysconfig/rc
5. $rc_functions
6
7case "$1" in
8 start)
5c819ec4 9 boot_mesg -n "Enabling S.M.A.R.T.: ";
269e21c6 10 for disk in `ls -1 /sys/block | grep -E '^sd' | sort | uniq`; do
bf97c674 11 /usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
5c819ec4
AF
12 if [ ${?} = 0 ]; then
13 boot_mesg -n "$SUCCESS$disk$NORMAL ";
14 else
15 boot_mesg -n "$WARNING$disk$NORMAL ";
16 fi
d7fb75d9 17 done
5c819ec4
AF
18 boot_mesg;
19 echo_ok;
d7fb75d9
AF
20 ;;
21
22 *)
23 echo "Usage: $0 {start}"
24 exit 1
25 ;;
26esac
27
28# End $rc_base/init.d/smartenabler