From d3026a6d331298003ccc6cd9d2e20dcb7fa9ae1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= Date: Wed, 3 Jul 2019 13:31:54 +0200 Subject: [PATCH] respect NM_VPN_PLUGIN_DIR --- src/vpn/nm-vpn-manager.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c index d063916..d779166 100644 --- a/src/vpn/nm-vpn-manager.c +++ b/src/vpn/nm-vpn-manager.c @@ -223,6 +223,7 @@ nm_vpn_manager_init (NMVpnManager *self) GSList *infos, *info; const char *conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc (); const char *conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib (); + const char *conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user (); /* Watch the VPN directory for changes */ file = g_file_new_for_path (conf_dir_lib); @@ -241,6 +242,14 @@ nm_vpn_manager_init (NMVpnManager *self) G_CALLBACK (vpn_dir_changed), self); } + file = g_file_new_for_path (conf_dir_user); + priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL); + g_object_unref (file); + if (priv->monitor_etc) { + priv->monitor_id_etc = g_signal_connect (priv->monitor_etc, "changed", + G_CALLBACK (vpn_dir_changed), self); + } + /* first read conf_dir_lib. The name files are not really user configuration, but * plugin configuration. Hence we expect ~newer~ plugins to install their files * in /usr/lib/NetworkManager. We want to prefer those files. @@ -255,6 +264,11 @@ nm_vpn_manager_init (NMVpnManager *self) try_add_plugin (self, info->data); g_slist_free_full (infos, g_object_unref); + infos = _nm_vpn_plugin_info_list_load_dir (conf_dir_user, TRUE, 0, NULL, NULL); + for (info = infos; info; info = info->next) + try_add_plugin (self, info->data); + g_slist_free_full (infos, g_object_unref); + priv->active_services = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); } -- 2.22.0 85ba1e6'>root/tests/guix-hash.sh
AgeCommit message (Expand)Author
2016-09-07guix hash: Add --exclude-vcs option....* guix/scripts/hash.scm (show-help): Add help text for --exclude-vcs option. (%options): Add --exclude-vcs option. (guix-hash): Handle exclude-vcs option. * doc/guix.texi ("Invoking guix hash"): Update doc. * tests/guix-hash.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Jan Nieuwenhuizen
2014-02-21guix hash: Add '--recursive'....* guix/scripts/hash.scm (show-help): Add --recursive. (%options): Likewise. (guix-hash)[file-hash]: New procedure. Honor --recursive. Use it. * guix/nar.scm (write-file): Add missing field to the &nar-error condition raised upon unsupported file type; change its message to be more descriptive. * tests/guix-hash.sh: Add tests with -r. * doc/guix.texi (Invoking guix hash): Document --recursive. Ludovic Courtès