Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2007 01:14:10 +0200
From:      Dejan Lesjak <dejan.lesjak@ijs.si>
To:        Andrew Partan <asp@partan.com>
Cc:        freebsd-x11@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: HEADS UP: xorg 7.2 ready for testing
Message-ID:  <200705120114.11605.dejan.lesjak@ijs.si>
In-Reply-To: <20070511224209.GA79623@partan.com>
References:  <20070510212817.GA67897@xor.obsecurity.org> <200705112347.37431.dejan.lesjak@ijs.si> <20070511224209.GA79623@partan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 12 May 2007 00:42:09 Andrew Partan wrote:
> On Fri, May 11, 2007 at 05:11:05PM -0400, Andrew Partan wrote:
> > Tools/scripts/mergebase.sh correctly disabled local_startup but it
> > didn't correctly disable local_periodic.
>
> This turns out to be a bug in /etc/defaults/periodic.conf.
> For some reason, when called from mergebase.sh, this bit does not work:
> 	[ -r $i ] && . $i
> but this does:
> 	if [ -r $i ]; then
> 		. $i
> 	fi
>

Yet using

. /etc/defaults/periodic.conf ; source_periodic_confs ; echo ${local_periodic}

seems to do the right thing (ie. it still sources /etc/periodic.conf) while 
using "&&" fails as source_periodic_confs returns 1. I'm not sure why, but I 
guess this would do for the needs of mergebase.sh.
Thanks for digging into this!

Ah, the problem would be that since /etc/periodic.conf.local (the last file 
checked by default) is not readable, the version
  [ -r $i ] && . $i
returns 1 and if..fi version returns 0:

% sh  
# if [ -r /foo ]; then echo bar; fi; echo $?
0
# [ -r /foo ] && echo bar ; echo $?
1


Dejan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705120114.11605.dejan.lesjak>