summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2015-09-04 14:22:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-19 11:51:34 +0100
commit8897773fe44e8d4d1007405597978e4f7fac4c5d (patch)
treec32ddacb117cb22e1e9dcae445d3f20cf2830da9
parent2e6494e55a4f460cb7e8853fc7ff6da421b7a0fc (diff)
downloadpoky-8897773fe44e8d4d1007405597978e4f7fac4c5d.tar.gz
postinst_intercept: allow to pass variables with spaces
* trying to pass foo="a b" through postinst_intercept ends with the actual script header to containing: b foo=a which fails because "b" command doesn't exist. (From OE-Core rev: c66d7d85b7225be8c838449324d506565dd0081d) (From OE-Core rev: 05af103b9b9141319644cde452afbe73e4c2d226) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/postinst-intercepts/postinst_intercept2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index 27c256834c..517ee101d2 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -48,7 +48,7 @@ if [ -n "$pkgs_line" ]; then
48 sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script 48 sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script
49 fi 49 fi
50else 50else
51 for var in $@; do 51 for var in "$@"; do
52 sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script 52 sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script
53 done 53 done
54 echo "##PKGS: ${package_name} " >> $intercept_script 54 echo "##PKGS: ${package_name} " >> $intercept_script