d824dde4f5eeb17745d3e7cc652c1341b5f4e6c3
[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 </cmdsynopsis>
28 </refsynopsisdiv>
29
30
31 <refsect1><title>DESCRIPTION</title>
32 <para><emphasis remap='B'>Amgetconf</emphasis>
33 looks up parameters in
34 <emphasis remap='I'>amanda.conf</emphasis>,
35 the &A; configuration file,
36 or from the build and runtime environment,
37 and returns their corresponding value.</para>
38
39 <para>If
40 <emphasis remap='I'>config</emphasis>
41 is not specified,
42 <command>amgetconf</command>
43 assumes it is being run from the configuration directory and that
44 <emphasis remap='I'>amanda.conf</emphasis>
45 is present.</para>
46
47 <para>If
48 <emphasis remap='I'>parameter</emphasis>
49 begins with
50 <emphasis remap='I'>build.</emphasis>,
51 the (case insensitive) string following the period
52 is a build environment variable.
53 Variables without a value (e.g.
54 <emphasis remap='I'>XFSDUMP</emphasis>
55 on a system that does not support that type of file system)
56 will not report an error and will return an empty string as the value.
57 Flag variables (e.g.
58 <emphasis remap='I'>USE_AMANDAHOSTS</emphasis>)
59 will return
60 <literal>1</literal>
61 if the flag is set or an empty string if it is not.</para>
62
63 <para>If
64 <emphasis remap='I'>parameter</emphasis>
65 begins with
66 <emphasis remap='I'>dbopen.</emphasis>,
67 the string following the period is a program name and an &A; debug
68 file will be created for the caller.
69 The name of the file is returned.</para>
70
71 <para>If
72 <emphasis remap='I'>parameter</emphasis>
73 begins with
74 <emphasis remap='I'>dbclose.</emphasis>,
75 the string following the period is a program name previously used with
76 <emphasis remap='I'>dbopen.</emphasis>,
77 followed by a colon (:) and the previously opened file name.</para>
78
79 <para>See the
80 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
81 man page for more details about &A;.</para>
82 </refsect1>
83
84 <refsect1><title>EXAMPLE</title>
85 <para>Find out the path to the log file directory:</para>
86
87 <!-- .RS -->
88 <literallayout remap='.nf'>
89 % amgetconf daily logdir
90 /usr/local/etc/amanda//daily
91 </literallayout> <!-- .fi -->
92
93 <para>Find out the current tape type:</para>
94
95 <!-- .RS -->
96 <literallayout remap='.nf'>
97 % amgetconf daily tapetype
98 DLT4000-IV
99 </literallayout> <!-- .fi -->
100
101 <para>Find out the default configuration directory:</para>
102
103 <!-- .RS -->
104 <literallayout remap='.nf'>
105 % amgetconf daily build.CONFIG_DIR
106 /usr/local/etc/amanda/
107 </literallayout> <!-- .fi -->
108
109 <para>Create, use and close a debug file in a script:</para>
110
111 <!-- .RS -->
112 <literallayout remap='.nf'>
113 % set debug_file = `amgetconf daily dbopen.myscript`
114 % echo debug information &gt;&gt; $debug_file
115 % amgetconf daily dbclose.myscript:$debug_file
116 </literallayout> <!-- .fi -->
117 </refsect1>
118
119 <refsect1><title>MESSAGES</title>
120 <variablelist remap='TP'>
121   <varlistentry>
122   <term>amgetconf: no such parameter <emphasis remap='I'>param</emphasis></term>
123   <listitem>
124 <para>Parameter
125 <emphasis remap='I'>param</emphasis>
126 is not a known keyword
127 (e.g. not a valid
128 <emphasis remap='I'>amanda.conf</emphasis>
129 keyword).
130 In this case,
131 <command>amgetconf</command>
132 will write &quot;<emphasis remap='B'>BUGGY</emphasis>&quot; to stdout as the value.</para>
133   </listitem>
134   </varlistentry>
135 </variablelist>
136 </refsect1>
137
138 <refsect1><title>SEE ALSO</title>
139 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
140 </refsect1>
141 </refentry>
142