[Ovirt-devel] [PATCH] Redirecting all logs to /var/log/ovirt.log

Darryl L. Pierce dpierce at redhat.com
Mon Jul 14 18:51:35 UTC 2008


Perry N. Myers wrote:
> This might be in the realm of nitpicking, but...  I think it might be 
> better to have things structured like this:
> 
> do_ovirt_post() {
>   ....
> } >> $OVIRT_LOGFILE 2>&1
> 
> start() {
>   echo -n $"Starting ovirt-post: "
>   do_ovirt_post; ret=$?
>   echo
>   test $ret == 0 && success || failure
> }

Given how short our scripts are, I don't see a benefit to inserting a 
method in between the entry point and the functionality.  However,I do 
like the failure notice as opposed to just exiting the script. So I've 
pulled that into the script and replaced all calls to die "message" with:

function start () {
	wget -q -o "some url" || echo "message" && return 1
}

I'll have a patch out shortly once I run through tests.

-- 
Darryl L. Pierce, Sr. Software Engineer
Red Hat, Inc. - http://www.redhat.com/
oVirt - Virtual Machine Management - http://www.ovirt.org/
"What do you care what other people think, Mr. Feynman?"




More information about the ovirt-devel mailing list