Date: Thu, 23 Feb 2006 20:48:43 -0800 From: Wes Peters <wes@softweyr.com> To: Doug Barton <dougb@freebsd.org> Cc: ports@freebsd.org, n j <nino80@gmail.com>, wes@freebsd.org Subject: Re: FreeBSD Port: mimedefang-2.54 Message-ID: <200602232048.44264.wes@softweyr.com> In-Reply-To: <84744679-A063-4E88-8B5F-74DA156920CD@opensail.org> References: <92bcbda50602080058s2dc1d954y49b2a0dd37b91f55@mail.gmail.com> <43EAF082.50201@FreeBSD.org> <84744679-A063-4E88-8B5F-74DA156920CD@opensail.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_sAp/DgPf7phygJF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 10 February 2006 23:47, you wrote: > On Feb 8, 2006, at 11:34 PM, Doug Barton wrote: > > n j wrote: > >> Hello, > >> > >> Don't know if this has been reported and/or fixed... > >> > >> After installing mimedefang, the attempt to start it using rc.d > >> startup script, mimedefang.sh, succeeds, but reports the following: > >> > >> "Starting mimedefang: [: > >> missing ] > >> [ OK ]" > >> > >> A few hours later (well, I'm no expert) :), I figured what's wrong > >> with the installation. It appears that startup script has a bug. On > >> lines 180 and 218, a space is missing before the closing square > >> bracket, after the SPOOLDIR variable: > >> the line should read [ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR" > >> instead > >> of [ -n "$SPOOLDIR"] && echo "-z $SPOOLDIR" (note the space). > > > > Good catch. This is actually a bug in the script as provided by the > > vendor, > > so you might want to report this upstream as well. > > This is caused by David (Skoll, creator of mimedefang) using bash as > the system shell (like all good Linux kiddies). I'll fix the port > and report it to David. Getting rid of the stupid "OK" garbage would > be nice, too. OK, so this is fixed in the latest MIMEdefang. David Skoll is a great guy and very responsive to bug reports. On the other hand, I'd still prefer to get rid of the Linux/SVR34 [ OK ]/[FAILED] silliness, so I have a patch for that. Given that I managed this immediately AFTER ports freeze, it won't show up until after the 5.5/6.1 cycle, my bad. I've attached the patch file if you want to try it, just dump it in the port files/ directory and have at it. > Note: yes, I used mimedefang, but not this script. We have custom > perl modules that start every piece of our system. > > >> While I'm at it, it would be nice if mimedefang installation somehow > >> modified sendmail startup script to automatically start > >> mimedefang, as > >> sendmail with mimedefang configured but not started doesn't work > >> anyway. But this is more of an idea to think about than an RFE :). > > > > One way to handled this (and in fact it would be preferred at this > > point) > > would be to install this init-script in ${PREFIX}/libexec (perhaps as > > mimedefang-init), and write a simple rc.d script that called that > > script at > > boot. The example in the Porter's Handbook could be simplified and > > used in > > this situation. > > I'll take a look at it. Once the mimedefang startup script works, > it's not clear that this is a problem. I'll get to this after the release cycle is done. Having it start with a properly coded rc.d script that configures the way FreeBSD expects will be a big win. Sorry I didn't have enough spare time to fix it before the release. It should be a pretty simple script, but ENOTIME. -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com --Boundary-00=_sAp/DgPf7phygJF Content-Type: text/x-diff; charset="iso-8859-1"; name="patch-init-script.in" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-init-script.in" --- examples/init-script.in.orig Thu Feb 23 20:25:04 2006 +++ examples/init-script.in Thu Feb 23 20:27:56 2006 @@ -174,7 +174,7 @@ fi fi - printf "%-60s" "Starting $prog-multiplexor: " + echo -n "Starting $prog-multiplexor: " rm -f $MX_SOCKET > /dev/null 2>&1 if [ "$MX_EMBED_PERL" = "yes" ] ; then EMBEDFLAG=-E @@ -210,14 +210,14 @@ -s $MX_SOCKET RETVAL=$? if [ $RETVAL = 0 ] ; then - echo "[ OK ]" + echo "OK" else - echo "[FAILED]" + echo "failed" return 1 fi # Start mimedefang - printf "%-60s" "Starting $prog: " + echo -n "Starting $prog: " rm -f $SOCKET > /dev/null 2>&1 $PROGDIR/$prog -P $PID -R $LOOPBACK_RESERVED_CONNECTIONS \ -m $MX_SOCKET \ @@ -234,9 +234,9 @@ -p $SOCKET RETVAL=$? if [ $RETVAL = 0 ] ; then - echo "[ OK ]" + echo "OK" else - echo "[FAILED]" + echo "failed" kill `cat $MXPID` return 1 fi @@ -245,7 +245,7 @@ stop_it() { # Stop daemon - printf "%-60s" "Shutting down $prog: " + echo -n "Shutting down $prog: " if test -f "$PID" ; then kill `cat $PID` RETVAL=$? @@ -253,13 +253,13 @@ RETVAL=1 fi if [ $RETVAL = 0 ] ; then - echo "[ OK ]" + echo "OK" else - echo "[FAILED]" + echo "failed" fi # Stop daemon - printf "%-60s" "Shutting down $prog-multiplexor: " + echo -n "Shutting down $prog-multiplexor: " if test -f "$MXPID" ; then kill `cat $MXPID` RETVAL=$? @@ -267,9 +267,9 @@ RETVAL=1 fi if [ $RETVAL = 0 ] ; then - echo "[ OK ]" + echo "OK" else - echo "[FAILED]" + echo "failed" fi rm -f $MX_SOCKET > /dev/null 2>&1 --Boundary-00=_sAp/DgPf7phygJF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602232048.44264.wes>