OsinfoInstallScript

OsinfoInstallScript — OS install script generation

Functions

OsinfoInstallScript * osinfo_install_script_new ()
OsinfoInstallScript * osinfo_install_script_new_uri ()
OsinfoInstallScript * osinfo_install_script_new_data ()
const gchar * osinfo_install_script_get_template_uri ()
const gchar * osinfo_install_script_get_template_data ()
const gchar * osinfo_install_script_get_profile ()
const gchar * osinfo_install_script_get_product_key_format ()
void osinfo_install_script_set_output_prefix ()
const gchar * osinfo_install_script_get_output_prefix ()
const gchar * osinfo_install_script_get_output_filename ()
const gchar * osinfo_install_script_get_expected_filename ()
OsinfoAvatarFormat * osinfo_install_script_get_avatar_format ()
void osinfo_install_script_generate_async ()
gchar * osinfo_install_script_generate_finish ()
gchar * osinfo_install_script_generate ()
void osinfo_install_script_generate_output_async ()
GFile * osinfo_install_script_generate_output_finish ()
GFile * osinfo_install_script_generate_output ()
void osinfo_install_script_generate_for_media_async ()
gchar * osinfo_install_script_generate_for_media_finish ()
gchar * osinfo_install_script_generate_for_media ()
void osinfo_install_script_generate_output_for_media_async ()
GFile * osinfo_install_script_generate_output_for_media_finish ()
GFile * osinfo_install_script_generate_output_for_media ()
gchar * osinfo_install_script_generate_command_line ()
gchar * osinfo_install_script_generate_command_line_for_media ()
gchar * osinfo_install_script_generate_command_line_for_tree ()
gboolean osinfo_install_script_has_config_param ()
gboolean osinfo_install_script_has_config_param_name ()
OsinfoInstallConfigParam * osinfo_install_script_get_config_param ()
GList * osinfo_install_script_get_config_param_list ()
OsinfoInstallConfigParamList * osinfo_install_script_get_config_params ()
OsinfoPathFormat osinfo_install_script_get_path_format ()
gboolean osinfo_install_script_get_can_pre_install_drivers ()
gboolean osinfo_install_script_get_can_post_install_drivers ()
int osinfo_install_script_get_pre_install_drivers_signing_req ()
int osinfo_install_script_get_post_install_drivers_signing_req ()
unsigned int osinfo_install_script_get_injection_methods ()
gboolean osinfo_install_script_get_needs_internet ()
void osinfo_install_script_set_preferred_injection_method ()
OsinfoInstallScriptInjectionMethod osinfo_install_script_get_preferred_injection_method ()
void osinfo_install_script_set_installation_source ()
OsinfoInstallScriptInstallationSource osinfo_install_script_get_installation_source ()
void osinfo_install_script_generate_for_tree_async ()
gchar * osinfo_install_script_generate_for_tree_finish ()
gchar * osinfo_install_script_generate_for_tree ()
void osinfo_install_script_generate_output_for_tree_async ()
GFile * osinfo_install_script_generate_output_for_tree_finish ()
GFile * osinfo_install_script_generate_output_for_tree ()

Properties

gchar * application-id Read / Write
gchar * architecture Read / Write
gboolean eject-after-install Read / Write
gchar * initrd-path Read / Write
gboolean installer Read / Write
gint installer-reboots Read / Write
gboolean installer-script Read / Write
gchar * kernel-path Read / Write
gpointer languages Read
gboolean live Read / Write
OsinfoOs * os Read / Write
gchar * publisher-id Read / Write
gchar * system-id Read / Write
gchar * url Read / Write
gchar * volume-id Read / Write
gint64 volume-size Read / Write
gchar * distro Read
gchar * family Read
gchar * kernel-url-argument Read
gchar * architecture Read / Write
gchar * boot-iso-path Read / Write
gboolean has-treeinfo Read / Write
gchar * initrd-path Read / Write
gchar * kernel-path Read / Write
OsinfoOs * os Read / Write
gchar * treeinfo-arch Read / Write
gchar * treeinfo-family Read / Write
gchar * treeinfo-variant Read / Write
gchar * treeinfo-version Read / Write
gchar * url Read / Write
OsinfoAvatarFormat * avatar-format Read
OsinfoInstallScriptInstallationSource installation-source Read
OsinfoPathFormat path-format Read
OsinfoInstallScriptInjectionMethod preferred-injection-method Read / Write
gchar * product-key-format Read
gchar * profile Read / Write / Construct Only
gchar * template-data Read / Write / Construct Only
gchar * template-uri Read / Write / Construct Only

