networkAgent: Update VPN config path

The location moved a while ago, so update the path to point to
the non-deprecated location.

https://bugzilla.gnome.org/show_bug.cgi?id=791487
This commit is contained in:
Florian Müllner 2017-12-11 18:37:45 +01:00
parent aab7656d88
commit 3f3e514ff2
5 changed files with 10 additions and 5 deletions

View File

@ -14,6 +14,6 @@ var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
var LOCALEDIR = '@datadir@/locale'; var LOCALEDIR = '@datadir@/locale';
/* other standard directories */ /* other standard directories */
var LIBEXECDIR = '@libexecdir@'; var LIBEXECDIR = '@libexecdir@';
var SYSCONFDIR = '@sysconfdir@'; var NMPREFIXDIR = '@nmprefixdir@';
/* g-i package versions */ /* g-i package versions */
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@' var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'

View File

@ -7,7 +7,7 @@ jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager) jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
jsconf.set('datadir', datadir) jsconf.set('datadir', datadir)
jsconf.set('libexecdir', libexecdir) jsconf.set('libexecdir', libexecdir)
jsconf.set('sysconfdir', sysconfdir) jsconf.set('nmprefixdir', nm_prefix)
config_js = configure_file( config_js = configure_file(
input: 'config.js.in', input: 'config.js.in',

View File

@ -587,7 +587,7 @@ var NetworkAgent = new Lang.Class({
this._vpnRequests = { }; this._vpnRequests = { };
this._notifications = { }; this._notifications = { };
this._pluginDir = Gio.file_new_for_path(GLib.build_filenamev([Config.SYSCONFDIR, 'NetworkManager/VPN'])); this._pluginDir = Gio.file_new_for_path(GLib.build_filenamev([Config.NMPREFIXDIR, 'lib/NetworkManager/VPN']));
try { try {
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null); let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed', () => { this._vpnCacheBuilt = false; }); monitor.connect('changed', () => { this._vpnCacheBuilt = false; });

View File

@ -43,7 +43,6 @@ datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir')) libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir')) libexecdir = join_paths(prefix, get_option('libexecdir'))
mandir = join_paths(prefix, get_option('mandir')) mandir = join_paths(prefix, get_option('mandir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
pkgdatadir = join_paths(datadir, meson.project_name()) pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name()) pkglibdir = join_paths(libdir, meson.project_name())
@ -113,6 +112,13 @@ else
have_networkmanager = false have_networkmanager = false
endif endif
networkmanager_dep = dependency('NetworkManager', required: false)
if (networkmanager_dep.found())
nm_prefix = networkmanager_dep.get_pkgconfig_variable('prefix')
else
nm_prefix = prefix
endif
if get_option('systemd') if get_option('systemd')
systemd_dep = dependency('libsystemd') systemd_dep = dependency('libsystemd')
have_systemd = systemd_dep.found() have_systemd = systemd_dep.found()

View File

@ -13,7 +13,6 @@ script_data.set('libdir', libdir)
script_data.set('libexecdir', libexecdir) script_data.set('libexecdir', libexecdir)
script_data.set('pkgdatadir', pkgdatadir) script_data.set('pkgdatadir', pkgdatadir)
script_data.set('pkglibdir', pkglibdir) script_data.set('pkglibdir', pkglibdir)
script_data.set('sysconfdir', sysconfdir)
script_data.set('PYTHON', python.path()) script_data.set('PYTHON', python.path())
script_data.set('VERSION', meson.project_version()) script_data.set('VERSION', meson.project_version())