On Tuesday, October 12, 2010 16:26:31 Jeroen Roovers wrote:
> On Tue, 12 Oct 2010 22:09:06 +0200 Dirkjan Ochtman wrote:
> > On Fri, Oct 1, 2010 at 15:07, Peter Volkov wrote:
> > > [a very thorough review of the openvpn ebuild]
> > 
> > Thanks for reviewing, I've fixed most of the issues.
> > 
> > >>       if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ;
> > >> 
> > >> then
> > > 
> > > I'd suggested [ -e /etc/openvpn/*/local.conf ] here, but probably
> > > there are better alternatives. Also ${ROOT} is missed here.
> > 
> > I've put ${ROOT} in, are there no better alternatives? I don't think
> > anyone mentioned any.
> 
> for foo in ${ROOT}/etc/openvpn/*/local.conf; do
>       [ -e ${foo} ] && bar ${foo}
> done
> 
> If no ${ROOT}/etc/openvpn/*/local.conf is found, it returns the exact
> string; which doesn't exist so Nothing Happens.

i'd say doing a loop is worse than a `ls` hack.  and this has quoting 
problems, but that's ancillary ...
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to