On 02/24/2010 01:17 PM, Eric Blake wrote:
According to Cole Robinson on 2/24/2010 10:55 AM:
> >From time to time I bork my install, and hate it when the initscript
> returns no info. This patch makes things a bit more clear.
>
> +LIBVIRTD_BIN="@sbindir@/libvirtd"
> +
> # Sanity checks.
> -[ -x @sbindir@/libvirtd ] || exit 0
> +[ ! -e $LIBVIRTD_BIN ] && echo "$LIBVIRTD_BIN not found."
&& exit 1
Why the switch from -x to -e? If libvirtd is missing executable
permissions, it can now get through this check whereas before it exited early.
Sorry, I meant to comment about this.
I figured in that case we can just let the libvirtd command fail, which should
report the lack of permissions. This saves us the hassle of having to report
'$BIN not found or lacks execute permissions.'
But I guess by that logic we can just drop the check and explicit error
reporting altogether: this stuff should really only error if the user screwed
up the install, so they can decode 'command not found' and 'permission
denied'
errors. I'll send a new patch.
Thanks,
Cole