use Tapper::Installer::Precondition;


Tapper::Installer::Precondition - Base class with common functions for Tapper::Installer::Precondition modules



Return the file type of a given file. "rpm, "deb", "tar", "gzip", "bz2" and "iso" 9660 cd images are recognised at the moment. If file does not exists at the given file name, only suffix analysis will be available. To enforce any of the above mentioned types, just set the suffix of the file accordingly.

@param string - file name

@returnlist success - (0, rpm|deb|iso|tar|gzip|bzip2) @returnlist error - (1, error string)


This function returns the host name of the machine. When NFS root is used together with DHCP the hostname set in the kernel usually equals the IP address received from DHCP as a string. In this case the kernel hostname is set to the DNS hostname associated to this IP address.

@return hostname of the machine as set in the kernel


Clean up all remaining preparations (given in config).

@return success - 0 @return error - error string


A preconditions source may need some preparation, e.g. if it's located on an NFS share we need to mount this share. This function handles these preparations.

@param hash ref - precondition

@return success - hash ref with updated precondition @return error - error string


Install a precondition with preparations up front. This could be mounting an NFS share or installing inside a virtualisation guest or even no preparation at all.

A guest can be given as image, partition or directory. This function makes the necessary preparations, calls the right precondition install function and cleans up afterwards. An image can be given as file name and partition or file name only. The later is supposed to be an image file containing just one partition.

@param hash ref - precondition

@return success - 0 @return error - error string


Save output as file for MCP to find it and upload it to reports receiver.

@param string - output to be written to file @param string - basename of the file to write output to

@return success - 0 @return errorr - error string


  • AMD OSRC Tapper Team <>

  • Tapper Team <>


This software is Copyright (c) 2016 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License