diff options
author | Martin Nagy <mnagy@redhat.com> | 2009-02-11 20:37:59 +0100 |
---|---|---|
committer | Martin Nagy <mnagy@redhat.com> | 2009-02-11 20:37:59 +0100 |
commit | f50ae72ec3417cae55dd4e085991c01af9fdc5f1 (patch) | |
tree | 0e36c9a3320f6d068df93d3ff6d84b821d23db40 /contrib/dbus/GetForwarders | |
download | bind_dynamic-f50ae72ec3417cae55dd4e085991c01af9fdc5f1.tar.gz bind_dynamic-f50ae72ec3417cae55dd4e085991c01af9fdc5f1.tar.xz bind_dynamic-f50ae72ec3417cae55dd4e085991c01af9fdc5f1.zip |
Initial commitstart
Diffstat (limited to 'contrib/dbus/GetForwarders')
-rwxr-xr-x | contrib/dbus/GetForwarders | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/dbus/GetForwarders b/contrib/dbus/GetForwarders new file mode 100755 index 0000000..838706d --- /dev/null +++ b/contrib/dbus/GetForwarders @@ -0,0 +1,31 @@ +#!/bin/bash +# +# This script uses the named D-BUS support, which must be enabled in +# the running named with the named '-D' option, to get and print the +# list of forwarding zones in the running server. +# +# It accepts an optional <zone> first argument which is the DNS name +# of the zone whose forwarders (if any) will be retrieved. +# +# If no zone argument is specified, all forwarding zones will be listed. +# +# Usage: GetForwarders [ <zone> ] +# +# Copyright(C) Jason Vas Dias<jvdias@redhat.com> Red Hat Inc. 2005 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation at +# http://www.fsf.org/licensing/licenses/gpl.txt +# and included in this software distribution as the "LICENSE" file. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +zone='' +if [ $# -gt 0 ]; then + zone="string:$1"; +fi +dbus-send --system --type=method_call --print-reply --reply-timeout=20000 --dest=com.redhat.named /com/redhat/named com.redhat.named.text.GetForwarders $zone; |