summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPol Vinogradov2007-10-30 18:07:49 +0500
committerPol Vinogradov2007-10-30 18:07:49 +0500
commitb741dbfcd94453c24cfee69e0129e619bb219db7 (patch)
treee1471a4718f1514cc86456821563393164d9a1f9
parent2301a04a8be91b2524b5f88abcff2728f0938c36 (diff)
disk/hdparm:
init.d/hdparm.conf: made it work through sysfs interface
-rw-r--r--disk/hdparm/HISTORY3
-rwxr-xr-xdisk/hdparm/init.d/hdparm4
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