Novell Home

Running YAST Online Update From The Command-line

Novell Cool Solutions: Trench
By Kirk Coombs

Digg This - Slashdot This

Posted: 3 Nov 2005
 

Applies To:

  • SUSE Linux

  • SUSE Linux Enterprise Server

YaST Online Update (YOU) has the ability to be controlled through a command-line interface. This is very handy if updates need to be installed in scripts, or to install updates quickly with a minimal interface.

The command for the command-line interface is online_update. Simply entering this command, with no flags, downloads and installs security, recommended, and patchlevel updates for installed packages with no intervention or output. Additional options can be seen by using the --help flag:

# online_update --help
Usage: online-update [options] [types]

-u, --url URL Base URL of directory tree from which to get patches.
Supported protocols: http, ftp, smb, nfs, cd, dvd, file.
If no protocol is given, a local file is assumed.
Examples: 'ftp://ftp.suse.com/pub/suse', 'cd:///',
'file:/var/lib/YaST2/you/mnt'
'/var/lib/YaST2/you/mnt'

-g, --download-only Only download patches. Do not install.
-G, --get-all Retrieve all available patches and packages for the
given product. Do not install.
-i, --install-only Install downloaded patches. Do not download.

-q, --quick-check Quick check for new updates. Does not check for types
of updates.
-k, --check Check for new updates.

-c, --show-config Show configuration. Do not do anything.
-I, --show-installed Show installed patches. Do nothing else.

-p, --product PRODUCT Name of product for which to get patches.
-v, --version VERSION Version of product for which to get patches.
-a, --architecture ARCH Base architecture of product for which to get patches.
-l, --language LANGCODE Language used to show patch descriptions.

-r, --reload Reload patches from server.
-d, --dry-run Dry run. Only get patches, but do not install them.
-n, --no-sig-check No signature check of downloaded files.

-s, --show-patches Show list of patches (Additionaly use -d only to show list
of patches without installing them).
-V, --verbose Be verbose.
-D, --debug Debug output.

-S, --select-patches <list of patches>
Select patches for download and installation. Patches are
specified as a comma-separated list of patch names. Only patches
that would also be selected by the default selection algorithm
can be selected (this behavior is overriden by the --force option).
-f, --force Force installation of a selected patch.
-P, --skip-pre Skip patches with preinstall information (e.g., kernel updates).
Instead, a message is generated.
(Do not use together with -s)

security | recommended | patchlevel | document | optional Types of patches to install.

Note: On SLES, the GUI version of YOU must be used prior to the command-line version. This establishes the preferred server and its associated login credentials.

For example, to get a listing of updates (available and installed) enter:

# online_update -sd
I fetchnvidia.sh (Optional): Download NVIDIA(r) Graphics Driver
clamav (Security): Anti-Virus Toolkit
I opera (Security): Fast Web Browser
S mozilla (Security): Der OpenSource-Nachfolger des Netscape Browsers
I MozillaFirefox (Security): Der zukünftige Browser des Mozilla-Projektes.
I fontconfig (Recommended): Bibliothek zur Fontkonfiguration
<--snip-->

Notice that the language is set to de (German) by default. This can be changed with the --language flag. The -sd flag shows all updates, giving an I to indicate they are installed and a S to indicate they should be installed. Any packages marked with an S are also downloaded by the -sd flag.

If the list of packages to be installed is okay, simply enter

# online_update

to install them. If only specific packages should be installed, use the -S flag.

Other useful flags include -u for specifying a specific URL (i.e. to a local mirror), and -k to simply check for new updates without installing any.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell