network-manager: fix hard-coded path for modprobe

This commit is contained in:
montag451 2017-07-06 15:14:01 +02:00 committed by Frederik Rietdijk
parent 7e3a1a58cf
commit 21ef8d5c89
2 changed files with 14 additions and 1 deletions

View file

@ -32,7 +32,6 @@ stdenv.mkDerivation rec {
--replace /usr/bin/ping6 ${inetutils}/bin/ping
substituteInPlace src/devices/nm-arping-manager.c \
--replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);'
substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe
substituteInPlace data/84-nm-drivers.rules \
--replace /bin/sh ${stdenv.shell}
substituteInPlace data/85-nm-unmanaged.rules \
@ -43,6 +42,8 @@ stdenv.mkDerivation rec {
--replace /bin/kill ${coreutils}/bin/kill
substituteInPlace clients/common/nm-vpn-helpers.c \
--subst-var-by openconnect ${openconnect}
substituteInPlace src/nm-core-utils.c \
--subst-var-by modprobeBinPath ${kmod}/bin/modprobe
# to enable link-local connections
configureFlags="$configureFlags --with-udev-dir=$out/lib/udev"
'';
@ -79,6 +80,7 @@ stdenv.mkDerivation rec {
url = "https://github.com/NetworkManager/NetworkManager/commit/4e8eddd100bbc8429806a70620c90b72cfd29cb1.patch";
})
./openconnect_helper_path.patch
./modprobe.patch
];
buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp

View file

@ -0,0 +1,11 @@
--- a/src/nm-core-utils.c 2017-02-15 13:10:27.000000000 +0100
+++ b/src/nm-core-utils.c 2017-07-06 14:28:41.575815695 +0200
@@ -419,7 +419,7 @@
/* construct the argument list */
argv = g_ptr_array_sized_new (4);
- g_ptr_array_add (argv, "/sbin/modprobe");
+ g_ptr_array_add (argv, "@modprobeBinPath@");
g_ptr_array_add (argv, (char *) arg1);
va_start (ap, arg1);