ian2 ~ # rc-status Runlevel: default ... snip .... postgrey [ crashed ] ... snip .... Also: ian2 ~ # /etc/init.d/postgrey status * status: crashed But: ian2 ~ # ps -ef | grep postgrey postgrey 841 1 0 11:32 ? 00:00:00 /usr/sbin/postgrey --inet=127.0.0.1:10030 --daemonize --pidfile=/var/run/postgrey.pid --delay=300 --greylist-text=Greylisted for %s seconds Reproducible: Always Steps to Reproduce: 1./etc/init.d/postgrey start 2./etc/init.d/postgrey status Expected Results: /etc/init.d/postgrey status should show status as "started" I dug around using strace, and I found that the "start()" part of /etc/init.d/postgrey so that start-stop-daemon includes a --pidfile=${POSTGREY_PID} entry before the --exec /usr/sbin/postgrey parameter solves the problem. A patch to make this change is as follows: --- /mnt/root-copy/etc/init.d/postgrey 2007-11-15 17:25:50.000000000 +0000 +++ /etc/init.d/postgrey 2009-02-14 11:59:34.000000000 +0000 @@ -75,7 +75,7 @@ POSTGREY_TEXT_ARG="--greylist-text=${POSTGREY_TEXT}" fi - start-stop-daemon --start --quiet --background \ + start-stop-daemon --start --quiet --background --pidfile=${POSTGREY_PID} \ --exec /usr/sbin/postgrey -- \ --${POSTGREY_ADDR} \ --daemonize \
Created attachment 181996 [details] Patch to fix status report under openrc-0.4.3 Attached patch to /etc/init.d/postgrey as a file.
I have tested the patch on a Gentoo installation that is still running baselayout-1.12.11.1 and it works there as well without causing any other side effects as far as I can tell.
(In reply to comment #0) > Reproducible: Always > > Steps to Reproduce: > 1./etc/init.d/postgrey start > 2./etc/init.d/postgrey status # /etc/init.d/postgrey start * Starting Postgrey... [ ok ] # ps axf|grep postgrey 18471 ? Ss 0:00 /usr/sbin/postgrey --inet=127.0.0.1:10030 --daemonize --pidfile=/var/run/postgrey.pid --delay=300 --greylist-text=Greylisted for %s seconds # /etc/init.d/postgrey status * status: started [ebuild R ] sys-apps/openrc-0.4.3-r2 USE="ncurses pam unicode -debug" 143 kB So, can you please re-test this with latest openrc? (If it's still an error for you, well re-open this bugreport please!) Thanks!
I have tested with the following versions: [ebuild R ] sys-apps/openrc-0.4.3-r2 USE="ncurses pam unicode -debug" [ebuild R ] mail-filter/postgrey-1.32 USE="-targrey" test: ian2 ~ # /etc/init.d/postgrey status * status: started Problem solved :-) Many thanks Regards Ian
(In reply to comment #4) > test: > ian2 ~ # /etc/init.d/postgrey status > * status: started > > Problem solved :-) cool!