aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorTrond Eivind Glomsrod <teg@redhat.com>2000-06-27 21:34:12 +0000
committerTrond Eivind Glomsrod <teg@redhat.com>2000-06-27 21:34:12 +0000
commit4b0c4e7a5134d1e329fad68eaa87ef1a599a3993 (patch)
treedd49574b39f632a8ff6c1a388971cdd92ba8447d /rc.d
parent063329c368a80270744e3de17b1116f3b2cba181 (diff)
downloadinitscripts-4b0c4e7a5134d1e329fad68eaa87ef1a599a3993.tar
initscripts-4b0c4e7a5134d1e329fad68eaa87ef1a599a3993.tar.gz
initscripts-4b0c4e7a5134d1e329fad68eaa87ef1a599a3993.tar.bz2
initscripts-4b0c4e7a5134d1e329fad68eaa87ef1a599a3993.tar.xz
initscripts-4b0c4e7a5134d1e329fad68eaa87ef1a599a3993.zip
Added support for EIDE disk optimization via /etc/sysconfig/hardddisks
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit34
1 files changed, 34 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 09ad5982..a6093c70 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -98,6 +98,8 @@ esac
action "Setting clock $CLOCKDEF: `date`" date
+
+
# Load keymap
KEYMAP=
if [ -f /etc/sysconfig/console/default.kmap ]; then
@@ -225,6 +227,38 @@ rm -f /etc/mtab~ /etc/mtab~~
mount -f /
mount -f /proc
+# Turn on harddisk optimization
+if [ -f /etc/sysconfig/harddisks ] && [ -x /sbin/hdparm ]; then
+ . /etc/sysconfig/harddisks
+ HDFLAGS=
+ if [ -n "$MULTIPLE_IO" ] && [ "$MULTIPLE_IO" != "0" ]; then
+ HDFLAGS="-q -m$MULTIPLE_IO"
+ fi
+ if [ -n "$USE_DMA" ] && [ "$USE_DMA" != "0" ]; then
+ HDFLAGS="$HDFLAGS -q -d$USE_DMA"
+ fi
+ if [ -n "$EIDE_32BIT" ]; then
+ HDFLAGS="$HDFLAGS -q -c$EIDE_32BIT"
+ fi
+ if [ -n "$LOOKAHEAD" ]; then
+ HDFLAGS="$HDFLAGS -q -A$LOOKAHEAD"
+ fi
+ if [ -n "$EXTRA_PARAMS" ]; then
+ HDFLAGS="$HDFLAGS $EXTRA_PARAMS"
+ fi
+ if [ -n "$HDFLAGS" ]; then
+ for i in a b c d e f g h ; do
+ if [ -e "/proc/ide/hd$i/media" ] ; then
+ hdmedia=`cat /proc/ide/hd$i/media`
+ if [ "$hdmedia" == "disk" ]; then
+ action "Setting hard drive parameters for hd$i: " /sbin/hdparm $HDFLAGS /dev/hd$i
+ fi
+ fi
+ done
+ fi
+fi
+
+
# Update quotas if fsck was run on /.
if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then
action "Checking root filesystem quotas" /sbin/quotacheck -v /