SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Tue May 29 11:16:02 CEST 2007


Author: glen
Date: Tue May 29 11:16:01 2007
New Revision: 8626

Modified:
   geninitrd/trunk/geninitrd
Log:
- workaround for BusyBox v1.1.3 (currently in AC)

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Tue May 29 11:16:01 2007
@@ -96,7 +96,17 @@
 	local err=0
 
 	if [ -z "$busybox_functions" ]; then
-		busybox_functions=$(/bin/initrd-busybox 2>&1 | \
+		local tmp=$(/bin/initrd-busybox 2>&1)
+
+		# BusyBox v1.1.3 says applet not found if it's not called 'busybox'.
+		if [[ "$tmp" = *applet\ not\ found* ]]; then
+			local t=$(mktemp -d)
+			ln -s /bin/initrd-busybox $t/busybox
+			local tmp=$($t/busybox 2>&1)
+			rm -rf $t
+		fi
+
+		busybox_functions=$(echo "$tmp" | \
 			sed -ne '/Currently defined functions:/,$p' | \
 		   	xargs | sed -e 's,.*Currently defined functions: ,,'
 		)


More information about the pld-cvs-commit mailing list