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"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amgetconf.8'>
14 <refentrytitle>amgetconf</refentrytitle>
15 <manvolnum>8</manvolnum>
18 <refname>amgetconf</refname>
19 <refpurpose>look up amanda.conf variables</refpurpose>
21 <!-- body begins here -->
24 <command>amgetconf</command>
25 <arg choice='opt'><replaceable>config</replaceable></arg>
26 <arg choice='plain'><replaceable>parameter</replaceable></arg>
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>
40 <emphasis remap='I'>config</emphasis>
42 <command>amgetconf</command>
43 assumes it is being run from the configuration directory and that
44 <emphasis remap='I'>amanda.conf</emphasis>
48 <emphasis remap='I'>parameter</emphasis>
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.
58 <emphasis remap='I'>USE_AMANDAHOSTS</emphasis>)
61 if the flag is set or an empty string if it is not.</para>
64 <emphasis remap='I'>parameter</emphasis>
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>
72 <emphasis remap='I'>parameter</emphasis>
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>
80 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
81 man page for more details about &A;.</para>
84 <refsect1><title>EXAMPLE</title>
85 <para>Find out the path to the log file directory:</para>
88 <literallayout remap='.nf'>
89 % amgetconf daily logdir
90 /usr/local/etc/amanda//daily
91 </literallayout> <!-- .fi -->
93 <para>Find out the current tape type:</para>
96 <literallayout remap='.nf'>
97 % amgetconf daily tapetype
99 </literallayout> <!-- .fi -->
101 <para>Find out the default configuration directory:</para>
104 <literallayout remap='.nf'>
105 % amgetconf daily build.CONFIG_DIR
106 /usr/local/etc/amanda/
107 </literallayout> <!-- .fi -->
109 <para>Create, use and close a debug file in a script:</para>
112 <literallayout remap='.nf'>
113 % set debug_file = `amgetconf daily dbopen.myscript`
114 % echo debug information >> $debug_file
115 % amgetconf daily dbclose.myscript:$debug_file
116 </literallayout> <!-- .fi -->
119 <refsect1><title>MESSAGES</title>
120 <variablelist remap='TP'>
122 <term>amgetconf: no such parameter <emphasis remap='I'>param</emphasis></term>
125 <emphasis remap='I'>param</emphasis>
126 is not a known keyword
128 <emphasis remap='I'>amanda.conf</emphasis>
131 <command>amgetconf</command>
132 will write "<emphasis remap='B'>BUGGY</emphasis>" to stdout as the value.</para>
138 <refsect1><title>SEE ALSO</title>
139 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>