Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Clarify what "sensible behaviour" is for init scripts (http://www.linux-archive.org/debian-development/118902-clarify-what-sensible-behaviour-init-scripts.html)

Iñaki Baz Castillo 07-04-2008 02:42 PM

Clarify what "sensible behaviour" is for init scripts
 
El Viernes, 4 de Julio de 2008, Raphael Hertzog escribió:
> Ok, this confirms my initial feeling. Changing this in dpkg would require
> a wide-scale testing and much effort for little gains since the policy
> already require packages to behave sensibly.

It seems that some services return 0 and others 1 in the same case:

# lighttpd running:
~# /etc/init.d/lighttpd start ; echo $?
* Starting web server lighttpd
[fail]
1

# apache2 running:
~# /etc/init.d/apache2 start ; echo $?
* Starting web server apache2 httpd (pid 8877) already running
[ OK ]
0


> Iñaki, if you ever encounter
> bad init scripts, please report bugs against the offending packages.

In the above case which is the "bad" init script?:
- lighttpd uses LSB specs.
- apache2 uses Debian specs.

Regards.


--
Iñaki Baz Castillo


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Raphael Hertzog 07-04-2008 06:45 PM

Clarify what "sensible behaviour" is for init scripts
 
On Fri, 04 Jul 2008, Iñaki Baz Castillo wrote:
> # lighttpd running:
> ~# /etc/init.d/lighttpd start ; echo $?
> * Starting web server lighttpd
> [fail]
> 1
[...]
> > Iñaki, if you ever encounter
> > bad init scripts, please report bugs against the offending packages.
>
> In the above case which is the "bad" init script?:

lighttpd obviously. It's not a sensible behaviour to fail when asked to
start a service that is already running.

> - lighttpd uses LSB specs.

This seems to contradict what you told us before about what LSB compliant means
for you. :)

Cheers,
--
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Iñaki Baz Castillo" 07-05-2008 11:18 PM

Clarify what "sensible behaviour" is for init scripts
 
2008/7/4 Raphael Hertzog <hertzog@debian.org>:

>> In the above case which is the "bad" init script?:
>
> lighttpd obviously. It's not a sensible behaviour to fail when asked to
> start a service that is already running.
>
>> - lighttpd uses LSB specs.
>
> This seems to contradict what you told us before about what LSB compliant means
> for you. :)

Opssss, sorry, I meant that "lighttpd DOESN'T use LSB specs but Debian specs".

You say that "it's not a sensible behaviour to fail when asked to
start a service that is already running" but this is the default
behaviour of Debian init scripts (dince --oknodo is optional and of
course not always used).

Thanks for your comments. Best regards.


--
Iñaki Baz Castillo
<ibc@aliax.net>


All times are GMT. The time now is 12:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.