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