[Libosinfo] [libosinfo PATCH v2 2/2] tools, install-script: Deprecate --config
Fabiano Fidêncio
fidencio at redhat.com
Tue Jul 9 09:24:50 UTC 2019
Let's deprecate --config and warn out whenever a user or admin password
is passed to osinfo-install-script.
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
tools/osinfo-install-script.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index a525645..f756ba3 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -85,6 +85,12 @@ static gboolean handle_config(const gchar *option_name G_GNUC_UNUSED,
val++;
key = g_strndup(value, len);
+ if (g_str_equal(key, OSINFO_INSTALL_CONFIG_PROP_USER_PASSWORD) ||
+ g_str_equal(key, OSINFO_INSTALL_CONFIG_PROP_ADMIN_PASSWORD)) {
+ g_warning("When setting user or admin password, use --config-file "
+ "instead.\n");
+ }
+
osinfo_entity_set_param(OSINFO_ENTITY(config),
key,
val);
@@ -519,6 +525,7 @@ 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>.
+This option has been deprecated in favour of B<--config-file>.
=item B<--config-file=config-file>
--
2.21.0
More information about the Libosinfo
mailing list