* [gentoo-dev] hdparm in init
@ 2001-11-22 11:24 Wouter van Kleunen
2001-11-22 17:33 ` Martin Schlemmer
0 siblings, 1 reply; 6+ messages in thread
From: Wouter van Kleunen @ 2001-11-22 11:24 UTC (permalink / raw
To: gentoo-dev
I added the following to my /sbin/init.
-----
if [ -e /etc/hdparm.conf ]
then
(cat /etc/hdparm.conf) |
while read hd params
do
ebegin "Setting parameters for harddisk: $hd"
/usr/sbin/hdparm $params /dev/discs/$hd/disc > /dev/null
eend $?
done
echo
fi
-----
and /etc/hdparm.conf looks like:
disc0 -S150 -c1 -u1
disc1 -S150 -c1 -u1
I think it's handy.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] hdparm in init
2001-11-22 11:24 [gentoo-dev] hdparm in init Wouter van Kleunen
@ 2001-11-22 17:33 ` Martin Schlemmer
2001-11-22 18:06 ` Wouter van Kleunen
0 siblings, 1 reply; 6+ messages in thread
From: Martin Schlemmer @ 2001-11-22 17:33 UTC (permalink / raw
To: Gentoo-Dev
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]
On Thu, 2001-11-22 at 13:24, Wouter van Kleunen wrote:
> I added the following to my /sbin/init.
>
> -----
> if [ -e /etc/hdparm.conf ]
> then
> (cat /etc/hdparm.conf) |
> while read hd params
> do
> ebegin "Setting parameters for harddisk: $hd"
> /usr/sbin/hdparm $params /dev/discs/$hd/disc > /dev/null
> eend $?
> done
> echo
> fi
> -----
>
> and /etc/hdparm.conf looks like:
> disc0 -S150 -c1 -u1
> disc1 -S150 -c1 -u1
>
> I think it's handy.
Hi
I was wondering how to do this. Thanks for the tip, but ill
add it as a script in /etc/init.d and the .conf file should
go into /etc/conf.d.
Greetings and thanks,
--
Martin Schlemmer
Gentoo Linux Developer, Desktop Team Developer
Cape Town, South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] hdparm in init
2001-11-22 17:33 ` Martin Schlemmer
@ 2001-11-22 18:06 ` Wouter van Kleunen
2001-11-23 2:37 ` Blue Lizard
0 siblings, 1 reply; 6+ messages in thread
From: Wouter van Kleunen @ 2001-11-22 18:06 UTC (permalink / raw
To: gentoo-dev
as init.d script it would look like:
---
#!/sbin/runscript
depend() {
need bootmisc
}
start() {
[ -e /usr/sbin/hdparm ] || return
if [ -e /etc/hdparm.conf ]
then
(cat /etc/hdparm.conf) |
while read hd params
do
ebegin "Setting parameters for harddisk: $hd"
/usr/sbin/hdparm $params /dev/discs/$hd/disc > /dev/null
eend $?
done
echo
fi
return
}
----
But i have no idea how to make gentoo have it run as one of the first
scripts, to reduce boottime (a little).
Maybe name it 00hdparm or something.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] hdparm in init
2001-11-22 18:06 ` Wouter van Kleunen
@ 2001-11-23 2:37 ` Blue Lizard
2001-11-24 3:54 ` Martin Schlemmer
0 siblings, 1 reply; 6+ messages in thread
From: Blue Lizard @ 2001-11-23 2:37 UTC (permalink / raw
To: gentoo-dev
Wouter van Kleunen wrote:
>
>
>But i have no idea how to make gentoo have it run as one of the first
>scripts, to reduce boottime (a little).
>
I would strongly advise against having it before init switches to 2-5.
Therefore example would be /etc/rc.d/rc5.d/S00hdparm. But that is not
Gentooified location. Just to point out that it is not in
/etc/rc.d/init.d or wherever the early mount,mod-deps, etc scripts are.
>
>Maybe name it 00hdparm or something.
>
Regards.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] hdparm in init
2001-11-23 2:37 ` Blue Lizard
@ 2001-11-24 3:54 ` Martin Schlemmer
2001-11-24 5:13 ` Blue Lizard
0 siblings, 1 reply; 6+ messages in thread
From: Martin Schlemmer @ 2001-11-24 3:54 UTC (permalink / raw
To: Gentoo-Dev
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
On Fri, 2001-11-23 at 04:37, Blue Lizard wrote:
> Wouter van Kleunen wrote:
>
> >
> >
> >But i have no idea how to make gentoo have it run as one of the first
> >scripts, to reduce boottime (a little).
> >
> I would strongly advise against having it before init switches to 2-5.
> Therefore example would be /etc/rc.d/rc5.d/S00hdparm. But that is not
> Gentooified location. Just to point out that it is not in
> /etc/rc.d/init.d or wherever the early mount,mod-deps, etc scripts are.
>
Why not ?
--
Martin Schlemmer
Gentoo Linux Developer, Desktop Team Developer
Cape Town, South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] hdparm in init
2001-11-24 3:54 ` Martin Schlemmer
@ 2001-11-24 5:13 ` Blue Lizard
0 siblings, 0 replies; 6+ messages in thread
From: Blue Lizard @ 2001-11-24 5:13 UTC (permalink / raw
To: gentoo-dev
Martin Schlemmer wrote:
>On Fri, 2001-11-23 at 04:37, Blue Lizard wrote:
>
>>Wouter van Kleunen wrote:
>>
>>>
>>>But i have no idea how to make gentoo have it run as one of the first
>>>scripts, to reduce boottime (a little).
>>>
>>I would strongly advise against having it before init switches to 2-5.
>> Therefore example would be /etc/rc.d/rc5.d/S00hdparm. But that is not
>>Gentooified location. Just to point out that it is not in
>>/etc/rc.d/init.d or wherever the early mount,mod-deps, etc scripts are.
>>
>
>Why not ?
>
>
Because, should it turn out that hdparm is causing problems, you can
simply reboot in single and take care of it.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-11-24 5:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22 11:24 [gentoo-dev] hdparm in init Wouter van Kleunen
2001-11-22 17:33 ` Martin Schlemmer
2001-11-22 18:06 ` Wouter van Kleunen
2001-11-23 2:37 ` Blue Lizard
2001-11-24 3:54 ` Martin Schlemmer
2001-11-24 5:13 ` Blue Lizard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox