From:
[email protected]
This one time, at band camp, J�rg Sommer said:
begin Stephen Gran schrieb am Thu 12. Aug, 00:03 (-0400) :
Sure? The first time hdparm should run is before the rootfs is mounted
rw, so mount could never access /etc/mtab before and write there any
valid informations.
Right, but I think mount still does the right thing in this case.
I also am uneasy about the the end user running
/etc/init.d/hdparm start, and not having all their drives processed -
not that they should be doing this frequently, but it seems counterintuitive otherwise.
This can be caught by the same mechanism without printing the warning the rootfs isn't found. I see the greater problem, how you will find out it
the script is run by hand or by init. i.e. I use invoke-rc.d to restart reload a process.
Yes, this is what I'm trying to solve.
I think the last script I sent does the following:
If run as /etc/rcS/S06hdparm.first,
Beware of relying on symlink names. I use file-rc and this doesn't call S06hdparm.first. There aren't any symlinks so the scripts called from /etc/init.d/ - like users do.
Hadn't thought of this. Will need some consideration. Any pointers? I suppose $PPID or $$ could be checked, but I think those are bashisms
(not that the script isn't already ridiculously bash-specific, but ... :)
it only runs on the root disk, but
reads from mount, rather than /proc
So it may use invalid data. see above. What happens, if you delete the
line of the rootfs from /etc/mtab and then reboot.
I will test when I'm done working today. I don't have time for a reboot
right now :)
Also includes new parser code to allow people to put straight hdparm
lines in hdparm.conf in the following format:
Do you have an example? I don't understand what should happen.
command_line {
hdparm -q -m16 -q -W0 -q -d1 /dev/hda
}
The command is run as is. Some people may prefer to just use straight
command line syntax, instead of rewriting what they already know into my attempt at user friendliness. Saves steps if you know hdparm.
--
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' :
[email protected] |
| `. `' Debian user, admin, and developer |
| `-
http://www.debian.org |
-----------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBG3gASYIMHOpZA44RAsUfAJwLlWXgUnzUoHUafR5vlp4hFpmznwCfWs10 ScAHemXrYgG+NO10+FZ08Bw=
=0XzZ
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)