[network-manager-openvpn/dcbw/openvpn-restart: 3/5] core: print executed openvpn command-line when debug logging is enabled



commit 45070bde75c5790f25218a4c24381897fb83361b
Author: Dan Williams <dcbw redhat com>
Date:   Fri Oct 17 12:38:31 2014 -0500

    core: print executed openvpn command-line when debug logging is enabled

 src/nm-openvpn-service.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 1404111..8f0e257 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1260,6 +1260,13 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
 
        g_ptr_array_add (args, NULL);
 
+       if (debug) {
+               char *cmd = g_strjoinv (" ", (char **) args->pdata);
+
+               g_message ("EXEC: '%s'", cmd);
+               g_free (cmd);
+       }
+
        if (!g_spawn_async (NULL, (char **) args->pdata, NULL,
                            G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, error)) {
                free_openvpn_args (args);


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