You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

110 lines
2.9 KiB

  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. ]>
  7. <refentry>
  8. &apt-docinfo;
  9. <refmeta>
  10. <refentrytitle>apt-config</refentrytitle>
  11. <manvolnum>8</manvolnum>
  12. </refmeta>
  13. <!-- Man page title -->
  14. <refnamediv>
  15. <refname>apt-config</refname>
  16. <refpurpose>APT Configuration Query program</refpurpose>
  17. </refnamediv>
  18. <!-- Arguments -->
  19. <refsynopsisdiv>
  20. <cmdsynopsis>
  21. <command>apt-config</command>
  22. <arg><option>-hv</option></arg>
  23. <arg><option>-o=<replaceable>config string</replaceable></option></arg>
  24. <arg><option>-c=<replaceable>file</replaceable></option></arg>
  25. <group choice="req">
  26. <arg>shell</arg>
  27. <arg>dump</arg>
  28. </group>
  29. </cmdsynopsis>
  30. </refsynopsisdiv>
  31. <refsect1><title>Description</title>
  32. <para><command>apt-config</command> is an internal program used by various
  33. portions of the APT suite to provide consistent configurability. It accesses
  34. the main configuration file <filename>/etc/apt/apt.conf</filename> in a
  35. manner that is easy to use by scripted applications.</para>
  36. <para>Unless the <option>-h</option>, or <option>--help</option> option is
  37. given one of the commands below must be present.
  38. </para>
  39. <variablelist>
  40. <varlistentry><term>shell</term>
  41. <listitem><para>
  42. shell is used to access the configuration information from a shell
  43. script. It is given pairs of arguments, the first being a shell
  44. variable and the second the configuration value to query. As output
  45. it lists a series of shell assignments commands for each present value.
  46. In a shell script it should be used like:
  47. </para>
  48. <informalexample><programlisting>
  49. OPTS="-f"
  50. RES=`apt-config shell OPTS MyApp::options`
  51. eval $RES
  52. </programlisting></informalexample>
  53. <para>This will set the shell environment variable $OPTS to the value of
  54. MyApp::options with a default of <option>-f</option>.</para>
  55. <para>The configuration item may be postfixed with a /[fdbi]. f returns
  56. file names, d returns directories, b returns true or false and i returns
  57. an integer. Each of the returns is normalized and verified
  58. internally.</para>
  59. </listitem>
  60. </varlistentry>
  61. <varlistentry><term>dump</term>
  62. <listitem><para>
  63. Just show the contents of the configuration space.</para>
  64. </listitem>
  65. </varlistentry>
  66. </variablelist>
  67. </refsect1>
  68. <refsect1><title>options</title>
  69. &apt-cmdblurb;
  70. <variablelist>
  71. &apt-commonoptions;
  72. </variablelist>
  73. </refsect1>
  74. <refsect1><title>See Also</title>
  75. <para>
  76. &apt-conf;
  77. </para>
  78. </refsect1>
  79. <refsect1><title>Diagnostics</title>
  80. <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
  81. </para>
  82. </refsect1>
  83. &manbugs;
  84. &manauthor;
  85. </refentry>