[oe-commits] Denys Dmytriyenko : busybox: fix nfsroot issues with resetting IP and deleting routes
GIT User account
git at amethyst.openembedded.net
Wed Feb 4 16:45:37 UTC 2009
Module: openembedded.git
Branch: org.openembedded.dev
Commit: ec4da6df3ad5b8b03446d0dda9c50a2439ae325a
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=ec4da6df3ad5b8b03446d0dda9c50a2439ae325a
Author: Denys Dmytriyenko <denis at denix.org>
Date: Wed Feb 4 11:43:18 2009 -0500
busybox: fix nfsroot issues with resetting IP and deleting routes
---
.../busybox-1.13.2/udhcpc-fix-nfsroot.patch | 40 ++++++++++++++++++++
packages/busybox/busybox_1.13.2.bb | 4 +-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/packages/busybox/busybox-1.13.2/udhcpc-fix-nfsroot.patch b/packages/busybox/busybox-1.13.2/udhcpc-fix-nfsroot.patch
new file mode 100644
index 0000000..39716ec
--- /dev/null
+++ b/packages/busybox/busybox-1.13.2/udhcpc-fix-nfsroot.patch
@@ -0,0 +1,40 @@
+diff -uNr busybox-1.13.2-orig/examples/udhcp/simple.script busybox-1.13.2/examples/udhcp/simple.script
+--- busybox-1.13.2-orig/examples/udhcp/simple.script 2009-02-04 11:08:13.000000000 -0500
++++ busybox-1.13.2/examples/udhcp/simple.script 2009-02-04 11:24:51.000000000 -0500
+@@ -8,22 +8,31 @@
+ [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+ [ -n "$subnet" ] && NETMASK="netmask $subnet"
+
++# return 0 if root is mounted on a network filesystem
++root_is_nfs() {
++ grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
++}
++
+ case "$1" in
+ deconfig)
+- /sbin/ifconfig $interface 0.0.0.0
++ if ! root_is_nfs ; then
++ /sbin/ifconfig $interface 0.0.0.0
++ fi
+ ;;
+
+ renew|bound)
+ /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+
+ if [ -n "$router" ] ; then
+- while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
+- :
+- done
++ if ! root_is_nfs ; then
++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
++ :
++ done
++ fi
+
+ metric=0
+ for i in $router ; do
+- route add default gw $i dev $interface metric $((metric++))
++ route add default gw $i dev $interface metric $((metric++)) 2>/dev/null
+ done
+ fi
+
diff --git a/packages/busybox/busybox_1.13.2.bb b/packages/busybox/busybox_1.13.2.bb
index c8aac79..56f47b3 100644
--- a/packages/busybox/busybox_1.13.2.bb
+++ b/packages/busybox/busybox_1.13.2.bb
@@ -1,11 +1,12 @@
require busybox.inc
-PR = "r9"
+PR = "r10"
SRC_URI = "\
http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
\
file://udhcpscript.patch;patch=1 \
+ file://udhcpc-fix-nfsroot.patch;patch=1 \
file://B921600.patch;patch=1 \
file://r24785.patch;patch=1;status=merged \
file://find-touchscreen.sh \
@@ -37,4 +38,3 @@ do_install_append() {
install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev/
install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/
}
-
More information about the Openembedded-commits
mailing list