fa4f2eaa71f8054dde0c0c2e869a84ac60628e76
[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 .HP 10
25 \fBamgetconf\fR [\fIconfig\fR] \fIparameter\fR
26 .SH "DESCRIPTION"
27 .PP
28 \fBAmgetconf\fR
29 looks up parameters in
30 \fBamanda.conf\fR, the
31 \fBAmanda\fR
32 configuration file, or from the build and runtime environment, and returns their corresponding value.
33 .PP
34 If
35 \fBconfig\fR
36 is not specified,
37 \fBamgetconf\fR
38 assumes it is being run from the configuration directory and that
39 \fBamanda.conf\fR
40 is present.
41 .PP
42 If
43 \fBparameter\fR
44 begins with
45 \fBbuild.\fR, the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g.
46 \fBXFSDUMP\fR
47 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.
48 \fBUSE_AMANDAHOSTS\fR) will return
49 1
50 if the flag is set or an empty string if it is not.
51 .PP
52 If
53 \fBparameter\fR
54 begins with
55 \fBdbopen.\fR, the string following the period is a program name and an
56 \fBAmanda\fR
57 debug file will be created for the caller. The name of the file is returned.
58 .PP
59 If
60 \fBparameter\fR
61 begins with
62 \fBdbclose.\fR, the string following the period is a program name previously used with
63 \fBdbopen.\fR, followed by a colon (:) and the previously opened file name.
64 .PP
65 See the
66 \fBamanda\fR(8)
67 man page for more details about
68 \fBAmanda\fR.
69 .SH "EXAMPLE"
70 .PP
71 Find out the path to the log file directory:
72 .sp
73 .nf
74
75 % amgetconf daily logdir
76 /usr/local/etc/amanda//daily
77
78 .fi
79 .sp
80 .PP
81 Find out the current tape type:
82 .sp
83 .nf
84
85 % amgetconf daily tapetype
86 DLT4000-IV
87
88 .fi
89 .sp
90 .PP
91 Find out the default configuration directory:
92 .sp
93 .nf
94
95 % amgetconf daily build.CONFIG_DIR
96 /usr/local/etc/amanda/
97
98 .fi
99 .sp
100 .PP
101 Create, use and close a debug file in a script:
102 .sp
103 .nf
104
105 % set debug_file = `amgetconf daily dbopen.myscript`
106 % echo debug information >> $debug_file
107 % amgetconf daily dbclose.myscript:$debug_file
108
109 .fi
110 .sp
111 .SH "MESSAGES"
112 .TP
113 amgetconf: no such parameter \fBparam\fR
114 Parameter
115 \fBparam\fR
116 is not a known keyword (e.g. not a valid
117 \fBamanda.conf\fR
118 keyword). In this case,
119 \fBamgetconf\fR
120 will write "\fBBUGGY\fR" to stdout as the value.
121 .SH "SEE ALSO"
122 .PP
123 \fBamanda\fR(8)
124