Signed-off-by: Michael Tokarev <[email protected]>
---
 hooks/zz-busybox |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/hooks/zz-busybox b/hooks/zz-busybox
index d6dd3f5..1846376 100755
--- a/hooks/zz-busybox
+++ b/hooks/zz-busybox
@@ -22,4 +22,13 @@ if [ "${BUSYBOX}" != "n" ] && [ -e ${BUSYBOXDIR}/busybox ]; 
then
        rm -f ${DESTDIR}/bin/busybox
        copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
        ln -s busybox ${DESTDIR}/bin/sh
+       # Create links with other names if not already exist
+       # (for this to work this hook should be the last)
+       # Current busybox may come without --list[-full] support
+       for link in $(${BUSYBOXDIR}/busybox --list-full 2>/dev/null); do
+               if [ ! -e "${DESTDIR}/$link" ]; then
+                       [ -d "${DESTDIR}/${link%/*}" ] || mkdir -p 
"${DESTDIR}/${link%/*}"
+                       ln -s /bin/busybox "${DESTDIR}/$link"
+               fi
+       done
 fi
-- 
1.7.2.3


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
http://lists.debian.org/[email protected]

Reply via email to