Types and Values

Object Hierarchy

    GEnum
    ├── OsinfoDeviceDriverSigningReq
    ├── OsinfoInstallScriptInstallationSource
    ╰── OsinfoPathFormat
    GFlags
    ╰── OsinfoInstallScriptInjectionMethod
    GObject
    ╰── OsinfoEntity
        ├── OsinfoInstallScript
        ├── OsinfoProduct
           ╰── OsinfoOs
        ├── OsinfoMedia
        ╰── OsinfoTree

Description

OsinfoInstallScript is an object used to generate an automated installation script for an OS. The OS configuration data (language, keyboard, timezone, ...) comes from an OsinfoInstallConfig object.

Functions

osinfo_install_script_new ()

OsinfoInstallScript *
osinfo_install_script_new (const gchar *id);

osinfo_install_script_new_uri ()

OsinfoInstallScript *
osinfo_install_script_new_uri (const gchar *id,
                               const gchar *profile,
                               const gchar *templateUri);

Construct a new install script from a stylesheet URI

Parameters

id

a unique identifier

 

profile

the profile of script

 

templateUri

style sheet URI

 

Returns

an new install script.

[transfer full]

Since: 0.2.0


osinfo_install_script_new_data ()

OsinfoInstallScript *
osinfo_install_script_new_data (const gchar *id,
                                const gchar *profile,
                                const gchar *templateData);

Construct a new install script from stylesheet data

Parameters

id

a unique identifier

 

profile

the profile of script

 

templateData

style sheet data

 

Returns

an new install script.

[transfer full]

Since: 0.2.0


osinfo_install_script_get_template_uri ()

const gchar *
osinfo_install_script_get_template_uri
                               (OsinfoInstallScript *script);

Returns the stylesheet URI used to construct the install script.

Parameters

script

the install script

 

Since: 0.2.0


osinfo_install_script_get_template_data ()

const gchar *
osinfo_install_script_get_template_data
                               (OsinfoInstallScript *script);

Returns the stylesheet data used to construct the install script.

Parameters

script

the install script

 

Since: 0.2.0


osinfo_install_script_get_profile ()

const gchar *
osinfo_install_script_get_profile (OsinfoInstallScript *script);

Returns a string representing the install script profile that's going to be used.

The values supported are "jeos" for minimal installations and "desktop" for workstation/desktop installations.

Parameters

script

the install script

 

Since: 0.2.0


osinfo_install_script_get_product_key_format ()

const gchar *
osinfo_install_script_get_product_key_format
                               (OsinfoInstallScript *script);

If this function returns a non-NULL string, it means that the script requires you to specify product registration key through OsinfoInstallConfig instance passed to script generation methods.

The returned string specifies the expected format of the product key like this:

@ - any character % - alphabet

- numeric character

$ - alphanumeric character

All other characters represent themselves.

For example in case of installer for Microsoft Windows XP, you'll get "$$$$$-$$$$$-$$$$$-$$$$$-$$$$$". That means a product key consists of 24 alphanumeric characters and 4 '-' characters at (0-based) indices 5, 11, 17 and 23.

Parameters

script

the install script

 

Returns

Product key format mask, or NULL.

[transfer none]

Since: 0.2.2


osinfo_install_script_set_output_prefix ()

void
osinfo_install_script_set_output_prefix
                               (OsinfoInstallScript *script,
                                const gchar *prefix);

Mind that not all installers support any name for the installer scripts.

Parameters

script

the install script

 

prefix

a prefix to be added to the file generated

 

Since: 0.2.0


osinfo_install_script_get_output_prefix ()

const gchar *
osinfo_install_script_get_output_prefix
                               (OsinfoInstallScript *script);

Parameters

script

the install script

 

Returns

the prefix of the file generated

Since: 0.2.8


osinfo_install_script_get_output_filename ()

const gchar *
osinfo_install_script_get_output_filename
                               (OsinfoInstallScript *script);

Some operating systems are able to use any script filename, allowing the application to set the filename as desired. libosinfo provides this functionality by set the expected filename's prefix using osinfo_install_script_set_output_prefix() function.

Parameters

script

the install script

 

Returns

the output script filename.

[transfer none]

Since: 0.2.0


osinfo_install_script_get_expected_filename ()

const gchar *
osinfo_install_script_get_expected_filename
                               (OsinfoInstallScript *script);

Some operating systems (as Windows) expect that script filename has particular name to work.

Parameters

script

the install script

 

Returns

the expected script filename.

[transfer none]

Since: 0.2.1


osinfo_install_script_get_avatar_format ()

OsinfoAvatarFormat *
osinfo_install_script_get_avatar_format
                               (OsinfoInstallScript *script);

Some install scripts have restrictions on the format of the user avatar. Use this method to retrieve those restrictions in the form of an OsinfoAvatarFormat instance.

Parameters

script

the install script

 

Returns

The avatar format, or NULL if there is no restrictions on the format of avatar.

[transfer none]

Since: 0.2.2


osinfo_install_script_generate_async ()

void
osinfo_install_script_generate_async (OsinfoInstallScript *script,
                                      OsinfoOs *os,
                                      OsinfoInstallConfig *config,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronous variant of osinfo_install_script_generate(). From the callback, call osinfo_install_script_generate_finish() to conclude this call and get the generated script.

If you are generating the script for a specific media, it is recommended that you use osinfo_install_script_generate_for_media_async() instead.

Parameters

script

the install script

 

os

the os

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 0.2.0


osinfo_install_script_generate_finish ()

gchar *
osinfo_install_script_generate_finish (OsinfoInstallScript *script,
                                       GAsyncResult *res,
                                       GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

The location where to store any error, or NULL

 

Returns

the generated script, or NULL on error.

[transfer full]

Since: 0.2.0


osinfo_install_script_generate ()

gchar *
osinfo_install_script_generate (OsinfoInstallScript *script,
                                OsinfoOs *os,
                                OsinfoInstallConfig *config,
                                GCancellable *cancellable,
                                GError **error);

Creates an install script.

Parameters

script

the install script

 

os

the os

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

the script as string.

If you are generating the script for a specific media, it is recommended that you use osinfo_install_script_generate_for_media() instead.

If you are generating the script for a specific tree, it is recommended that you use osinfo_install_script_generate_for_tree() in instead.

[transfer full]

Since: 0.2.0


osinfo_install_script_generate_output_async ()

void
osinfo_install_script_generate_output_async
                               (OsinfoInstallScript *script,
                                OsinfoOs *os,
                                OsinfoInstallConfig *config,
                                GFile *output_dir,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronous variant of osinfo_install_script_generate_output(). From the callback, call osinfo_install_script_generate_output_finish() to conclude this call and get the generated script.

If you are generating the script for a specific media, it is recommended that you use osinfo_install_script_generate_output_for_media_async() instead.

Parameters

script

the install script

 

os

the os

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 0.2.0


osinfo_install_script_generate_output_finish ()

GFile *
osinfo_install_script_generate_output_finish
                               (OsinfoInstallScript *script,
                                GAsyncResult *res,
                                GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

The location where to store any error, or NULL

 

Returns

a file containing the script, or NULL on error.

[transfer full]

Since: 0.2.3


osinfo_install_script_generate_output ()

GFile *
osinfo_install_script_generate_output (OsinfoInstallScript *script,
                                       OsinfoOs *os,
                                       OsinfoInstallConfig *config,
                                       GFile *output_dir,
                                       GCancellable *cancellable,
                                       GError **error);

Creates an install script that is written to the returned file.

Parameters

script

the install script

 

os

the os entity

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

a file containing the script

If you are generating the script for a specific media, it is recommended that you use osinfo_install_script_generate_output_for_media() instead.

If you are generating the script for a specific tree, it is recommended that you use osinfo_install_script_generate_output_for_tree() instead.

[transfer full]

Since: 0.2.0


osinfo_install_script_generate_for_media_async ()

void
osinfo_install_script_generate_for_media_async
                               (OsinfoInstallScript *script,
                                OsinfoMedia *media,
                                OsinfoInstallConfig *config,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronous variant of osinfo_install_script_generate_for_media(). From the callback, call osinfo_install_script_generate_for_media_finish() to conclude this call and get the generated script.

Parameters

script

the install script

 

media

the media

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 0.2.12


osinfo_install_script_generate_for_media_finish ()

gchar *
osinfo_install_script_generate_for_media_finish
                               (OsinfoInstallScript *script,
                                GAsyncResult *res,
                                GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

The location where to store any error, or NULL

 

Returns

the generated script, or NULL on error.

[transfer full]

Since: 0.2.12


osinfo_install_script_generate_for_media ()

gchar *
osinfo_install_script_generate_for_media
                               (OsinfoInstallScript *script,
                                OsinfoMedia *media,
                                OsinfoInstallConfig *config,
                                GCancellable *cancellable,
                                GError **error);

Creates an install script. The media media must have been identified successfully using osinfo_db_identify_media() before calling this function.

Parameters

script

the install script

 

media

the media

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

the script as string.

[transfer full]

Since: 0.2.12


osinfo_install_script_generate_output_for_media_async ()

void
osinfo_install_script_generate_output_for_media_async
                               (OsinfoInstallScript *script,
                                OsinfoMedia *media,
                                OsinfoInstallConfig *config,
                                GFile *output_dir,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronous variant of osinfo_install_script_generate_output_for_media(). From the callback, call osinfo_install_script_generate_output_for_media_finish() to conclude this call and get the generated file.

Parameters

script

the install script

 

media

the media

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 0.2.12


osinfo_install_script_generate_output_for_media_finish ()

GFile *
osinfo_install_script_generate_output_for_media_finish
                               (OsinfoInstallScript *script,
                                GAsyncResult *res,
                                GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

the location where to store any error, or NULL

 

Returns

a file containing the script, or NULL on error.

[transfer full]

Since: 0.2.12


osinfo_install_script_generate_output_for_media ()

GFile *
osinfo_install_script_generate_output_for_media
                               (OsinfoInstallScript *script,
                                OsinfoMedia *media,
                                OsinfoInstallConfig *config,
                                GFile *output_dir,
                                GCancellable *cancellable,
                                GError **error);

Creates an install script that is written to the returned file.

Parameters

script

the install script

 

media

the media

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

a file containing the script.

[transfer full]

Since: 0.2.12


osinfo_install_script_generate_command_line ()

gchar *
osinfo_install_script_generate_command_line
                               (OsinfoInstallScript *script,
                                OsinfoOs *os,
                                OsinfoInstallConfig *config);

Some install scripts need to pass a command line to the kernel, Such install scripts belong to OSs that provide paths to the kernel and initrd files that can be used to directly boot (http://wiki.qemu.org/download/qemu-doc.htmldirect_005flinux_005fboot) the OS in order to pass the needed commandline to it.

If you are generating the command line for a specific media, it is recommended that you use osinfo_install_script_generate_command_line_for_media() instead.

If you are generating the command line for a specific tree, it is recommended that you use osinfo_install_script_generate_command_line_for_tree() instead.

Parameters

script

the install script

 

os

the os entity

 

config

the install script config

 

Returns

The generated command line string, NULL otherwise.

[transfer full]

Since: 0.2.7


osinfo_install_script_generate_command_line_for_media ()

gchar *
osinfo_install_script_generate_command_line_for_media
                               (OsinfoInstallScript *script,
                                OsinfoMedia *media,
                                OsinfoInstallConfig *config);

Some install scripts need to pass a command line to the kernel, Such install scripts belong to OSs that provide paths to the kernel and initrd files that can be used to directly boot (http://wiki.qemu.org/download/qemu-doc.htmldirect_005flinux_005fboot) the OS in order to pass the needed commandline to it.

The media media must have been identified successfully using osinfo_db_identify_media() before calling this function.

Parameters

script

the install script

 

media

the media

 

config

the install script config

 

Returns

The generated command line string, NULL otherwise.

[transfer full]

Since: 0.2.12


osinfo_install_script_generate_command_line_for_tree ()

gchar *
osinfo_install_script_generate_command_line_for_tree
                               (OsinfoInstallScript *script,
                                OsinfoTree *tree,
                                OsinfoInstallConfig *config);

Some install scripts need to pass a command line to the kernel, Such install scripts belong to OSs that provide paths to the kernel and initrd files that can be used to directly boot (http://wiki.qemu.org/download/qemu-doc.htmldirect_005flinux_005fboot) the OS in order to pass the needed commandline to it.

The tree tree must have been identified successfully using osinfo_db_identify_tree() before calling this function.

Parameters

script

the install script

 

tree

the tree

 

config

the install script config

 

Returns

The generated command line string, NULL otherwise.

[transfer full]


osinfo_install_script_has_config_param ()

gboolean
osinfo_install_script_has_config_param
                               (OsinfoInstallScript *script,
                                OsinfoInstallConfigParam *config_param);

Returns whether the script has the config_param searched or not.

This code assumes that the 'id' and 'name' entity properties are the same.

Parameters

script

the install script

 

config_param

an OsinfoInstallConfigParam

 

Since: 0.2.0


osinfo_install_script_has_config_param_name ()

gboolean
osinfo_install_script_has_config_param_name
                               (OsinfoInstallScript *script,
                                const gchar *name);

Returns whether the script has a configuration parameter matching name or not.

Parameters

script

the install script

 

name

the configuration parameter name

 

Since: 0.2.0


osinfo_install_script_get_config_param ()

OsinfoInstallConfigParam *
osinfo_install_script_get_config_param
                               (OsinfoInstallScript *script,
                                const gchar *name);

Get a config param from the config param's list

Parameters

script

the install script

 

name

name of the parameter

 

Returns

the sought config param, if exists. NULL otherwise.

This code assumes that the 'id' and 'name' entity properties are the same.

[transfer full]

Since: 0.2.1


osinfo_install_script_get_config_param_list ()

GList *
osinfo_install_script_get_config_param_list
                               (OsinfoInstallScript *script);

Get the list of valid config parameters for script .

Parameters

script

the install script

 

Returns

the list of valid OsinfoInstallConfigParam parameters. Free with g_list_free() when done. The elements are owned by libosinfo.

[transfer container][element-type OsinfoInstallScript]

Since: 0.2.0


osinfo_install_script_get_config_params ()

OsinfoInstallConfigParamList *
osinfo_install_script_get_config_params
                               (OsinfoInstallScript *script);

Get the list of valid config parameters for script .

Parameters

script

the install script

 

Returns

the list of valid OsinfoInstallConfigParam parameters.

[transfer none]

Since: 0.2.3


osinfo_install_script_get_path_format ()

OsinfoPathFormat
osinfo_install_script_get_path_format (OsinfoInstallScript *script);

Returns the path format to be used for the files and disks which will be used during the installation.

Parameters

script

the install script

 

Returns

the path format to be used. OSINFO_PATH_FORMAT_UNIX is the default option.

Since: 0.2.2


osinfo_install_script_get_can_pre_install_drivers ()

gboolean
osinfo_install_script_get_can_pre_install_drivers
                               (OsinfoInstallScript *script);

Whether install script can install drivers at the very beginning of installation. This is needed for devices for which the OS in question does not have out of the box support for and devices are required/prefered to be available during actual installation.

Parameters

script

the install script

 

Returns

TRUE if install script supports pre-installable drivers, FALSE otherwise.

Since: 0.2.2


osinfo_install_script_get_can_post_install_drivers ()

gboolean
osinfo_install_script_get_can_post_install_drivers
                               (OsinfoInstallScript *script);

Whether install script can install drivers at the very end of installation This can be used for installing devices which the OS in question does not have out of the box support.

Parameters

script

the install script

 

Returns

TRUE if install script supports post-installable drivers, FALSE otherwise.

Since: 0.2.2


osinfo_install_script_get_pre_install_drivers_signing_req ()

int
osinfo_install_script_get_pre_install_drivers_signing_req
                               (OsinfoInstallScript *script);

If install script can install drivers at the very beginning of installation, this function retrieves the requirement about signed status of drivers.

Parameters

script

the install script

 

Returns

.

[type OsinfoDeviceDriverSigningReq]

Since: 0.2.6


osinfo_install_script_get_post_install_drivers_signing_req ()

int
osinfo_install_script_get_post_install_drivers_signing_req
                               (OsinfoInstallScript *script);

If install script can install drivers at the end of installation, this function retrieves the requirement about signed status of drivers.

Parameters

script

the install script

 

Returns

.

[type OsinfoDeviceDriverSigningReq]

Since: 0.2.6


osinfo_install_script_get_injection_methods ()

unsigned int
osinfo_install_script_get_injection_methods
                               (OsinfoInstallScript *script);

Retrieve the supported method to inject the script in to the installation process.

Parameters

script

the install script

 

Returns

bitwise-or of supported methods for install script injection.

[type OsinfoInstallScriptInjectionMethod]

Since: 0.2.10


osinfo_install_script_get_needs_internet ()

gboolean
osinfo_install_script_get_needs_internet
                               (OsinfoInstallScript *script);

Some install scripts cannot ensure that they work without an internet connection.

Parameters

script

the install script

 

Returns

TRUE if script needs an internet connection, FALSE otherwise internet connection.

Since: 0.2.11


osinfo_install_script_set_preferred_injection_method ()

void
osinfo_install_script_set_preferred_injection_method
                               (OsinfoInstallScript *script,
                                OsinfoInstallScriptInjectionMethod method);

Set the preferred injection method to be used with the script

Parameters

script

the install script

 

method

one of the injection methods: OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_FLOPPY, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_WEB

 

Since: 1.3.0


osinfo_install_script_get_preferred_injection_method ()

OsinfoInstallScriptInjectionMethod
osinfo_install_script_get_preferred_injection_method
                               (OsinfoInstallScript *script);

Parameters

script

the install script

 

Returns

the preferred injection method for the script. If none is set and OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK is supported, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK is returned, otherwise OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD is returned.

Since: 1.3.0


osinfo_install_script_set_installation_source ()

void
osinfo_install_script_set_installation_source
                               (OsinfoInstallScript *script,
                                OsinfoInstallScriptInstallationSource source);

Set the installation source to be used with the script .

Parameters

script

the install script

 

source

one of the installation sources: OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA, OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_NETWORK

 

Since: 1.3.0


osinfo_install_script_get_installation_source ()

OsinfoInstallScriptInstallationSource
osinfo_install_script_get_installation_source
                               (OsinfoInstallScript *script);

Parameters

script

the install script

 

Returns

the installation source to be used with the script. If none is set, it defaults to OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA.

Since: 1.3.0


osinfo_install_script_generate_for_tree_async ()

void
osinfo_install_script_generate_for_tree_async
                               (OsinfoInstallScript *script,
                                OsinfoTree *tree,
                                OsinfoInstallConfig *config,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronous variant of osinfo_install_script_generate_for_tree(). From the callback, call osinfo_install_script_generate_for_tree_finish() to conclude this call and get the generated script.

Parameters

script

the install script

 

tree

the tree

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 1.6.0


osinfo_install_script_generate_for_tree_finish ()

gchar *
osinfo_install_script_generate_for_tree_finish
                               (OsinfoInstallScript *script,
                                GAsyncResult *res,
                                GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

the location where to story any error, or NULL

 

Returns

the generated script, or NULL or error.

[transfer full]

Since: 1.6.0


osinfo_install_script_generate_for_tree ()

gchar *
osinfo_install_script_generate_for_tree
                               (OsinfoInstallScript *script,
                                OsinfoTree *tree,
                                OsinfoInstallConfig *config,
                                GCancellable *cancellable,
                                GError **error);

Creates an install script. The tree tree must have been identified successfully using osinfo_db_identify_tree() before calling this function.

Parameters

script

the install script

 

tree

the tree

 

config

the install script config

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

the script as string.

[transfer full]

Since: 1.6.0


osinfo_install_script_generate_output_for_tree_async ()

void
osinfo_install_script_generate_output_for_tree_async
                               (OsinfoInstallScript *script,
                                OsinfoTree *tree,
                                OsinfoInstallConfig *config,
                                GFile *output_dir,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronous variant of osinfo_install_script_generate_output_for_tree(). From the callback, call osinfo_install_script_generate_output_for_tree_finish() to conclude this call and get the generated file.

Parameters

script

the install script

 

tree

the tree

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

Function to call when result of this call is ready

 

user_data

The user data to pass to callback , or NULL

 

Since: 1.6.0


osinfo_install_script_generate_output_for_tree_finish ()

GFile *
osinfo_install_script_generate_output_for_tree_finish
                               (OsinfoInstallScript *script,
                                GAsyncResult *res,
                                GError **error);

Parameters

script

the install script

 

res

a GAsyncResult

 

error

the location where to store any error, or NULL

 

Returns

a file containing the script, or NULL on error.

[transfer full]

Since: 1.6.0


osinfo_install_script_generate_output_for_tree ()

GFile *
osinfo_install_script_generate_output_for_tree
                               (OsinfoInstallScript *script,
                                OsinfoTree *tree,
                                OsinfoInstallConfig *config,
                                GFile *output_dir,
                                GCancellable *cancellable,
                                GError **error);

Creates an install script that is written to the returned file.

Parameters

script

the install script

 

tree

the tree

 

config

the install script config

 

output_dir

the directory where the file containing the output script will be written

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

The location where to store any error, or NULL

 

Returns

a file containing the script.

[transfer full]

Since: 1.6.0

Types and Values

OSINFO_INSTALL_SCRIPT_PROFILE_JEOS

#define OSINFO_INSTALL_SCRIPT_PROFILE_JEOS    "jeos"

OSINFO_INSTALL_SCRIPT_PROFILE_DESKTOP

#define OSINFO_INSTALL_SCRIPT_PROFILE_DESKTOP "desktop"

OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_URI

#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_URI       "template-uri"

OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_DATA

#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_DATA      "template-data"

OSINFO_INSTALL_SCRIPT_PROP_PROFILE

#define OSINFO_INSTALL_SCRIPT_PROP_PROFILE            "profile"

OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT

#define OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT "product-key-format"

OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME

#define OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME  "expected-filename"

OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT

#define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT        "path-format"

OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS

#define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers"

OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS

#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"

OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET

#define OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET     "needs-internet"

OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ

#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req"

OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ

#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req"

OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD

#define OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD "injection-method"

OSINFO_INSTALL_SCRIPT_PROP_PREFERRED_INJECTION_METHOD

#define OSINFO_INSTALL_SCRIPT_PROP_PREFERRED_INJECTION_METHOD "preferred-injection-method"

OSINFO_INSTALL_SCRIPT_PROP_INSTALLATION_SOURCE

#define OSINFO_INSTALL_SCRIPT_PROP_INSTALLATION_SOURCE "installation-source"

enum OsinfoPathFormat

Members

OSINFO_PATH_FORMAT_UNIX

Unix/Linux path format, e.g /home/foo/bar.txt

 

OSINFO_PATH_FORMAT_DOS

DOS/Windows path format, e.g \My Documents\bar.txt

 

enum OsinfoDeviceDriverSigningReq

Members

OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE

   

OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT

   

OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN

   

Since: 0.2.6


enum OsinfoInstallScriptInjectionMethod

Members

OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM

   

OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK

   

OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_FLOPPY

   

OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD

   

OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_WEB

   

Since: 0.2.10


enum OsinfoInstallScriptInstallationSource

Members

OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA

   

OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_NETWORK

   

Since: 1.3.0


OsinfoMedia

typedef struct _OsinfoMedia OsinfoMedia;

OsinfoOs

typedef struct _OsinfoOs OsinfoOs;

OsinfoTree

typedef struct _OsinfoTree OsinfoTree;

Property Details

The “application-id” property

  “application-id”           gchar *

Expected application ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL


The “architecture” property

  “architecture”             gchar *

The target hardware architecture of this media.

Flags: Read / Write

Default value: NULL


The “eject-after-install” property

  “eject-after-install”      gboolean

Whether the media should be ejected after the installation process.

Some distros need their media to not be ejected after the final reboot during its installation process as some packages are installed after the reboot (which may cause the media to be ejected, depending on the application).

Flags: Read / Write

Default value: TRUE


The “initrd-path” property

  “initrd-path”              gchar *

The path to the initrd image in the install tree.

Flags: Read / Write

Default value: NULL


The “installer” property

  “installer”                gboolean

Whether media provides an installer for an OS.

Flags: Read / Write

Default value: TRUE


The “installer-reboots” property

  “installer-reboots”        gint

If media is an installer, this property indicates the number of reboots the installer takes before installation is complete.

This property is not applicable to media that has no installer. You can use osinfo_media_get_installer(or OsinfoMedia::installer) to check that.

Warning: Some media allow you to install from live sessions, in which case number of reboots *alone* is not a reliable method for tracking installation.

Flags: Read / Write

Default value: 1


The “installer-script” property

  “installer-script”         gboolean

Whether the media supports installation via an install-script.

Some distros provide a few different medias and not all the medias support installation via an install script.

Flags: Read / Write

Default value: TRUE


The “kernel-path” property

  “kernel-path”              gchar *

The path to the kernel image in the install tree.

Flags: Read / Write

Default value: NULL


The “languages” property

  “languages”                gpointer

If media is an installer, this property indicates the languages that can be used during automatic installations.

On media that are not installers, this property will indicate the languages that the user interface can be displayed in. Use osinfo_media_get_installer(or OsinfoMedia::installer) to know if the media is an installer or not.

Type: GLib.List(utf8) Transfer: container

Flags: Read


The “live” property

  “live”                     gboolean

Whether media can boot directly an OS without any installations.

Flags: Read / Write

Default value: FALSE


The “os” property

  “os”                       OsinfoOs *

Os information for the current media. For media stored in an OsinfoDB, it will be filled when the database is loaded, otherwise the property will be filled after a successful call to osinfo_db_identify_media().

Flags: Read / Write


The “publisher-id” property

  “publisher-id”             gchar *

Expected publisher ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL


The “system-id” property

  “system-id”                gchar *

Expected system ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL


The “url” property

  “url”                      gchar *

The URL to this media.

Flags: Read / Write

Default value: NULL


The “volume-id” property

  “volume-id”                gchar *

Expected volume ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL


The “volume-size” property

  “volume-size”              gint64

Expected volume size, in bytes for ISO9660 image/device.

Flags: Read / Write

Allowed values: >= -2147483648

Default value: -1


The “distro” property

  “distro”                   gchar *

The generic distro this OS belongs to, for example fedora, windows, solaris, freebsd etc.

Flags: Read

Default value: NULL


The “family” property

  “family”                   gchar *

The generic family this OS belongs to, based upon its kernel, for example linux, winnt, solaris, freebsd etc.

Flags: Read

Default value: NULL


The “kernel-url-argument” property

  “kernel-url-argument”      gchar *

The argument to be passed to kernel command line when performing a tree based installation of this OS.

Flags: Read

Default value: NULL


The “architecture” property

  “architecture”             gchar *

The target hardware architecture of this tree.

Flags: Read / Write

Default value: NULL


The “boot-iso-path” property

  “boot-iso-path”            gchar *

The path to the boot ISO in the install tree

Flags: Read / Write

Default value: NULL


The “has-treeinfo” property

  “has-treeinfo”             gboolean

Whether the tree has treeinfo or not

Flags: Read / Write

Default value: FALSE


The “initrd-path” property

  “initrd-path”              gchar *

The path to the initrd image in the install tree.

Flags: Read / Write

Default value: NULL


The “kernel-path” property

  “kernel-path”              gchar *

The path to the kernel image in the install tree.

Flags: Read / Write

Default value: NULL


The “os” property

  “os”                       OsinfoOs *

Os information for the current tree. For tree stored in an OsinfoDB, it will be filled when the database is loaded, otherwise the property will be filled after a successful call to osinfo_db_identify_tree().

Flags: Read / Write


The “treeinfo-arch” property

  “treeinfo-arch”            gchar *

The treeinfo arch

Flags: Read / Write

Default value: NULL


The “treeinfo-family” property

  “treeinfo-family”          gchar *

The treeinfo family

Flags: Read / Write

Default value: NULL


The “treeinfo-variant” property

  “treeinfo-variant”         gchar *

The treeinfo variant

Flags: Read / Write

Default value: NULL


The “treeinfo-version” property

  “treeinfo-version”         gchar *

The treeinfo version

Flags: Read / Write

Default value: NULL


The “url” property

  “url”                      gchar *

The URL to this tree.

Flags: Read / Write

Default value: NULL


The “avatar-format” property

  “avatar-format”            OsinfoAvatarFormat *

Expected avatar format.

Flags: Read


The “installation-source” property

  “installation-source”      OsinfoInstallScriptInstallationSource

The installation source to be used.

Flags: Read

Default value: OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA


The “path-format” property

  “path-format”              OsinfoPathFormat

Expected path format.

Flags: Read

Default value: OSINFO_PATH_FORMAT_UNIX


The “preferred-injection-method” property

  “preferred-injection-method” OsinfoInstallScriptInjectionMethod

The preferred injection method.

Flags: Read / Write

Default value: OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK


The “product-key-format” property

  “product-key-format”       gchar *

Product key format mask.

Flags: Read

Default value: NULL


The “profile” property

  “profile”                  gchar *

Install script profile name.

Flags: Read / Write / Construct Only

Default value: NULL


The “template-data” property

  “template-data”            gchar *

Data for install script template.

Flags: Read / Write / Construct Only

Default value: NULL


The “template-uri” property

  “template-uri”             gchar *

URI for install script template.

Flags: Read / Write / Construct Only

Default value: NULL

See Also

OsinfoInstallConfig