Request 188 was acted upon. _________________________________________________________________________
URL: https://rt.openpkg.org/id/188 Ticket: [OpenPKG #188] Subject: rc %status Requestors: [EMAIL PROTECTED] Queue: openpkg Owner: Nobody Status: open Transaction: Correspondence added by rse Time: Mon Jul 14 11:46:19 2003 ________________________________________________________________________ > The %{l_prefix}/etc/rc.d/rc.%{name} scripts for daemons should provide > a %status section which returns information about the daemon being up > and running or not. The section always has to exit with return code 0 (i.e. there is always a status) and the status information has to be a valid /bin/sh script containing only variable defintions with variable names prefixed with "<package-name>_". At least two variables have to exist always: <package-name>_usable="yes|no" # meaning: config, license, etc. (in)valid, etc. <package-name>_active="yes|no" # meaning: daemon is running/stopped, etc Supported usage has to be: # rc.myself: %restart eval `rc myself status` if [ ".$myself_active`" = .yes ]; then rc myself stop start fi # myself.spec: %pre eval `rc myself status | tee ${TMPDIR:-/tmp}/myself.status` if [ ".$myself_active`" = .yes ]; then %{l_rc} myself stop fi %post eval `cat ${TMPDIR:-/tmp}/myself.status` if [ ".$myself_active`" = .yes ]; then %{l_rc} myself start fi rm -f ${TMPDIR:-/tmp}/myself.status $ rc myself status myself_usable="yes" myself_active="no" > eval `rc all status` > if [ ".$foo_active" = .yes ]; then > fi -- Ralf S. Engelschall OpenPKG Project Leader [EMAIL PROTECTED]