summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch
diff options
context:
space:
mode:
authorDenis Carikli <denis@eukrea.com>2011-09-06 09:39:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-07 22:54:14 +0100
commite691f43161191a9e93105a0f1e0155bcdc9b6d06 (patch)
treebb2db282cd4aa6af18f0361959aaa6162ba71506 /meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch
parent93ca6d36a525c5d8e6c99f53bb1d03b5d862cbf7 (diff)
downloadpoky-e691f43161191a9e93105a0f1e0155bcdc9b6d06.tar.gz
busybox: update to 1.8.5
(From OE-Core rev: 77571c4d224d5bcc6be944fe3d00309dafe1d512) Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch')
-rw-r--r--meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch b/meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch
deleted file mode 100644
index d2eab8bd1b..0000000000
--- a/meta/recipes-core/busybox/busybox-1.18.4/udhcpc-fix-nfsroot.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1Upstream-Status: Pending
2
3# copy commit message from OE as the patch comment:
4# commit ec4da6df3ad5b8b03446d0dda9c50a2439ae325a
5# Author: Denys Dmytriyenko <denis@denix.org>
6# Date: Wed Feb 4 11:43:18 2009 -0500
7#
8# busybox: fix nfsroot issues with resetting IP and deleting routes
9#
10# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
11Index: busybox-1.15.3/examples/udhcp/simple.script
12===================================================================
13--- busybox-1.15.3.orig/examples/udhcp/simple.script 2010-06-27 12:17:14.116876946 +0200
14+++ busybox-1.15.3/examples/udhcp/simple.script 2010-06-27 12:18:38.607868533 +0200
15@@ -10,10 +10,17 @@
16 BROADCAST="broadcast +"
17 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
18
19+# return 0 if root is mounted on a network filesystem
20+root_is_nfs() {
21+ grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
22+}
23+
24 case "$1" in
25 deconfig)
26+ if ! root_is_nfs ; then
27 echo "Setting IP address 0.0.0.0 on $interface"
28- ifconfig $interface 0.0.0.0
29+ ifconfig $interface 0.0.0.0
30+ fi
31 ;;
32
33 renew|bound)
34@@ -21,15 +28,17 @@
35 ifconfig $interface $ip $NETMASK $BROADCAST
36
37 if [ -n "$router" ] ; then
38- echo "Deleting routers"
39- while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
40- :
41- done
42+ if ! root_is_nfs ; then
43+ echo "Deleting routers"
44+ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
45+ :
46+ done
47+ fi
48
49 metric=0
50 for i in $router ; do
51 echo "Adding router $i"
52- route add default gw $i dev $interface metric $((metric++))
53+ route add default gw $i dev $interface metric $((metric++)) 2>/dev/null
54 done
55 fi
56