Bug#426858: openssh-server: init script should use --oknodo for "start" action
Package: openssh-server
Version: 1:4.3p2-9
Severity: normal
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
"/etc/init.d/ssh start" should return 0 even if SSH daemon was already
runnning, as the specs of LSB:
http://www.linux-foundation.org/spec/refspecs/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
http://www.opencf.org/home.html
They say:
"For all other init-script actions, the init script shall return an exit
status of zero if the action was successful. Otherwise, the exit status
shall be non-zero, as defined below. In addition to straightforward
success, the following situations are also to be considered successful:
- Restarting a service (instead of reloading it) with the force-reload
argument
- Running start on a service already running
- Running stop on a service already stopped or not running
- Running restart on a service already stopped or not running
- Running try-restart on a service already stopped or not running"
But /etc/init.d/ssh use the following line for "start" action:
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid --exec
/usr/sbin/sshd -- $SSHD_OPTS
It should use --oknodo to return 0 even if nothing ocurred because the
action.
Other actions return 0 correctly.
Reply to: