apt-config.8.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY % aptent SYSTEM "apt.ent">
  5. %aptent;
  6. <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
  7. %aptverbatiment;
  8. ]>
  9. <refentry>
  10. <refentryinfo>
  11. &apt-author.jgunthorpe;
  12. &apt-author.team;
  13. &apt-email;
  14. &apt-product;
  15. <!-- The last update date -->
  16. <date>29 February 2004</date>
  17. </refentryinfo>
  18. <refmeta>
  19. <refentrytitle>apt-config</refentrytitle>
  20. <manvolnum>8</manvolnum>
  21. <refmiscinfo class="manual">APT</refmiscinfo>
  22. </refmeta>
  23. <!-- Man page title -->
  24. <refnamediv>
  25. <refname>apt-config</refname>
  26. <refpurpose>APT Configuration Query program</refpurpose>
  27. </refnamediv>
  28. <!-- Arguments -->
  29. <refsynopsisdiv>
  30. <cmdsynopsis>
  31. <command>apt-config</command>
  32. <arg><option>-hv</option></arg>
  33. <arg><option>-o=<replaceable>config string</replaceable></option></arg>
  34. <arg><option>-c=<replaceable>file</replaceable></option></arg>
  35. <group choice="req">
  36. <arg>shell</arg>
  37. <arg>dump</arg>
  38. </group>
  39. </cmdsynopsis>
  40. </refsynopsisdiv>
  41. <refsect1><title>Description</title>
  42. <para><command>apt-config</command> is an internal program used by various
  43. portions of the APT suite to provide consistent configurability. It accesses
  44. the main configuration file <filename>/etc/apt/apt.conf</filename> in a
  45. manner that is easy to use by scripted applications.</para>
  46. <para>Unless the <option>-h</option>, or <option>--help</option> option is
  47. given one of the commands below must be present.
  48. </para>
  49. <variablelist>
  50. <varlistentry><term>shell</term>
  51. <listitem><para>
  52. shell is used to access the configuration information from a shell
  53. script. It is given pairs of arguments, the first being a shell
  54. variable and the second the configuration value to query. As output
  55. it lists a series of shell assignments commands for each present value.
  56. In a shell script it should be used like:
  57. </para>
  58. <informalexample><programlisting>
  59. OPTS="-f"
  60. RES=`apt-config shell OPTS MyApp::options`
  61. eval $RES
  62. </programlisting></informalexample>
  63. <para>This will set the shell environment variable $OPTS to the value of
  64. MyApp::options with a default of <option>-f</option>.</para>
  65. <para>The configuration item may be postfixed with a /[fdbi]. f returns
  66. file names, d returns directories, b returns true or false and i returns
  67. an integer. Each of the returns is normalized and verified
  68. internally.</para>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry><term>dump</term>
  72. <listitem><para>
  73. Just show the contents of the configuration space.</para>
  74. </listitem>
  75. </varlistentry>
  76. </variablelist>
  77. </refsect1>
  78. <refsect1><title>options</title>
  79. &apt-cmdblurb;
  80. <variablelist>
  81. &apt-commonoptions;
  82. </variablelist>
  83. </refsect1>
  84. <refsect1><title>See Also</title>
  85. <para>&apt-conf;
  86. </para>
  87. </refsect1>
  88. <refsect1><title>Diagnostics</title>
  89. <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
  90. </para>
  91. </refsect1>
  92. &manbugs;
  93. </refentry>