HSCRIPT-IMAGE(1)

NAME
hscript-image - create an image based on a HorizonScript for later deployment

SYNOPSIS
hscript-image [-e DIRECTORY] [-h] [-i DIRECTORY] [-n] [-o OUTPUT-FILE] [-t TYPE] [-v] [INSTALLFILE]

DESCRIPTION
The hscript-image utility creates an image of an operating environment. The environment is configured per a provided HorizonScript file.

  Image Creation
The hscript-image utility first executes the HorizonScript in a temporary directory, called the intermediate directory. From there, the hscript-image utility then creates the image using the files present in the intermediate directory. The intermediate directory is not removed after image creation, allowing inspection of the files used to create the image.

  Image Formats
The hscript-image utility can be extended with new image formats by writing a new backend. The backends included with the default distribution include:

tar Creates a pax-extended ustar archive. See 1p(pax) for a description of the on-disk format. This archive may be extracted to the desired system at a later time.

tgz, tbz, txz
    Creates a pax-extended ustar archive, like tar, but additionally compresses the archive with 1(gzip) (tgz), 1(bzip2) (tbz), or 1(xz) (txz).

OPTIONS
The hscript-image utility supports the following options:

-h  Prints a short help message to the current terminal and exits.

-i DIRECTORY
    Sets the intermediate directory to DIRECTORY.

-n  Disables colour output and ANSI escapes when writing log output. This is the default mode when not running on a terminal.

-o OUTPUT-FILE
    Writes the image to OUTPUT-FILE instead of the backend default (typically "image.tar" or similar).

-t TYPE
    Sets the image type to TYPE. A list of image types supported by your copy of the hscript-image utility can be obtained by specifying list as the argument to -t.

-v  Displays the version information for this utility, and then exits.

-e DIRECTORY
    Sets the qemu-static binary directory to DIRECTORY. This must be equivalent to the configuration of binfmt-misc on the host. The default is /usr/bin, and typically should not be changed unless you have a very good reason.

INSTALLFILE
    Specifies the location of the HorizonScript to use for configuring the image. You may specify "-" to read from standard input.

FILES

/etc/horizon/installfile
    This is the default location for the HorizonScript to be read, if it is not specified on the command line.

EXIT STATUS

EXAMPLES
The following invocation creates a XZ-compressed pax archive named "myimage.tar.xz" using the configuration contained in the HorizonScript at /srv/scripts/myimage.installfile.
    $ hscript-image -t txz -o myimage.tar.xz /srv/scripts/myimage.installfile

The following invocation creates a pax archive named "myimage.tar" using the configuration contained in the HorizonScript at /srv/scripts/myimage.installfile, using /tmp/image-ir as the intermediate directory:
    $ hscript-image -o myimage.tar -i /tmp/image-ir /srv/scripts/myimage.installfile

DIAGNOSTICS

%dateT%time log %location: %status: %message[: %extra] A message of type %status was logged while processing %location. The log message %message may be followed by additional information or hints in %extra.

%dateT%time step-start %step Denotes that the installation step %step is starting. Steps are described in the Steps section of the hscript-executor(8) manual.

%dateT%time step-end %step Denotes that the installation step %step has finished successfully. Steps are described in the Steps section of the hscript-executor(8) manual.

SEE ALSO
hscript-validate(1), hscript(5), hscript-executor(8).

HISTORY
The hscript-image command first appeared in Horizon 0.9.

AUTHORS
A. Wilcox <awilfox@adelielinux.org>