Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: Dirkjan Ochtman <djc@g.o>, Peter Volkov <pva@g.o>
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild
Date: Tue, 12 Oct 2010 20:20:39
Message-Id: 201010121617.29788.vapier@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild by Dirkjan Ochtman
1 On Tuesday, October 12, 2010 16:09:06 Dirkjan Ochtman wrote:
2 > On Fri, Oct 1, 2010 at 15:07, Peter Volkov wrote:
3 > >> if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ; then
4 > >
5 > > I'd suggested [ -e /etc/openvpn/*/local.conf ] here, but probably there
6 > > are better alternatives. Also ${ROOT} is missed here.
7 >
8 > I've put ${ROOT} in, are there no better alternatives? I don't think
9 > anyone mentioned any.
10
11 [ -e ] will break with multiple files (which is the whole point of the glob ?)
12
13 you could use find, but that doesnt really seem any better than the ls (which
14 btw will spill errors if no local.conf exists):
15 find "${ROOT}"/etc/openvpn/*/ -maxdepth 1 -name local.conf >/dev/null
16 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature