AMD OSRC (AMD Operating System Research Center) > Tapper-Installer-4.1.0 > Tapper::Installer::Precondition

Download:
Tapper-Installer-4.1.0.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  1
View/Report Bugs
Module Version: 4.1.0   Source   Latest Release: Tapper-Installer-4.1.1

NAME ^

Tapper::Installer::Precondition

SYNOPSIS ^

 use Tapper::Installer::Precondition;

NAME ^

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

FUNCTIONS ^

get_file_type

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)

gethostname

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

cleanup

Clean up all remaining preparations (given in config).

@return success - 0 @return error - error string

handle_source_url

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

precondition_install

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

file_save

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

AUTHOR ^

AMD OSRC Tapper Team <tapper@amd64.org>

COPYRIGHT AND LICENSE ^

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

This is free software, licensed under:

  The (two-clause) FreeBSD License
syntax highlighting: