Scroll to navigation

APT-CONFIG(8) APT APT-CONFIG(8)

NAME

apt-config - APT-Konfigurationsabfrageprogramm

ÜBERSICHT

apt-config [--empty] [--format ' %f "%v";%n'] [-o=config_string] [-c=config_file] {shell | dump | {-v | --version} | {-h | --help}}

BESCHREIBUNG

apt-config ist ein internes Programm, das von vielen Teilen des APT-Pakets benutzt wird, um durchgängige Konfigurierbarkeit bereitzustellen. Es greift auf die Hauptkonfigurationsdatei /etc/apt/apt.conf auf eine Art zu, die leicht für geskriptete Anwendungen zu benutzen ist.

Sofern nicht die -h-, oder --help-Option angegeben ist, muss einer der unten aufgeführten Befehle vorkommen.

shell

»shell« wird benutzt, um aus einem Shellskript auf Konfigurationsinformationen zuzugreifen. Es wird ein Paar von Argumenten angegeben – das erste als Shell-Variable und das zweite als Konfigurationswert zum Abfragen. Als Ausgabe führt es Shell-Zuweisungsbefehle für jeden vorhandenen Wert auf. In einen Shellskript sollte es wie folgt benutzt werden:

OPTS="-f"
RES=`apt-config shell OPTS MyApp::options`
eval $RES
Dies wird die Shell-Umgebungsvariable $OPT auf den Wert von MyApp::options mit einer Vorgabe von -f setzen.

An das Konfigurationselement kann /[fdbi] angehängt werden. »f« gibt Dateinamen zurück, »d« gibt Verzeichnisse zurück, »b« gibt true oder false zurück und »i« gibt eine Ganzzahl zurück. Jede Rückgabe ist normiert und intern geprüft.

dump

Nur der Inhalt des Konfigurationsbereichs wird angezeigt.

OPTIONEN

All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations.

--empty

schließt Optionen ein, die einen leeren Wert haben. Dies ist die Vorgabe, benutzen Sie daher --no-empty, um sie aus der Ausgabe zu entfernen.

--format '%f "%v";%n'

definiert die Ausgabe jeder Konfigurationsoption. %t wird durch den individuellen Namen ersetzt, %f durch ihren vollständigen hierarchichen Namen und %v durch ihren Wert. Verwenden Sie Großbuchstaben; Sonderzeichen in dem Wert werden kodiert, um sicherzustellen, dass sie z.B. in einer maskierten Zeichenkette, wie sie RFC822 definiert, sicher verwandt werden kann. %n wird zusätzlich durch einen Zeilenumbruch ersetzt, %N durch einen Tabulator. Ein % kann mittels %% ausgegeben werden.

-h, --help

Show a short usage summary.

-v, --version

Show the program version.

-c, --config-file

Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the APT_CONFIG environment variable. See apt.conf(5) for syntax information.

-o, --option

Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options.

SIEHE AUCH

apt.conf(5)

DIAGNOSE

apt-config gibt bei normalen Operationen 0 zurück, dezimal 100 bei Fehlern.

BUGS

APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

TRANSLATION

The english translation was done by John Doe <john@doe.org> in 2009, 2010 and Daniela Acme <daniela@acme.us> in 2010 together with the Debian Dummy l10n Team <debian-l10n-dummy@lists.debian.org>.

Note that this translated document may contain untranslated parts. This is done on purpose, to avoid losing content when the translation is lagging behind the original content.

AUTOREN

Jason Gunthorpe

APT team

FUßNOTEN

1.
APT bug page
30 November 2013 APT 1.4.9