[oe-commits] Leon Woestenberg : busybox-1.11.3: udhcpd script: Do not deconfig network interface iff rootfs on nfs.
GIT User account
git at amethyst.openembedded.net
Tue Jan 6 13:51:16 UTC 2009
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 3ff023a25bacf4f0aebcc05f746c2deec9f21d34
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=3ff023a25bacf4f0aebcc05f746c2deec9f21d34
Author: Leon Woestenberg <leon at witty.(none)>
Date: Tue Jan 6 14:39:22 2009 +0100
busybox-1.11.3: udhcpd script: Do not deconfig network interface iff rootfs on nfs.
---
packages/busybox/busybox-1.11.3/udhcpscript.patch | 25 ++++++++++++++++++--
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/packages/busybox/busybox-1.11.3/udhcpscript.patch b/packages/busybox/busybox-1.11.3/udhcpscript.patch
index fc21d44..cad56d2 100644
--- a/packages/busybox/busybox-1.11.3/udhcpscript.patch
+++ b/packages/busybox/busybox-1.11.3/udhcpscript.patch
@@ -3,9 +3,28 @@
# Patch managed by http://www.holgerschurig.de/patcher.html
#
---- busybox-1.00-rc3/examples/udhcp/simple.script~udhcpscript
-+++ busybox-1.00-rc3/examples/udhcp/simple.script
-@@ -17,8 +17,7 @@
+Index: busybox-1.11.3/examples/udhcp/simple.script
+===================================================================
+--- busybox-1.11.3.orig/examples/udhcp/simple.script 2008-06-25 14:51:33.000000000 +0200
++++ busybox-1.11.3/examples/udhcp/simple.script 2009-01-06 14:34:40.000000000 +0100
+@@ -8,17 +8,23 @@
+ [ -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
More information about the Openembedded-commits
mailing list