[libosinfo PATCH v2 2/2] tools, install-script: Deprecate --config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux