3 # This script uses the named D-BUS support, which must be enabled in
4 # the running named with the named '-D' option, to set the forwarding zones
5 # in the running server.
7 # One zone argument is required, followed by any number of server IP (v4 or v6)
8 # addresses. If the server IP address list is empty, any forwarders for the zone
12 # SetForwarders [ -t <'first' | 'only'> ] <zone> [ <server IP> [...<server IP>] ]
14 # Copyright(C) Jason Vas Dias<jvdias@redhat.com> Red Hat Inc. 2005
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation at
19 # http://www.fsf.org/licensing/licenses/gpl.txt
20 # and included in this software distribution as the "LICENSE" file.
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU General Public License for more details.
27 usage
() { echo "Usage: SetForwarders [ -t <'first' | 'only'> ] <zone> [ <server> [...<server>] ]"; }
32 elif [ "$1" = "-t" ]; then
34 echo '-t option requires an argument.'
41 echo '<zone> first argument required.'
49 servers
="$servers string:$svr";
52 dbus-send
--system --type=method_call
--print-reply --reply-timeout=20000 --dest=com.redhat.named
/com
/redhat
/named com.redhat.named.text.SetForwarders
$zone $type $servers;