Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / lib / udev / | server ip : 172.67.156.115 your ip : 172.70.80.63 H O M E |
Filename | /lib/udev/hdparm |
Size | 583 |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:55 |
Last modified | 16-Nov-2013 05:55 |
Last accessed | 05-Jul-2025 11:24 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh
set -e
[ -n "$DEVNAME" ] || exit 1
. /lib/hdparm/hdparm-functions
if [ -e /proc/cmdline ]; then #linux only - future proofing against BSD and Hurd :)
if grep -wq nohdparm /proc/cmdline ; then
exit 0
fi
fi
raidstat=OK
if [ -e /proc/mdstat ]; then
if egrep -iq "resync|repair|recover|check" /proc/mdstat; then
raidstat=RESYNC
fi
elif [ -e /proc/rd/status ]; then
raidstat=`cat /proc/rd/status`
fi
if ! [ "$raidstat" = 'OK' ]; then
exit 1
fi
OPTIONS=$(hdparm_options $DEVNAME)
if [ -n "$OPTIONS" ]; then
/sbin/hdparm $OPTIONS $DEVNAME 2>/dev/null
fi
exit 0
set -e
[ -n "$DEVNAME" ] || exit 1
. /lib/hdparm/hdparm-functions
if [ -e /proc/cmdline ]; then #linux only - future proofing against BSD and Hurd :)
if grep -wq nohdparm /proc/cmdline ; then
exit 0
fi
fi
raidstat=OK
if [ -e /proc/mdstat ]; then
if egrep -iq "resync|repair|recover|check" /proc/mdstat; then
raidstat=RESYNC
fi
elif [ -e /proc/rd/status ]; then
raidstat=`cat /proc/rd/status`
fi
if ! [ "$raidstat" = 'OK' ]; then
exit 1
fi
OPTIONS=$(hdparm_options $DEVNAME)
if [ -n "$OPTIONS" ]; then
/sbin/hdparm $OPTIONS $DEVNAME 2>/dev/null
fi
exit 0