K2LL33D SHELL

 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.179.198

H O M E


Filename/lib/udev/hdparm
Size583
Permissionrwxr-xr-x
Ownerroot : root
Create time27-Apr-2025 09:55
Last modified16-Nov-2013 05:55
Last accessed05-Jul-2025 11:24
Actionsedit | rename | delete | download (gzip)
Viewtext | 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