All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: tests, clean up scripts
Date: Tue, 10 Mar 2015 14:10:19 +0100	[thread overview]
Message-ID: <20150310131019.GA20767@suse.cz> (raw)
In-Reply-To: <54FE43BA.5080206@cn.fujitsu.com>

On Tue, Mar 10, 2015 at 09:07:06AM +0800, Qu Wenruo wrote:
> > +SUDO_HELPER=
> > +NEED_SUDO_VALIDATE=unknown
> Better quoted?

Not needed here, no sideefects from evaluation and no special chars.

> > @@ -86,15 +86,16 @@ setup_root_helper()
> >   	if [ $UID -eq 0 ]; then
> >   		return
> >   	fi
> > -	# Test for old sudo or special setting, which makes sudo -v fails even
> > -	# user is set NOPASSWD
> > -	sudo -n true &> /dev/null && need_validate=0
> > +
> > +	# Test for old sudo or special settings, which make sudo -v fail even
> > +	# if user setting is NOPASSWD
> > +	sudo -n /bin/true &>/dev/null && NEED_SUDO_VALIDATE=no
> >
> >   	# Newer sudo or default sudo setting
> > -	sudo -v -n &> /dev/null && need_validate=1
> > +	sudo -v -n &>/dev/null && NEED_SUDO_VALIDATE=yes
> >
> > -	if [ $need_validate -eq -1 ]; then
> > -		_not_run "Need validate root privilege"
> > +	if [ "$NEED_SUDO_VALIDATE" = 'yes' ]; then
> Shouldn't it be "$NEED_SUDO_VALIDATE" = 'unknown'?

Right, thanks for catching  it.

      reply	other threads:[~2015-03-10 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 11:33 [PATCH] btrfs-progs: tests, clean up scripts David Sterba
2015-03-10  1:07 ` Qu Wenruo
2015-03-10 13:10   ` David Sterba [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=20150310131019.GA20767@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    /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.