Re: command -v in postinsts violating policy
On Tue, 28 May 2002 15:53:28 -0400
Matt Zimmerman <mdz@debian.org> wrote:
> On Tue, May 28, 2002 at 02:34:11PM -0500, Adam Heath wrote:
>
> > On Tue, 28 May 2002, Matt Zimmerman wrote:
> > > In this case, I think that this is a sufficiently common problem
> > > that it justifies the existence of a tool. Another such instance
> > > would be a simple program to check for the existence of a user or
> > > group, which seems to be done in all sorts of weird ways in
> > > maintainer scripts.
> >
> > Huh?
> >
> > How does that apply to what I said?
>
> A new tool which does what is desired would eliminate the need to do
> any bogus shell redirection, or worry about subtle shell
> incompatibilities. Since modifying 'which' to be able to be quiet
> could interfere with expected(though obscure) behaviour of 'which',
> the problem could be solved be creating a new program, named something
> else, which would be quiet by default.
Howbout "exists"?
exists -c ls would return true if the "-c"ommand 'ls' is found in $PATH
exists -u jim would return true if jim is a user whose shell is in
/etc/shells
exists -g nogroup would return true if nogroup is a group name
-Jim
> --
> - mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: