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

Re: start-stop-daemon no respeta LSB en init.d



Iñaki Baz Castillo wrote:
El 31/05/07, Iñaki Baz Castillo <ibc.listas@aliax.net> escribió:

Es decir, por defecto (puesto que ningún script arranca con
"start-stop-daemon --oknodo") TODOS los servicios en Debian devuelven
1 (error) si se hace "start" sobre un servicio y arrancado.

Bueno, me he precipitado. Estoy comprobando que no todos los servicios
lo hacen mal. Por ejemplo SSH devuelve un 1 si le ahces un "start"
estando ya arrancado (mal hecho) pero Apache devuelve 0. Si acaso
estoy mandando bugs por paquete que vea que lo hace mal.

/usr/share/doc/debian-policy/policy.html/ch-opersys.html
The init.d scripts must ensure that they will behave sensibly if invoked
with start when the service is already running, or with stop when it isn't,
and that they don't kill unfortunately-named user processes.
The best way to achieve this is usually to use start-stop-daemon.

A mi me funciona bien..

# start-stop-daemon --oknodo  --exec /usr/sbin/sshd --start
/usr/sbin/sshd already running.
# echo $?
0
# start-stop-daemon --exec /usr/sbin/sshd --start
/usr/sbin/sshd already running.
# echo $?
1

Saludos.
Javi.



Reply to: