[OCF] ocf-shellfuncs standardization - Comments? Objections?
Ragnar Kjørstad
linux-ha at ragnark.vestdata.no
Wed Jul 6 00:24:58 MDT 2005
On Tue, Jul 05, 2005 at 06:10:03PM -0700, Nick Stoughton wrote:
> See also the latest version, 3.0, at
> http://www.linuxbase.org/spec/booksets/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
Thanks.
> > >>We need things which also allow informative messages, debug messages,
> > >>and which don't (in practice) print funny reverse video thing, and which
> > >>don't go to the pre-boot console.
> > >
> > > The LSB only defines what the functions are, not what they should do.
> > >
> Well...that's overstating it more than a bit! The LSB definitely defines
> what things should do, and the 3.0 versions of the init script logging
> functions state that these functions should print a suitable message
> (doesn't say where though!)
Exactly. So if you are running a service management application from X, and choosing to start
a service, and the initscript does log_warning_msg, I think it would be correct for
the application to implement a log_warning_msg that showed the message in a popup window
in X.
The same thing applies if you choose to start a service through an HA software package,
allthough there will be more layers in between.
> As I said, they simply cause the message to be "printed" (and in the
> implementations I've checked, they simply use "echo" to do that).
Yes. I actually expected that distributions would include multiple implementations
of the functions, depending on environment, but found no such thing.
E.g., I would expect one implementation (just echo) when running as a regular initscript.
Another implementation when running in a graphical boot environment, and a third one for
running under the control of service management applications. (control panel, or whatever).
Instead, it seems the same implementation (just echo) is used all across the board, and they
just redirect stdout/stderr when running in different environments. One exception though: On
Red Hat the warning/failure functions also trigger the graphical boot environment to
automatically go into detail mode.
--
Ragnar Kjørstad
Software Engineer
Scali - http://www.scali.com
Scaling the Linux Datacenter
More information about the OCF
mailing list