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.
This commit is contained in:
parent
65f256f893
commit
dbe6a82bc0
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue