Top | ![]() |
![]() |
![]() |
![]() |
GEnum ├── OsinfoDeviceDriverSigningReq ├── OsinfoInstallScriptInstallationSource ╰── OsinfoPathFormat GFlags ╰── OsinfoInstallScriptInjectionMethod
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.
OsinfoInstallScript * osinfo_install_script_new_uri (const gchar *id
,const gchar *profile
,const gchar *templateUri
);
Construct a new install script from a stylesheet URI
Since: 0.2.0
OsinfoInstallScript * osinfo_install_script_new_data (const gchar *id
,const gchar *profile
,const gchar *templateData
);
Construct a new install script from stylesheet data
Since: 0.2.0
const gchar *
osinfo_install_script_get_template_uri
(OsinfoInstallScript *script
);
Returns the stylesheet URI used to construct the install script.
Since: 0.2.0
const gchar *
osinfo_install_script_get_template_data
(OsinfoInstallScript *script
);
Returns the stylesheet data used to construct the install script.
Since: 0.2.0
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.
Since: 0.2.0
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
$ - 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.
Since: 0.2.2
void osinfo_install_script_set_output_prefix (OsinfoInstallScript *script
,const gchar *prefix
);
Mind that not all installers support any name for the installer scripts.
Since: 0.2.0
const gchar *
osinfo_install_script_get_output_prefix
(OsinfoInstallScript *script
);
Since: 0.2.8
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.
Since: 0.2.0
const gchar *
osinfo_install_script_get_expected_filename
(OsinfoInstallScript *script
);
Some operating systems (as Windows) expect that script filename has particular name to work.
Since: 0.2.1
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.
The avatar format, or NULL if there is no restrictions on the format of avatar.
[transfer none]
Since: 0.2.2
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.
script |
the install script |
|
os |
the os |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 0.2.0
gchar * osinfo_install_script_generate_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
The location where to store any error, or NULL |
Since: 0.2.0
gchar * osinfo_install_script_generate (OsinfoInstallScript *script
,OsinfoOs *os
,OsinfoInstallConfig *config
,GCancellable *cancellable
,GError **error
);
Creates an install script.
script |
the install script |
|
os |
the os |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
The location where to store any error, or |
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
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.
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 |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 0.2.0
GFile * osinfo_install_script_generate_output_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
The location where to store any error, or NULL |
Since: 0.2.3
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.
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 |
[allow-none] |
error |
The location where to store any error, or |
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
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.
script |
the install script |
|
media |
the media |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 0.2.12
gchar * osinfo_install_script_generate_for_media_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
The location where to store any error, or NULL |
Since: 0.2.12
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.
script |
the install script |
|
media |
the media |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
The location where to store any error, or |
Since: 0.2.12
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.
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 |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 0.2.12
GFile * osinfo_install_script_generate_output_for_media_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
the location where to store any error, or NULL |
Since: 0.2.12
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.
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 |
[allow-none] |
error |
The location where to store any error, or |
Since: 0.2.12
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.
Since: 0.2.7
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.
Since: 0.2.12
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.
Since: 1.6.0
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.
Since: 0.2.0
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.
Since: 0.2.0
OsinfoInstallConfigParam * osinfo_install_script_get_config_param (OsinfoInstallScript *script
,const gchar *name
);
Get a config param from the config param's list
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
GList *
osinfo_install_script_get_config_param_list
(OsinfoInstallScript *script
);
Get the list of valid config parameters for script
.
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
OsinfoInstallConfigParamList *
osinfo_install_script_get_config_params
(OsinfoInstallScript *script
);
Get the list of valid config parameters for script
.
Since: 0.2.3
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.
Since: 0.2.2
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/preferred to be available during actual installation.
Since: 0.2.2
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.
Since: 0.2.2
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.
Since: 0.2.6
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.
Since: 0.2.6
unsigned int
osinfo_install_script_get_injection_methods
(OsinfoInstallScript *script
);
Retrieve the supported method to inject the script in to the installation process.
bitwise-or of supported methods for install script injection.
[type OsinfoInstallScriptInjectionMethod]
Since: 0.2.10
gboolean
osinfo_install_script_get_needs_internet
(OsinfoInstallScript *script
);
Some install scripts cannot ensure that they work without an internet connection.
Since: 0.2.11
void osinfo_install_script_set_preferred_injection_method (OsinfoInstallScript *script
,OsinfoInstallScriptInjectionMethod method
);
Set the preferred injection method to be used with the script
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
OsinfoInstallScriptInjectionMethod
osinfo_install_script_get_preferred_injection_method
(OsinfoInstallScript *script
);
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
void osinfo_install_script_set_installation_source (OsinfoInstallScript *script
,OsinfoInstallScriptInstallationSource source
);
Set the installation source to be used with the script
.
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
OsinfoInstallScriptInstallationSource
osinfo_install_script_get_installation_source
(OsinfoInstallScript *script
);
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
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.
script |
the install script |
|
tree |
the tree |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 1.6.0
gchar * osinfo_install_script_generate_for_tree_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
the location where to story any error, or NULL |
Since: 1.6.0
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.
script |
the install script |
|
tree |
the tree |
|
config |
the install script config |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
The location where to store any error, or |
Since: 1.6.0
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.
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 |
[allow-none] |
callback |
Function to call when result of this call is ready |
|
user_data |
The user data to pass to |
Since: 1.6.0
GFile * osinfo_install_script_generate_output_for_tree_finish (OsinfoInstallScript *script
,GAsyncResult *res
,GError **error
);
script |
the install script |
|
res |
a GAsyncResult |
|
error |
the location where to store any error, or NULL |
Since: 1.6.0
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.
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 |
[allow-none] |
error |
The location where to store any error, or |
Since: 1.6.0
#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_URI "template-uri"
#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_DATA "template-data"
#define OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT "product-key-format"
#define OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME "expected-filename"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
#define OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET "needs-internet"
#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req"
#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req"
#define OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD "injection-method"
#define OSINFO_INSTALL_SCRIPT_PROP_PREFERRED_INJECTION_METHOD "preferred-injection-method"
#define OSINFO_INSTALL_SCRIPT_PROP_INSTALLATION_SOURCE "installation-source"
Script do not require device drivers to be signed. |
||
Script must only be given signed device drivers. Some scripts will allow overriding this requirement through osinfo_install_config_set_driver_signing function. You can query if a script supports this by checking if OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING configuration parameter is used by the script in question (or other scripts in the same profile). |
||
A warning will be issued by OS installer if device drivers are not signed and most probably require user input (and thus breaking unattended installation). See OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT on how this warning can be disabled for some scripts. |
Since: 0.2.6
Support injection of the installation script through a CD-ROM. |
||
Support injection of the installation script through a disk. |
||
Support injection of the installation script through a floppy disk. |
||
Support injection of the installation script through the initrd. |
||
Support injection of the installation script from the web. |
Since: 0.2.10