summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2018-11-27 13:48:00 +0100
committerFabiano Fidêncio <fidencio@redhat.com>2018-12-20 11:05:06 +0100
commitc2c2e1219907e6786eda94f1c7508ff79d0554d1 (patch)
tree1787c18f1d78975962a97c37c35e082021a79102
parent7457f00b13b3ca7ff1f509f973d0a7831cb5ffee (diff)
downloadlibosinfo-c2c2e1219907e6786eda94f1c7508ff79d0554d1.tar.gz
tools,install-script: Add "installation-source" parameter
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r--tools/osinfo-install-script.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index f4e632a..6ef0cc0 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -30,6 +30,7 @@
static const gchar *profile = "jeos";
static const gchar *output_dir;
static const gchar *prefix;
+static const gchar *source = "media";
static gboolean list_config = FALSE;
static gboolean list_profile = FALSE;
@@ -72,6 +73,8 @@ static GOptionEntry entries[] =
N_("Install script output directory"), NULL, },
{ "prefix", 'P', 0, G_OPTION_ARG_STRING, (void*)&prefix,
N_("The output filename prefix"), NULL, },
+ { "installation-source", 's', 0, G_OPTION_ARG_STRING, (void*)&source,
+ N_("The installation source to be used with the script"), NULL, },
{ "config", 'c', 0, G_OPTION_ARG_CALLBACK,
handle_config,
N_("Set configuration parameter"), "key=value" },
@@ -250,6 +253,13 @@ static gboolean generate_script(OsinfoOs *os, OsinfoMedia *media)
for (tmp = l; tmp != NULL; tmp = tmp->next) {
OsinfoInstallScript *script = tmp->data;
+ OsinfoInstallScriptInstallationSource installation_source;
+
+ installation_source = g_str_equal(source, "network") ?
+ OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_NETWORK :
+ OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA;
+ osinfo_install_script_set_installation_source(script,
+ installation_source);
if (prefix)
osinfo_install_script_set_output_prefix(script, prefix);
@@ -429,6 +439,11 @@ By default a script will be generated for a C<JEOS> style install.
Choose the installation script profile. Defaults to C<jeos>, but
can also be C<desktop>, or a site specific profile name
+=item B<--installation-source=NAME>
+
+Set the installation source to be used with the installation
+script. Defaults to C<media>, but can also be C<network>.
+
=item B<--config=key=value>
Set the configuration parameter C<key> to C<value>.