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.
 
 
 
 
 
 

119 lines
3.8 KiB

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