[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/shells management

On Sun, 2003-09-07 at 17:23, Branden Robinson wrote:
> Man, that's ugly.  I use:
> if [ -n "$var" ]; then
> fi

I have been using

    if [ "$var" ]; then

I hope that's kosher too; otherwise I have a few scripts to fix.

> for this sort of thing.  However, that does depend on a certain other
> case you handle never happening:
> >     elif test -z "$2" -o "$2" = "<unknown>"; then
> file:///usr/share/doc/debian-policy/policy.html/ch-maintainerscripts.html
> is my Bible when I'm writing/editing maintainer scripts.  It's
> documented nowhere that I need to handle the argument '<unknown>'.
> Where did you come by this, and if it's something we should worry about,
> why isn't it documented in Policy?

Look at section 6.6:

> If there is no most recently configured version dpkg will pass a null
> argument; older versions of dpkg may pass <unknown> (including the
> angle brackets) in this case. Even older ones do not pass a second
> argument at all, under any circumstances.

Thomas Hood <jdthood@yahoo.co.uk>

Reply to: