On Thu, Oct 18, 2007 at 02:28:19PM -0400, Micah Anderson wrote:
> * Justin Pryzby <[EMAIL PROTECTED]> [071018 08:01]:
> > Package: util-vserver
> > Version: 0.30.212-1
> > 
> > vserver currently does:
> > 
> > |: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
> > 
> > |test -e "$UTIL_VSERVER_VARS" || 
> > |   {
> > |        echo $"Can not find util-vserver installation (the file 
> > '$UTIL_VSERVER_V
> > |ARS' is expected); aborting..." >&2
> > |        exit 1
> > |   }
> 
> Could you be more explicit about where exactly this occurs? Since the
> util-vserver package contains somewhere near 500 files, it would help if
> you were more specific.
Sorry; it occurs in the initscript /etc/init.d/util-vserver.

> > Policy doceument recommends:
> >           test -f <program-executed-later-in-script> || exit 0
> 
> What policy document? Please provide a citation.
Debian policy 9.3.2.

> > So I think this should either be silent and exit 0, or perhaps an
> > earlier test should do something like [ -e /usr/sbin/vserver ] || exit 0.
> > 
> > Then the error message and exit would be automatic, if the script were
> > set -e (hint, hint):
> > 
> > $ . /asdf
> > bash: /asdf: No such file or directory
> > $ echo $?
> > 1
>  
> I dont follow you.
The strong recommendation (6.1, 10.4) is that all scripts are set -e.
Then sourcing a file that doesn't exist causes the Right error message
and you don't need to specifically handle that case.  util-vserver
initscript is not presently set -e and only checks $? exit status a
small handful of times.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to