1 |
On Tuesday, October 12, 2010 16:26:31 Jeroen Roovers wrote: |
2 |
> On Tue, 12 Oct 2010 22:09:06 +0200 Dirkjan Ochtman wrote: |
3 |
> > On Fri, Oct 1, 2010 at 15:07, Peter Volkov wrote: |
4 |
> > > [a very thorough review of the openvpn ebuild] |
5 |
> > |
6 |
> > Thanks for reviewing, I've fixed most of the issues. |
7 |
> > |
8 |
> > >> if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ; |
9 |
> > >> |
10 |
> > >> then |
11 |
> > > |
12 |
> > > I'd suggested [ -e /etc/openvpn/*/local.conf ] here, but probably |
13 |
> > > there are better alternatives. Also ${ROOT} is missed here. |
14 |
> > |
15 |
> > I've put ${ROOT} in, are there no better alternatives? I don't think |
16 |
> > anyone mentioned any. |
17 |
> |
18 |
> for foo in ${ROOT}/etc/openvpn/*/local.conf; do |
19 |
> [ -e ${foo} ] && bar ${foo} |
20 |
> done |
21 |
> |
22 |
> If no ${ROOT}/etc/openvpn/*/local.conf is found, it returns the exact |
23 |
> string; which doesn't exist so Nothing Happens. |
24 |
|
25 |
i'd say doing a loop is worse than a `ls` hack. and this has quoting |
26 |
problems, but that's ancillary ... |
27 |
-mike |