On Mon, Mar 20, 2006, Bernhard Reiter wrote: >Am Montag, 20. März 2006 13:32 schrieb Bernhard Reiter: >> Using OpenPKG 2.5 > >> b) postfix >> /kolab/sbin/postfix start >> failed, because of an old master.pid (without process). >> The message of postfix-scripts did not end up in the logs >> and openpkg did not fail. > >This was more complicated then I have thought. >On a start attempt, OpenPKG will do > rcService postfix enable yes || exit 0 > rcService postfix active yes && exit 0 > /kolab/sbin/postfix start > >The "rcService postfix active yes" line will call rc.kolab status >which again calls master -t to test if the postfix is running or not. >For whatever reasons "master -t" did return that postfix was still active, >this probably was the stale lock. So the script of OpenPKG just >did not try to restart postfix without any error message. > >Note that /kolab/sbin/postfix start would >end up running /kolab/sbin/postfix-script >which would have done the same test, >but would have issued an error message. > >The main problem with this approach >is that a non-negative return code of "master -t" >cannot be used as a test that postfix is active. >It means: postfix is active or the application is broken. > >In case of the special situation described, >OpenPKG behaves badly. >There does not seem to be an easy remedy. >I did not discover a test if postfix is actually running, >so the line cannot easily be exchanged. >Maybe looking for "master" in the process table in addition to master -t, >would make this test more robust.
Perhaps it would be better to use the standard tests on %{l_prefix}/var/postfix/pid/master.pid instead of the one calling master -t? I know there was a problem with using the postgresql native tests because they didn't detect a stale pid file. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc. URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``But how is this legal plunder to be identified? Quite simply. See if the law takes from some persons what belongs to them, and gives it to other persons to whom it does not belong. See if the law benefits one citizen at the expense of another by doing what the citizen himself cannot do without committing a crime.'' -- Frederic Bastiat, The Law ______________________________________________________________________ The OpenPKG Project www.openpkg.org User Communication List openpkg-users@openpkg.org