withlib.in: Fix bashism (`export VAR=VALUE'). 1.0.7
authorMark Wooding <mdw@distorted.org.uk>
Fri, 10 Jun 2011 20:00:07 +0000 (21:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 10 Jun 2011 20:00:07 +0000 (21:00 +0100)
For some reason, under `dash', this causes (say) `noip' to work
correctly for exactly one level of nesting.  An attempt to invoke a
nested `noip' results in

export: 4: noip.so: bad variable name

This appears to be a result of `dash' doing word splitting too early.

debian/changelog
withlib.in

index f16f09c..b1c2e21 100644 (file)
@@ -1,3 +1,9 @@
+preload-hacks (1.0.7) experimental; urgency=low
+
+  * Fix bashism (`export VAR=VALUE') in driver scripts.
+
+ -- Mark Wooding <mdw@distorted.org.uk>  Fri, 10 Jun 2011 20:54:49 +0100
+
 preload-hacks (1.0.6) experimental; urgency=low
 
   * Fix premature strlen(3) call in decode_inet_addr.
index 47e19d1..51d6a87 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
 set -e
-export LD_PRELOAD=$LD_PRELOAD${LD_PRELOAD+ }@lib@.so
+LD_PRELOAD=${LD_PRELOAD+$LD_PRELOAD }@lib@.so; export LD_PRELOAD
 [ $# -eq 0 ] && set -- "${SHELL-/bin/sh}"
 exec "$@"