* [PATCH] busybox:udhcpc: fix the root_is_nfs() function
@ 2012-07-22 0:46 rongqing.li
2012-07-23 18:34 ` Saul Wold
0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2012-07-22 0:46 UTC (permalink / raw)
To: openembedded-core
From: Roy.Li <rongqing.li@windriver.com>
[YOCTO #2788]
The system will be hung when udhcpc starts, if nfs is mounted
at "/" directory and default route is different after starting
udhcpc.
The cause is that root_is_nfs() does not work after kernel-2.6.37,
since the device name has been changed from /dev/root to
${IPADDR}:${NFSDIR} on /proc/mounts. which leads to remove
the default routes to nfs server,
Now we use a loose match to check if rootfs is nfs.
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
meta/recipes-core/busybox/files/simple.script | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 27368f0..dc2121d 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -10,7 +10,8 @@ RESOLV_CONF="/etc/resolv.conf"
# return 0 if root is mounted on a network filesystem
root_is_nfs() {
- grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
+ sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ \(nfs\|smbfs\|ncp\|coda\)$"
}
have_bin_ip=0
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] busybox:udhcpc: fix the root_is_nfs() function
2012-07-22 0:46 [PATCH] busybox:udhcpc: fix the root_is_nfs() function rongqing.li
@ 2012-07-23 18:34 ` Saul Wold
0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-07-23 18:34 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 07/21/2012 05:46 PM, rongqing.li@windriver.com wrote:
> From: Roy.Li <rongqing.li@windriver.com>
>
> [YOCTO #2788]
>
> The system will be hung when udhcpc starts, if nfs is mounted
> at "/" directory and default route is different after starting
> udhcpc.
>
> The cause is that root_is_nfs() does not work after kernel-2.6.37,
> since the device name has been changed from /dev/root to
> ${IPADDR}:${NFSDIR} on /proc/mounts. which leads to remove
> the default routes to nfs server,
>
> Now we use a loose match to check if rootfs is nfs.
>
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
> meta/recipes-core/busybox/files/simple.script | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
This need a PR bump in the busybox recipe.
Sau!
> diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
> index 27368f0..dc2121d 100644
> --- a/meta/recipes-core/busybox/files/simple.script
> +++ b/meta/recipes-core/busybox/files/simple.script
> @@ -10,7 +10,8 @@ RESOLV_CONF="/etc/resolv.conf"
>
> # return 0 if root is mounted on a network filesystem
> root_is_nfs() {
> - grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
> + sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
> + grep -q "^/ \(nfs\|smbfs\|ncp\|coda\)$"
> }
>
> have_bin_ip=0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-23 18:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-22 0:46 [PATCH] busybox:udhcpc: fix the root_is_nfs() function rongqing.li
2012-07-23 18:34 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox