Unslung: /usr/bin/mkfs.ext3 - strange script to workaround an mke2fs failure
authorMike Westerhof <mwester@dls.net>
Tue, 12 Jun 2007 03:58:23 +0000 (03:58 +0000)
committerMike Westerhof <mwester@dls.net>
Tue, 12 Jun 2007 03:58:23 +0000 (03:58 +0000)
packages/nslu2-binary-only/unslung-rootfs/mkfs.ext3 [new file with mode: 0755]
packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb

diff --git a/packages/nslu2-binary-only/unslung-rootfs/mkfs.ext3 b/packages/nslu2-binary-only/unslung-rootfs/mkfs.ext3
new file mode 100755 (executable)
index 0000000..49a88c0
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Fix obscure problem - redirect stdout iff mkfs.ext3
+# is being invoked by the Linksys GUI format utility.
+#
+u=`/bin/pidof utility.cgi`
+if [ ! -f "/tmp/Preparing" -o "x${u}" = "x" -o \
+     "y${1}" != "y-m" -o "z${2}" != "z1" ]
+then
+  /usr/bin/mke2fs -j $@
+else
+  /usr/bin/mke2fs -j $@ >/tmp/mkfs.$$.log
+fi
index dab61db..23b240d 100644 (file)
@@ -1,7 +1,7 @@
 SECTION = "base"
 COMPATIBLE_MACHINE = "nslu2"
 
-PR = "r18"
+PR = "r19"
 
 DEPENDS = "nslu2-linksys-libs nslu2-linksys-sambacodepages"
 
@@ -55,6 +55,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
           file://upgrade.htm \
           file://telnet.htm \
           file://rc.bootbin \
+          file://mkfs.ext3 \
           "
 
 S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r63"
@@ -163,6 +164,10 @@ do_compile () {
        rm -f ${S}/bin/busybox
        ln -s slingbox ${S}/bin/busybox
 
+       # Add in the kludge to fix the strange Linksys GUI format problem.
+       rm -f ${S}/usr/bin/mkfs.ext3
+       install -m 755 ${WORKDIR}/mkfs.ext3 ${S}/usr/bin/mkfs.ext3
+
        # No reason not to have a home directory for root...
        mkdir -p ${S}/root
        chmod 755 ${S}/root