A few peculiarities with the OpenPKG run control system are causing some end user confusion when working with services. (Using openpkg-20070608)

Currently, the system boot init script for OpenPKG is executing 'rc all start'. This results in the %start section getting executed for all scripts regardless of the enable/disable setting.

It is then left up to each individual init script to exit out before doing any work if it's currently disabled. This results in counterintuitive behavior when working with individual services. For example, consider the following:

# openpkg rc openssh start
OpenPKG: start: openssh.

The impression is given that the service appears to have started, when in fact it has not because it's disabled:

# openpkg rc openssh status
OpenPKG: status: openssh.
openssh_enable="no"
openssh_usable="unknown"
openssh_active="no"

Likewise, calling 'openpkg rc openssh stop' does not result in stopping the service, even if it's running for whatever reason.

'openpkg rc openssh status' is even more confusing. If the service happens to be running and is then disabled, the status command will report that the service is not active, which is certainly inaccurate.

Another issue is that during system shutdown openpkg calls 'rc all stop', which executes all of the %stop sections in all scripts. Unfortunately, the %stop sections exit out doing no work if the service is currently marked as disabled. This results in unclean shutdowns for services that may have been running, which were set to disabled at some point.

Standard UNIX init systems allow you to start/stop/status services regardless of the fact they may or may not be enabled for system boot.

It would seem to me that a more standard behavior might be achieved by removing the enable/disable tests from the start/stop/status sections of init scripts. Then change 'rc all start' on system boot to only execute the %start section of scripts which are currently enabled. For shutdown, 'rc all stop' would still execute %stop sections for all scripts; however we leave in the 'active no' tests in the individual init scripts to determine if work needs to be done.

Thoughts/comments?
--
Dan-
______________________________________________________________________
OpenPKG                                             http://openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to