Re: lintian warnings (help)
Hamish Moffatt <hamish@debian.org> writes:
> On Mon, Apr 13, 1998 at 01:10:12PM -0400, Adam P. Harris wrote:
>> if [ -x /usr/sbin/config-bar ]; then config-bar foo ; fi
>> Therefore I decided this approach was superior:
>> if command -v config-bar >/dev/null 2>&1 ; then config-bar foo ; fi
> Don't both of these assume that config-bar is on the path?
> Although that is reasonable for /usr/sbin, if the path has changed
> as you hypothesise then perhaps the new path is not.
Yes, but you would also, hypothetically, assume that whatever the new
path is (i.e., /usr/sbin/debian or whatever nightmarish nonsense)
would *also* be on the path of any maintainer scripts. This is part
of the specification of maintainer scripts that admin executables are
already on the path and you should not need to hard-code paths in your
scripts. My suggestion, while a bit less readable, makes this more of
a reality.
Note that your objection applies equally well, even better to the
older, more commonly-used method:
if [ -x /usr/sbin/foobar ]; then
foobar ARGS
fi
.....A. P. Harris...apharris@onShore.com...<URL:http://www.onShore.com/>
--
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: