Re: [PATCH] btrfs-progs: tests, clean up scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux