summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2012-01-10 14:44:42 +0100
committerMatthijs Kooijman <matthijs@stdin.nl>2012-01-10 21:54:58 +0100
commitdbe6a82bc031ecc8d9ba4230350bdd6277f905f6 (patch)
treef11ae59e0df08c1c9420d90243146e8223ae4988 /scripts
parent65f256f8938e5a5832796a95401e5d2338b85292 (diff)
downloadvyos-live-build-dbe6a82bc031ecc8d9ba4230350bdd6277f905f6.tar.gz
vyos-live-build-dbe6a82bc031ecc8d9ba4230350bdd6277f905f6.zip
Make lb_chroot_hooks work with dash.
Apparently, dash doesn't expand shell patterns within a quoted string, whereas bash does. We can't remove the quoting entirely, though, since that would cause problems when $LB_BASE or $_HOOK contains spaces (note that $_HOOK can probably never contain spaces, but let's handle it just in case). Only quoting the expansion of $LB_BASE and $_HOOK, but not the shell pattern should make the hooks work with both bash and dash again.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_chroot_hooks4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks
index 708045919..37f26df28 100755
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -43,10 +43,10 @@ Create_lockfile .lock
# Copying hooks
for _HOOK in ${LB_CHROOT_HOOKS}
do
- if [ -e "${LB_BASE}/hooks/???-${_HOOK}.chroot" ]
+ if [ -e "${LB_BASE}"/hooks/???-"${_HOOK}".chroot ]
then
mkdir -p chroot/root/lb_chroot_hooks
- cp "${LB_BASE}/hooks/???-${_HOOK}.chroot" chroot/root/lb_chroot_hooks
+ cp "${LB_BASE}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
fi
done