OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 24-Apr-2004 23:34:44 Branch: HEAD Handle: 2004042422344201 Modified files: openpkg-src/openldap openldap.spec rc.openldap Log: try to improve rc handling with regard to slapd/slurpd independence; start and stop both independent of the others state; status show active when either is running; in all those cases, handle slurpd only if configured Summary: Revision Changes Path 1.109 +1 -1 openpkg-src/openldap/openldap.spec 1.22 +17 -7 openpkg-src/openldap/rc.openldap ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/openldap/openldap.spec ============================================================================ $ cvs diff -u -r1.108 -r1.109 openldap.spec --- openpkg-src/openldap/openldap.spec 23 Apr 2004 11:33:41 -0000 1.108 +++ openpkg-src/openldap/openldap.spec 24 Apr 2004 21:34:42 -0000 1.109 @@ -34,7 +34,7 @@ Group: Database License: GPL Version: 2.2.11 -Release: 20040423 +Release: 20040424 # package options %option with_fsl yes @@ . patch -p0 <<'@@ .' Index: openpkg-src/openldap/rc.openldap ============================================================================ $ cvs diff -u -r1.21 -r1.22 rc.openldap --- openpkg-src/openldap/rc.openldap 19 Apr 2004 13:46:46 -0000 1.21 +++ openpkg-src/openldap/rc.openldap 24 Apr 2004 21:34:43 -0000 1.22 @@ -23,26 +23,36 @@ openldap_slurpd_signal () { [ -f $openldap_slurpd_pidfile ] && kill -$1 `cat $openldap_slurpd_pidfile` } + openldap_slurpd_needed () { + [ ".`grep '^replogfile' $openldap_slapd_cfgfile`" != . ] && return 0 + return 1 + } %status -u @l_susr@ -o openldap_usable="unknown" openldap_active="no" rcService openldap enable yes && \ openldap_slapd_signal 0 && openldap_active="yes" + rcService openldap enable yes && openldap_slurpd_needed && \ + openldap_slurpd_signal 0 && openldap_active="yes" echo "openldap_enable=\"$openldap_enable\"" echo "openldap_usable=\"$openldap_usable\"" echo "openldap_active=\"$openldap_active\"" %start -p 300 -u @l_susr@ rcService openldap enable yes || exit 0 - rcService openldap active yes && exit 0 - flags="$openldap_flags" - echo $flags | grep -- -h >/dev/null - if [ $? -ne 0 -a ".$openldap_url" != . ]; then - flags="$flags -h \"$openldap_url\"" + openldap_slapd_signal 0 + if [ $? -ne 0 ]; then + flags="$openldap_flags" + echo $flags | grep -- -h >/dev/null + if [ $? -ne 0 -a ".$openldap_url" != . ]; then + flags="$flags -h \"$openldap_url\"" + fi + eval @l_prefix@/libexec/openldap/slapd $flags fi - eval @l_prefix@/libexec/openldap/slapd $flags - if [ ".`grep '^replogfile' $openldap_slapd_cfgfile`" != . ]; then + openldap_slurpd_needed || exit 0 + openldap_slurpd_signal 0 + if [ $? -ne 0 ]; then @l_prefix@/libexec/openldap/slurpd fi @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]