[Ovirt-devel] [PATCH node] RSyslog configuration for standalone mode.

Alan Pevec apevec at gmail.com
Fri Nov 7 22:11:44 UTC 2008


On Fri, Nov 7, 2008 at 10:07 PM, Jim Meyering <jim at meyering.net> wrote:

> >>> +# check if we were called to attempt to default
> >>> +# to remote logging
> >>> +if [[ "$1" = "default" ]] ; then
> >>> +    printf "\nAttempting to locate remote syslog server..."
> >>> +    DEFAULT_SERVER=$(host -N 3 -t srv _syslog._udp | rev | awk '/VRS/
> {print $1}' | cut -d. -f2- | rev)
> >>> +    DEFAULT_PORT=$(host -N 3 -t srv _syslog._udp | rev | awk '/VRS/
> {print $2}' | cut -d. -f2- | rev)
>

please use find_srv from ovirt-functions, see examples in other ovirt
startup scripts.
I'll add this doc comment in ovirt-functions to help it's reuse:
# find_srv SERVICE PROTO
# reads DNS SRV record
# sets SRV_HOST and SRV_PORT if DNS SRV record found, clears them if not
# example:
# find_srv ovirt tcp
# if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
#   echo "oVirt Server found"
# else
#   echo "no oVirt Server available, running standalone"
# fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20081107/8e8285e4/attachment.htm>


More information about the ovirt-devel mailing list