Imported Upstream version 2.5.1
[debian/amanda] / man / xml-source / amgetconf.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amgetconf.8'>
12
13 <refmeta>
14 <refentrytitle>amgetconf</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17 <refnamediv>
18 <refname>amgetconf</refname>
19 <refpurpose>look up amanda.conf variables</refpurpose>
20 </refnamediv>
21 <!-- body begins here -->
22 <refsynopsisdiv>
23 <cmdsynopsis>
24   <command>amgetconf</command>    
25     <arg choice='opt'><replaceable>config</replaceable></arg>
26     <arg choice='plain'><replaceable>parameter</replaceable></arg>
27     <group><arg choice='plain'>-o</arg><arg choice='plain'><replaceable>configoption</replaceable></arg></group>*
28 </cmdsynopsis>
29 </refsynopsisdiv>
30
31
32 <refsect1><title>DESCRIPTION</title>
33 <para><emphasis remap='B'>Amgetconf</emphasis>
34 looks up parameters in
35 <emphasis remap='I'>amanda.conf</emphasis>,
36 the &A; configuration file,
37 or from the build and runtime environment,
38 and returns their corresponding value.</para>
39
40 <para>If
41 <emphasis remap='I'>config</emphasis>
42 is not specified,
43 <command>amgetconf</command>
44 assumes it is being run from the configuration directory and that
45 <emphasis remap='I'>amanda.conf</emphasis>
46 is present.</para>
47
48 <para>If
49 <emphasis remap='I'>parameter</emphasis>
50 begins with
51 <emphasis remap='I'>build.</emphasis>,
52 the (case insensitive) string following the period
53 is a build environment variable.
54 Variables without a value (e.g.
55 <emphasis remap='I'>XFSDUMP</emphasis>
56 on a system that does not support that type of file system)
57 will not report an error and will return an empty string as the value.
58 Flag variables (e.g.
59 <emphasis remap='I'>USE_AMANDAHOSTS</emphasis>)
60 will return
61 <literal>1</literal>
62 if the flag is set or an empty string if it is not.</para>
63
64 <para>If
65 <emphasis remap='I'>parameter</emphasis>
66 begins with
67 <emphasis remap='I'>dbopen.</emphasis>,
68 the string following the period is a program name and an &A; debug
69 file will be created for the caller.
70 The name of the file is returned.</para>
71
72 <para>If
73 <emphasis remap='I'>parameter</emphasis>
74 begins with
75 <emphasis remap='I'>dbclose.</emphasis>,
76 the string following the period is a program name previously used with
77 <emphasis remap='I'>dbopen.</emphasis>,
78 followed by a colon (:) and the previously opened file name.</para>
79
80 <para>See the
81 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
82 man page for more details about &A;.</para>
83 </refsect1>
84
85 <refsect1><title>OPTIONS</title>
86 <variablelist remap='TP'>
87
88   <varlistentry>
89   <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
90   <listitem>
91 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
92   </listitem>
93   </varlistentry>
94
95
96 </variablelist>
97 </refsect1>
98
99 <refsect1><title>EXAMPLE</title>
100 <para>Find out the path to the log file directory:</para>
101
102 <!-- .RS -->
103 <literallayout remap='.nf'>
104 % amgetconf daily logdir
105 /usr/local/etc/amanda//daily
106 </literallayout> <!-- .fi -->
107
108 <para>Find out the current tape type:</para>
109
110 <!-- .RS -->
111 <literallayout remap='.nf'>
112 % amgetconf daily tapetype
113 DLT4000-IV
114 </literallayout> <!-- .fi -->
115
116 <para>Find out the default configuration directory:</para>
117
118 <!-- .RS -->
119 <literallayout remap='.nf'>
120 % amgetconf daily build.CONFIG_DIR
121 /usr/local/etc/amanda/
122 </literallayout> <!-- .fi -->
123
124 <para>Create, use and close a debug file in a script:</para>
125
126 <!-- .RS -->
127 <literallayout remap='.nf'>
128 % set debug_file = `amgetconf daily dbopen.myscript`
129 % echo debug information &gt;&gt; $debug_file
130 % amgetconf daily dbclose.myscript:$debug_file
131 </literallayout> <!-- .fi -->
132 </refsect1>
133
134 <refsect1><title>MESSAGES</title>
135 <variablelist remap='TP'>
136   <varlistentry>
137   <term>amgetconf: no such parameter <emphasis remap='I'>param</emphasis></term>
138   <listitem>
139 <para>Parameter
140 <emphasis remap='I'>param</emphasis>
141 is not a known keyword
142 (e.g. not a valid
143 <emphasis remap='I'>amanda.conf</emphasis>
144 keyword).
145 </para>
146   </listitem>
147   </varlistentry>
148 </variablelist>
149 </refsect1>
150
151 <refsect1><title>SEE ALSO</title>
152 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
153 </refsect1>
154 </refentry>
155