[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Translation of init scripts



In article <cistron.19990713114412.I16943@kitenet.net>,
Joey Hess  <joey@kitenet.net> wrote:
>- Allow start-stop-daemon to be replaced with other utilities if people want
>  to, that output different types of things. Or just modify it to be able to
>  generate some of these types of output. If debian as a whole decided we
>  wanted redhat style colored messages, once we got this far adding them
>  would just require modifying start-stop-daemon, not every init script.

I don't know. Only the most simple init scripts will just use start-stop-daemon
to start and stop the service. There a quite a few init scripts that do
more things - like starting and stopping several daemons, waiting until
a daemon has started/stopped, calling other scripts, etc

It would be better if we simply defined a few keywords the init script
can spit out that would be translated by a backend.

Squid for example would output this:

@@start
@@name: squid
@@daemon: squid
@@enddaemon

.. etc. All lines would begin with @@<type>, or at least the first one,
so that the backend/translator can detect that this is a new style
init script. Output between @@daemon and @@enddaemon is diagnostic output
from the program that is being started. We would need to carefully
design this interface, ofcourse. Perhaps it's too complicated.

Another option would be to just do what RedHat and Suse do, that is
for every init script you just print:

Starting squid proxy server:		[   OK   ]

You'd just add the following to the top of /etc/init.d/squid:

NAME_EN="squid proxy server"
NAME_FR="squid serveur de proxy"

The rc script would scan for a NAME_XX in the preferred language and
use that if available.

and, since most terminals (console, xterm, vt100, etc) support multiple
scrolling areas you could split the screen and use the top of the screen
for those multilanguage start/stop messages, while using the bottom
of the screen for any other and/or more verbose english output that is
generated while starting/stopping a service.

Originally I though I had a well though out point, but it appears I'm
getting stuck now. Anyway perhaps the above is some food for thought.

Mike.
-- 
Beware of Programmers who carry screwdrivers.


Reply to: