File: GetForwarders

package info (click to toggle)
bind9 1%3A9.3.4-2etch6
  • links: PTS, VCS
  • area: main
  • in suites: etch
  • size: 24,476 kB
  • ctags: 22,776
  • sloc: ansic: 222,420; sh: 20,927; xml: 7,441; makefile: 3,681; perl: 3,026; cpp: 1,764; tcl: 842; python: 77
file content (31 lines) | stat: -rwxr-xr-x 1,297 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;