The ai_prefs utility is used to manage operating system update sources. By using this utility, you can perform the following tasks:

  • adding/removing OS update source entries to/from Plesk Installer
  • changing OS update source entries
  • retrieving a list of OS update sources registered in Plesk, in human-readable and XML formats

Usage

ai_prefs <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command adds to Plesk Installer the Fedora Core 7 repository, and sets the lowest priority to it.

plesk bin ai_prefs --add-vendor-source -url http://download.fedora.redhat.com/fedora/linux/core/updates/7/i386 -type repomd -priority 1

Commands

Command Parameter Description Example
--add-vendor-source or -a  

Adds a source of operating system updates.

Requires using the -url and -type options.

To register RPM metadata repository for Fedora Core 6:

plesk bin ai_prefs -a -url http://download.fedora.redhat.com/fedora/linux/core/updates/6/i386 -type repomd

--remove-vendor-source or -r <source_ID> Removes a source of operating system updates.

To unregister the OS update source with ID 6:

plesk bin ai_prefs -r 6

--update-vendor-source or -u <source_ID> Updates a source of operating system updates preferences.

To set the highest priority to the OS update source with ID 4:

plesk bin ai_prefs -u 4 -priority 999

--vendor-sources-list or -l   Lists OS updates sources configured in Plesk in the human-readable format.

plesk bin ai_prefs -l

--vendor-sources-list-xml or -lx   Lists OS updates sources configured in Plesk in the xml format.

plesk bin ai_prefs -lx

--help or -h   Displays help on the use of the utility.

plesk bin ai_prefs -h

Note: The --vendor-sources-list and --vendor-sources-list-xml commands retrieve the following information on each of the OS update source entries: ID, type, URL, priority, status (enabled/disabled), authentication status, login, password.

Options

Option Parameter Description Example
-url <url>

Specifies the location of OS update source, which may start with http://, https://, ftp://, file:///.

Required with the --add-vendor-source command.

To register RPM metadata repository for Fedora Core 6:

plesk bin ai_prefs -a -url http://download.fedora.redhat.com/fedora/linux/core/updates/6/i386 -type repomd

-type repomd|directory

Specifies whether the source is an XML RPM metadata repository, or a plain repository directory mounted in the local system.

Required with the --add-vendor-source command.

To register directory /updates/ located on the CD RedHat-Linux9.0 mounted in local system as an OS updates resource:

plesk bin ai_prefs -a -url file:///mnt/cdrom/RedHat-Linux9.0/updates -type directory

-priority [1-999]

Sets priority of the source: 1 means the lowest priority, 999 the highest.

Default value is 500 (Normal priority).

To set the highest priority to the OS update source with ID 4:

plesk bin ai_prefs -u 4 -priority 999

-auth true|false

Specifies if the source requires authorization.

Is false by default.

To retrieve updates from the source which ID is 3 as authenticated user “autoupdate” (with password ghYnn39s7f):

plesk bin ai_prefs -u 3 -auth true -login autoupdate -password ghYnn39s7f

-login

<string>

Specifies a login name for authorization on the source.

Required if the -auth option is set to true.

 
-password <string>

Specifies password for authorization on the source.

Required if the -auth option is set to true.