Bug#314238: bashism in /etc/init.d/postgrey

2005-06-15 Thread Roberto Suarez Soto
Package: postgrey
Version: 1.21-2
Severity: important

There's a bashism in the init.d script of postgrey. The net effect is
this:

cheetah:~# /etc/init.d/postgrey start
/etc/init.d/postgrey: 37: [[: not found
Starting postfix greylisting daemon: postgreyOption greylist-text
requires an argument

The line that causes the problem is this:

if [[ $POSTGREY_TEXT =  ]]; then

I'm using dash as /bin/sh, and he seems not to like those [[
thingies :-) Changing /bin/sh to /bin/bash solves the problem,
though I think that simply using simple brackets in the previous line
would be a better solution.

I've flagged this as important because I stopped receiving mail (i.e.,
mail from external sources) when I upgraded and I didn't realize that
postgrey hadn't started correctly (mind you, I had a long list of
packages to upgrade). If I hadn't logcheck working, I might have not
realized until later, and it could be a serious problem.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.9-skas-skas3-v7
Locale: LANG=gl:es:en, LC_CTYPE=gl:es:en (charmap=ISO-8859-1) (ignored: LC_ALL 
set to gl_ES)

Versions of packages postgrey depends on:
ii  debconf   1.4.51 Debian configuration management sy
ii  libberkeleydb-perl0.26-3 use Berkeley DB 4 databases from P
ii  libnet-dns-perl   0.48-1 Perform DNS queries from a Perl sc
ii  libnet-server-perl0.87-3 An extensible, general perl server
ii  perl  5.8.7-3Larry Wall's Practical Extraction 
ii  ucf   1.18   Update Configuration File: preserv

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#314238: bashism in /etc/init.d/postgrey

2005-06-15 Thread Adrian von Bidder
tags 314238 +pending
thanks

On Wednesday 15 June 2005 12.39, Roberto Suarez Soto wrote:
 Package: postgrey
 Version: 1.21-2
 Severity: important

   There's a bashism in the init.d script of postgrey. The net effect is
   this:


[...]

   if [[ $POSTGREY_TEXT =  ]]; then

Sorry about that, I think '-z' would be ok, could you verify this please?  
(patch below)

thanks for the report

greetings
-- vbi

Index: debian/postgrey.init
===
--- debian/postgrey.init(revision 899)
+++ debian/postgrey.init(working copy)
@@ -30,7 +30,7 @@
 fi

 POSTGREY_OPTS=--pidfile=$PIDFILE --daemonize $POSTGREY_OPTS
-if [[ $POSTGREY_TEXT =  ]]; then
+if [ -z $POSTGREY_TEXT ]; then
 POSTGREY_TEXT_OPT=
 else
 POSTGREY_TEXT_OPT=--greylist-text=$POSTGREY_TEXT



-- 
The program is absolutely right; therefore the computer must be wrong.


pgpofBTkLdfj0.pgp
Description: PGP signature


Bug#314238: bashism in /etc/init.d/postgrey

2005-06-15 Thread Roberto Suarez Soto
On Jun/15/2005, Adrian von Bidder wrote:

  if [[ $POSTGREY_TEXT =  ]]; then
 Sorry about that, I think '-z' would be ok, could you verify this please?  

Yes, verified, works ok too :-)

-- 
Roberto Suarez Soto



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]