Bug#462173: exim4-config: bashism in update-exim4.conf

Marc Haber mh+debian-packages at zugschlus.de
Wed Jan 23 10:59:09 UTC 2008


tags #462173 confirmed pending
thanks

On Wed, Jan 23, 2008 at 12:26:04AM +0100, Michal Politowski wrote:
> update-exim4.conf does not work if /bin/sh is dash
> 
> The preprocess_macro function uses the non-POSIX behaviour of echo in bash,
> which does not interpret escape characters by default.
> In dash the '\n's are POSIX-ly correctly replaced with newlines
> which causes the subsequent sed to fail with unterminated 's' command.

Thanks for spotting this. Fix committed to svn.

Does the attached fix work on your system?

Greetings
Marc

--- debian/debconf/update-exim4.conf    (revision 2228)
+++ debian/debconf/update-exim4.conf    (working copy)
@@ -329,11 +329,11 @@
   macroname="${1:-}"
   shift
   contents="$(lowercase ${@:-empty} | check_ascii_pipe)"
-  echo -n ".ifndef $macroname\n$macroname=$contents\n.endif\n"
+  printf "%s" ".ifndef $macroname\n$macroname=$contents\n.endif\n"
 }

 seed_macro() {
-  UPEX4C_macros="${UPEX4C_macros} $(preprocess_macro "$1" "$2")"
+  UPEX4C_macros="${UPEX4C_macros}$(preprocess_macro "$1" "$2")"
 }

 file2macros() {


-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190





More information about the Pkg-exim4-maintainers mailing list