Difference between revisions of "OS4X plugin os4xplugin bzip2"

From OS4X
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Zweck ==
+
[[Category:Plugins]]
  
Komprimieren jeder einzelnen in der übergebenen XML definierten Datei per bzip2. Die Originaldateien werden hierbei im Filesystem durch den bzip2-Prozess ausgetauscht. Die Endung ".bz2" wird an jede Datei angehängt. Der neue Dateiname wird in der XML-Datei geändert. Das Kompressionsnode "<code>compression</code>" in der XML wird bei jeder Datei auf "bzip2" umgestellt.
+
== Purpose ==
 +
Compressing each individual file defined in the passed XML using bzip2. The original files are exchanged in the file system using the bzip2 process. The extension ".bz2" is appended to each file. The new file name is changed in the XML file. The compression node "<code>compression</code>" in the XML is changed to "bzip2" for each file.
  
== Voraussetzungen ==
+
== Requirements ==
 +
* File <code>/etc/os4x.conf</code> or configuration file referenced by environment variable <code>$OS4X_CFGFILE</code>. The temporary directory and the license file are obtained via the database that is configured here.
  
* Datei <code>/etc/os4x.conf</code> bzw. Konfigurationsdatei in der Umgebungsvariable <code>$OS4X_CFGFILE</code> definiert. Über die Datenbank, die hier konfiguriert ist, wird das temporäre Verzeichnis sowie das Lizenzfile bezogen.  
+
== Configuration ==
 +
The program "<code>bzip2</code>" is searched for in the <code>PATH</code> of the shell under which the plugin is started. This means that the bzip2 version used can be influenced by clever positioning or definition of the default PATH.
  
== Konfiguration ==
+
The compression factor (0-9, where 0 represents no compression and 9 is the highest compression level) can be passed when calling the plugin via the optional configuration XML. The default compression factor is 9.
  
Das Programm "<code>bzip2</code>" wird im <code>PATH</code> der Shell gesucht, unter der das Plugin gestartet wird. Somit kann durch geschickte Positionierung oder Definition des Default-PATHs die genutzte bzip2-Version beeinflusst werden.
+
== Return codes ==
 
+
*0: everything OK
Der Kompressionsfaktor (0-9, wobei 0 keine Kompression darstellt und 9 die höchste Kompressionsstufe ist) kann beim Plugin-Aufruf über das optionale Konfigurations-XML übergeben werden. Der Standard-Kompressionsfaktor ist 9.
+
*1: Number of parameters != 1; Config file <code>/etc/os4x.conf</code> not found; Config in database not readable; License not valid; XML file invalid
 
+
*all others: return value of the bzip2 call
== Rückgabewerte ==
 
*0: alles OK
 
*1: Fehler beim Parsen des XMLs
 
*alle anderen: Rückgabewert des bzip2-Aufrufs
 

Latest revision as of 08:50, 29 July 2024


Purpose

Compressing each individual file defined in the passed XML using bzip2. The original files are exchanged in the file system using the bzip2 process. The extension ".bz2" is appended to each file. The new file name is changed in the XML file. The compression node "compression" in the XML is changed to "bzip2" for each file.

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 "bzip2" is searched for in the PATH of the shell under which the plugin is started. This means that the bzip2 version used can be influenced by clever positioning or definition of the default PATH.

The compression factor (0-9, where 0 represents no compression and 9 is the highest compression level) can be passed when calling the plugin via the optional configuration XML. The default compression factor is 9.

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: return value of the bzip2 call