apt-config.8.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. &synopsis-command-apt-config;
  29. <refsect1><title>Description</title>
  30. <para><command>apt-config</command> is an internal program used by various
  31. portions of the APT suite to provide consistent configurability. It accesses
  32. the main configuration file <filename>/etc/apt/apt.conf</filename> in a
  33. manner that is easy to use by scripted applications.</para>
  34. <para>Unless the <option>-h</option>, or <option>--help</option> option is
  35. given one of the commands below must be present.
  36. </para>
  37. <variablelist>
  38. <varlistentry><term>shell</term>
  39. <listitem><para>
  40. shell is used to access the configuration information from a shell
  41. script. It is given pairs of arguments, the first being a shell
  42. variable and the second the configuration value to query. As output
  43. it lists a series of shell assignments commands for each present value.
  44. In a shell script it should be used like:
  45. </para>
  46. <informalexample><programlisting>
  47. OPTS="-f"
  48. RES=`apt-config shell OPTS MyApp::options`
  49. eval $RES
  50. </programlisting></informalexample>
  51. <para>This will set the shell environment variable $OPTS to the value of
  52. MyApp::options with a default of <option>-f</option>.</para>
  53. <para>The configuration item may be postfixed with a /[fdbi]. f returns
  54. file names, d returns directories, b returns true or false and i returns
  55. an integer. Each of the returns is normalized and verified
  56. internally.</para>
  57. </listitem>
  58. </varlistentry>
  59. <varlistentry><term>dump</term>
  60. <listitem><para>
  61. Just show the contents of the configuration space.</para>
  62. </listitem>
  63. </varlistentry>
  64. </variablelist>
  65. </refsect1>
  66. <refsect1><title>options</title>
  67. &apt-cmdblurb;
  68. <variablelist>
  69. &apt-commonoptions;
  70. </variablelist>
  71. </refsect1>
  72. <refsect1><title>See Also</title>
  73. <para>&apt-conf;
  74. </para>
  75. </refsect1>
  76. <refsect1><title>Diagnostics</title>
  77. <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
  78. </para>
  79. </refsect1>
  80. &manbugs;
  81. </refentry>