OS4X plugin os4xplugin gtar

From OS4X
Revision as of 08:47, 29 July 2024 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

All files of the OS4X job are packed into a new TAR archive. The TAR program in the operating system (found via PATH) is used here. The name of the TAR archive is determined dynamically and temporarily at runtime. Directory hierarchies are eliminated here.

All files in the job are removed from the job description (logically, not physically); the TAR archive created is then the only file entry. The created TAR archive receives a temporary name (with the prefix "os4x_gtar_") in the temporary OS4X directory.

Requirements

  • File /etc/os4x.conf or configuration file referenced by environment variable $OS4X_CFGFILE. The temporary directory and the license file are obtained via the database that is configured here.

Configuration

The program "tar" is searched for in the PATH of the shell under which the plugin is started. This means that the tar version used can be influenced by clever positioning or definition of the default PATH (under most Linux distributions this is GNU TAR by default).

Return codes

  • 0: everything OK
  • 1: Number of parameters != 1; Config file /etc/os4x.conf not found; Config in database not readable; License not valid; XML file invalid
  • all others: the return code of the TAR call