-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27-03-2005 00:13, Steve Langasek wrote:
> On Sat, Mar 26, 2005 at 11:43:07PM +0100, Jonas Smedegaard wrote:
> 
>>On 26-03-2005 14:37, Darren Salt wrote:
> 
> 
>>>--- uw-imap-2002edebian1.orig/debian/uw-imapd.preinst
>>>+++ uw-imap-2002edebian1/debian/uw-imapd.preinst
>>>@@ -1,7 +1,5 @@
>>> #!/bin/sh
>>> 
>>>-set -e
>>>-
>>> PROGRAM=uw-imapd
>>> 
>>> MY_FILE=/var/cache/${PROGRAM}_inetd.conf_copy
>>>@@ -12,5 +10,6 @@
>>>     # will remove entries from /etc/inetd.conf, so we save them for
>>>     # restoring them in the postinst.
>>>     grep -E "^([# ]+|#<off># +)?imap[23s]" /etc/inetd.conf >>"$MY_FILE"
>>>+    RET=$?; test "$RET" \> 1 && exit "$RET"
>>> fi
> 
> 
>>I really don't like diabling the "set -e" completely. Is the problem not
>>with the grep lines only?
> 
> 
>>To keep the code compact I'd just append this to the grep lines:
> 
> 
>>   || true if [ $? \< 2 ]
> 
> 
>>Do you see a problem with that?
> 
> 
> It's not POSIX sh syntax?

" true if " is actually a waste. The following is POSIXly correct, I beieve:

   || [ $? \< 2 ]


or must it instead be this:

   || test $? \< 2



 - Jonas

P.S.

Where to find good info on POSIX sh syntax?


- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCRfB4n7DbMsAkQLgRAoHCAJ9BOgp40ovs8ipthq9pvadUIDcevwCcD2Am
Cbaq7Rmu294psuyoCvD/qVY=
=w0Gq
-----END PGP SIGNATURE-----

Reply via email to