diff options
author | Treeve Jelbert | 2007-10-30 21:29:08 +0100 |
---|---|---|
committer | Treeve Jelbert | 2007-10-30 21:29:08 +0100 |
commit | d18b992da1ad0c084c40eb70f76aa8abc3c56dfb (patch) | |
tree | 28c21a3de4e6e3284e616ce03177f3359757525c | |
parent | 1d21baf541b8191f5e05dd007ebe8883f5b7a0cd (diff) | |
parent | 03fb5e9f8b0798b43c9de2de5d32866babedbb15 (diff) |
Merge branch 'master' of ssh://treeve@scm.sourcemage.org/smgl/grimoire
-rw-r--r-- | disk/hdparm/HISTORY | 3 | ||||
-rwxr-xr-x | disk/hdparm/init.d/hdparm | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/disk/hdparm/HISTORY b/disk/hdparm/HISTORY index 4500bc5044..0bf5259e14 100644 --- a/disk/hdparm/HISTORY +++ b/disk/hdparm/HISTORY @@ -1,3 +1,6 @@ +2007-10-30 Pol Vinogradov <vin.public@gmail.com> + * init.d/hdparm.conf: made it work through sysfs interface + 2007-10-17 Eric Sandall <sandalle@sourcemage.org> * DETAILS: Incremented PATCHLEVEL=2 * init.d/hdparm: Check if a directory exists before cating it diff --git a/disk/hdparm/init.d/hdparm b/disk/hdparm/init.d/hdparm index a7a35f2c8c..a37b6921f5 100755 --- a/disk/hdparm/init.d/hdparm +++ b/disk/hdparm/init.d/hdparm @@ -20,9 +20,9 @@ start() # PATA for drive in hd{a..z}; do if [[ -b "/dev/$drive" ]]; then - if [[ -f /proc/ide/$drive/media ]]; + if [[ -f /sys/block/$drive/device/media ]]; then - if [[ "$(cat /proc/ide/$drive/media)" == "cdrom" ]]; + if [[ "$(cat /sys/block/$drive/device/media)" == "cdrom" ]]; then $PROGRAM $common_params $pata_cdrom_params $pata_params "/dev/$drive" else |