Skip to content

Commit 21ef8d5

Browse files
montag451FRidh
authored andcommittedJul 7, 2017
network-manager: fix hard-coded path for modprobe
1 parent 7e3a1a5 commit 21ef8d5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
 

‎pkgs/tools/networking/network-manager/default.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ stdenv.mkDerivation rec {
3232
--replace /usr/bin/ping6 ${inetutils}/bin/ping
3333
substituteInPlace src/devices/nm-arping-manager.c \
3434
--replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);'
35-
substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe
3635
substituteInPlace data/84-nm-drivers.rules \
3736
--replace /bin/sh ${stdenv.shell}
3837
substituteInPlace data/85-nm-unmanaged.rules \
@@ -43,6 +42,8 @@ stdenv.mkDerivation rec {
4342
--replace /bin/kill ${coreutils}/bin/kill
4443
substituteInPlace clients/common/nm-vpn-helpers.c \
4544
--subst-var-by openconnect ${openconnect}
45+
substituteInPlace src/nm-core-utils.c \
46+
--subst-var-by modprobeBinPath ${kmod}/bin/modprobe
4647
# to enable link-local connections
4748
configureFlags="$configureFlags --with-udev-dir=$out/lib/udev"
4849
'';
@@ -79,6 +80,7 @@ stdenv.mkDerivation rec {
7980
url = "https://github.com/NetworkManager/NetworkManager/commit/4e8eddd100bbc8429806a70620c90b72cfd29cb1.patch";
8081
})
8182
./openconnect_helper_path.patch
83+
./modprobe.patch
8284
];
8385

8486
buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/src/nm-core-utils.c 2017-02-15 13:10:27.000000000 +0100
2+
+++ b/src/nm-core-utils.c 2017-07-06 14:28:41.575815695 +0200
3+
@@ -419,7 +419,7 @@
4+
5+
/* construct the argument list */
6+
argv = g_ptr_array_sized_new (4);
7+
- g_ptr_array_add (argv, "/sbin/modprobe");
8+
+ g_ptr_array_add (argv, "@modprobeBinPath@");
9+
g_ptr_array_add (argv, (char *) arg1);
10+
11+
va_start (ap, arg1);

0 commit comments

Comments
 (0)
Please sign in to comment.