[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 3/5] don't copy busybox to sh, use link instead



mkinitramfs uses cpio --dereference, so it copies each symlink
as its target not as symlink.  In order to compensate for that,
use hard link instead.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hooks/busybox |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hooks/busybox b/hooks/busybox
index d6acd20..d6dd3f5 100755
--- a/hooks/busybox
+++ b/hooks/busybox
@@ -20,5 +20,6 @@ if [ "${BUSYBOX}" != "n" ] && [ -e ${BUSYBOXDIR}/busybox ]; then
 	. /usr/share/initramfs-tools/hook-functions
 	rm -f ${DESTDIR}/bin/sh
 	rm -f ${DESTDIR}/bin/busybox
-	copy_exec ${BUSYBOXDIR}/busybox /bin/sh
+	copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+	ln -s busybox ${DESTDIR}/bin/sh
 fi
-- 
1.7.2.3


Reply to: