Klemens Nanni <[email protected]> wrote:
> Yes I want it to fail, just like reorder_kernel.sh using `set -o errexit'
> does with
>       [ -f /etc/bsd.re-config ] && config -e -c /etc/bsd.re-config -f bsd
> 
> If the config file exists but is invalid, I expect programs using it to fail.

Sorry for the noise. I wasn't aware that `set -e` only takes into
consideration the last command in an AND-OR list and not the exit status
of the AND-OR list itself.

>  install -F -m 700 bsd.rd /bsd.upgrade
> +if [ -f /etc/bsd.re-config ] &&
> +   config -e -c /etc/bsd.re-config -f /bsd.upgrade >/dev/null
>  logger -t sysupgrade -p kern.info "installed new /bsd.upgrade. Old kernel 
> version: $(sysctl -n kern.version)"

Nevertheless, the thing that prompted me to reply was that the current
patch reads `if cmd && something`. It should either what I replied, or
the leading `if` should be dropped.

Reply via email to