All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] busybox: fix udhcp check for NFS rootfs for new	style /proc/mounts
Date: Wed, 23 Feb 2011 22:26:23 -0500	[thread overview]
Message-ID: <20110224032623.GA17536@denix.org> (raw)
In-Reply-To: <4D65C99F.5060909@opendreambox.org>

On Thu, Feb 24, 2011 at 03:59:43AM +0100, Andreas Oberritter wrote:
> 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?

Andreas,

As I mentioned in the patch description:

* The regexp in grep can be simplified and rolled into one, but may become
less strict...

So, it's definitely possible, but I was worried the regexp would become too 
loose and return false positives. Plus, I'm not sure how \S\+ would work on 
spaces in the pathname, such as My\ Documents.

> > 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?

That can be done, if people feel strongly about it...

-- 
Denys



      reply	other threads:[~2011-02-24  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24  1:31 [PATCH] busybox: fix udhcp check for NFS rootfs for new style /proc/mounts Denys Dmytriyenko
2011-02-24  2:59 ` Khem Raj
2011-02-24  2:59 ` Andreas Oberritter
2011-02-24  3:26   ` Denys Dmytriyenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110224032623.GA17536@denix.org \
    --to=denis@denix.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.