Imported Upstream version 2.4.5
[debian/amanda] / man / amgetconf.8
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "AMGETCONF" 8 "" "" ""
21 .SH NAME
22 amgetconf \- look up amanda.conf variables
23 .SH "SYNOPSIS"
24 .ad l
25 .hy 0
26 .HP 10
27 \fBamgetconf\fR [\fIconfig\fR] \fIparameter\fR
28 .ad
29 .hy
30
31 .SH "DESCRIPTION"
32
33 .PP
34 \fBAmgetconf\fR looks up parameters in \fBamanda\&.conf\fR, the \fBAMANDA\fR configuration file, or from the build and runtime environment, and returns their corresponding value\&.
35
36 .PP
37 If \fBconfig\fR is not specified, \fBamgetconf\fR assumes it is being run from the configuration directory and that \fBamanda\&.conf\fR is present\&.
38
39 .PP
40 If \fBparameter\fR begins with \fBbuild\&.\fR, the (case insensitive) string following the period is a build environment variable\&. Variables without a value (e\&.g\&. \fBXFSDUMP\fR on a system that does not support that type of file system) will not report an error and will return an empty string as the value\&. Flag variables (e\&.g\&. \fBUSE_AMANDAHOSTS\fR) will return 1 if the flag is set or an empty string if it is not\&.
41
42 .PP
43 If \fBparameter\fR begins with \fBdbopen\&.\fR, the string following the period is a program name and an \fBAMANDA\fR debug file will be created for the caller\&. The name of the file is returned\&.
44
45 .PP
46 If \fBparameter\fR begins with \fBdbclose\&.\fR, the string following the period is a program name previously used with \fBdbopen\&.\fR, followed by a colon (:) and the previously opened file name\&.
47
48 .PP
49 See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
50
51 .SH "EXAMPLE"
52
53 .PP
54 Find out the path to the log file directory:
55
56 .nf
57
58 % amgetconf daily logdir
59 /usr/local/etc/amanda//daily
60
61 .fi
62
63 .PP
64 Find out the current tape type:
65
66 .nf
67
68 % amgetconf daily tapetype
69 DLT4000\-IV
70
71 .fi
72
73 .PP
74 Find out the default configuration directory:
75
76 .nf
77
78 % amgetconf daily build\&.CONFIG_DIR
79 /usr/local/etc/amanda/
80
81 .fi
82
83 .PP
84 Create, use and close a debug file in a script:
85
86 .nf
87
88 % set debug_file = `amgetconf daily dbopen\&.myscript`
89 % echo debug information >> $debug_file
90 % amgetconf daily dbclose\&.myscript:$debug_file
91
92 .fi
93
94 .SH "MESSAGES"
95
96 .TP
97 amgetconf: no such parameter \fBparam\fR
98 Parameter \fBparam\fR is not a known keyword (e\&.g\&. not a valid \fBamanda\&.conf\fR keyword)\&. In this case, \fBamgetconf\fR will write "\fBBUGGY\fR" to stdout as the value\&.
99
100 .SH "SEE ALSO"
101
102 .PP
103 \fBamanda\fR(8)
104