-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26-03-2005 23:43, 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 ]
Or even better (in case "true if" turns out to be a bashism): || [ $? \< 2 ] # catch grep failures - Jonas - -- * 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 iD8DBQFCRecmn7DbMsAkQLgRAg4CAJ9ppcTvG5nZCUdtRNPatQnde9AXpwCaA9j1 tmX+5svWRb0HrC5kut4xKwA= =qkmJ -----END PGP SIGNATURE-----