[oe] [PATCH] busybox: fix udhcp check for NFS rootfs for new style /proc/mounts
Andreas Oberritter
obi at opendreambox.org
Thu Feb 24 02:59:43 UTC 2011
Hello Denys,
On 02/24/2011 02:31 AM, Denys Dmytriyenko wrote:
> diff --git a/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch b/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch
> new file mode 100644
> index 0000000..46aaab9
> --- /dev/null
> +++ b/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch
> @@ -0,0 +1,16 @@
> +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 2011-02-23 00:30:32.000000000 -0500
> ++++ busybox-1.13.2/examples/udhcp/simple.script 2011-02-23 17:05:37.873381763 -0500
> +@@ -10,7 +10,12 @@
> +
> + # return 0 if root is mounted on a network filesystem
> + root_is_nfs() {
> ++ # old style mounts
> + grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
> ++ if ! $? ; then
> ++ # new style mounts
> ++ grep -qe '^.*:.* / \(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
> ++ fi
Would "grep -qe '^\S\+ / \(nfs\|smbfs\|ncp\|coda\) ' /proc/mounts" work
for both cases?
> diff --git a/recipes/busybox/busybox_1.1x.inc b/recipes/busybox/busybox_1.1x.inc
> index 7623944..aefa57f 100644
> --- a/recipes/busybox/busybox_1.1x.inc
> +++ b/recipes/busybox/busybox_1.1x.inc
> @@ -5,6 +5,7 @@ SRC_URI = "\
> file://fdisk_nios2.patch \
> file://udhcpscript.patch \
> file://udhcpc-fix-nfsroot.patch \
> + file://udhcpc-new-nfsroot.patch \
Should the two patches above be merged into a single patch?
Regards,
Andreas
More information about the Openembedded-devel
mailing list