Imported Upstream version 2.4.4p3
[debian/amanda] / man / amgetconf.8.in
1 .\"
2 .de EX
3 .if t .ft C
4 .nf
5 ..
6 .de EE
7 .fi
8 .if t .ft
9 ..
10 .TH AMGETCONF 8
11 .SH NAME
12 amgetconf \- look up amanda.conf variables
13 .SH SYNOPSIS
14 .B amgetconf
15 [
16 .I config
17 ]
18 .I parameter
19 .SH DESCRIPTION
20 .B Amgetconf
21 looks up parameters in
22 .IR amanda.conf ,
23 the Amanda configuration file,
24 or from the build and runtime environment,
25 and returns their corresponding value.
26 .LP
27 If
28 .I config
29 is not specified,
30 .B amgetconf
31 assumes it is being run from the configuration directory and that
32 .I amanda.conf
33 is present.
34 .LP
35 If
36 .I parameter
37 begins with
38 .IR build. ,
39 the (case insensitive) string following the period
40 is a build environment variable.
41 Variables without a value (e.g.\&
42 .I XFSDUMP
43 on a system that does not support that type of file system)
44 will not report an error and will return an empty string as the value.
45 Flag variables (e.g.\&
46 .IR USE_AMANDAHOSTS )
47 will return
48 .I 1
49 if the flag is set or an empty string if it is not.
50 .LP
51 If
52 .I parameter
53 begins with
54 .IR dbopen. ,
55 the string following the period is a program name and an Amanda debug
56 file will be created for the caller.
57 The name of the file is returned.
58 .LP
59 If
60 .I parameter
61 begins with
62 .IR dbclose. ,
63 the string following the period is a program name previously used with
64 .IR dbopen. ,
65 followed by a colon (:) and the previously opened file name.
66 .LP
67 See the
68 .IR amanda (8)
69 man page for more details about Amanda.
70 .SH EXAMPLE
71 Find out the path to the log file directory:
72 .LP
73 .RS
74 .nf
75 % amgetconf @DEFAULT_CONFIG@ logdir
76 @CONFIG_DIR@/@DEFAULT_CONFIG@
77 .fi
78 .RE
79 .LP
80 Find out the current tape type:
81 .LP
82 .RS
83 .nf
84 % amgetconf @DEFAULT_CONFIG@ tapetype
85 DLT4000-IV
86 .fi
87 .RE
88 .LP
89 Find out the default configuration directory:
90 .LP
91 .RS
92 .nf
93 % amgetconf @DEFAULT_CONFIG@ build.CONFIG_DIR
94 @CONFIG_DIR@
95 .fi
96 .RE
97 .LP
98 Create, use and close a debug file in a script:
99 .LP
100 .RS
101 .nf
102 % set debug_file = `amgetconf @DEFAULT_CONFIG@ dbopen.myscript`
103 % echo debug information >> $debug_file
104 % amgetconf @DEFAULT_CONFIG@ dbclose.myscript:$debug_file
105 .fi
106 .RE
107 .SH MESSAGES
108 .TP
109 amgetconf: no such parameter "\fIparam\fR"
110 Parameter
111 .I param
112 is not a known keyword
113 (e.g. not a valid
114 .I amanda.conf
115 keyword).
116 In this case,
117 .B amgetconf
118 will write "\fBBUGGY\fR" to stdout as the value.
119 .SH "SEE ALSO"
120 amanda(8)