forked from mirrors/nixpkgs
netatop: Split out path fixing and PIDFile changes to separate patches and comment
This commit is contained in:
parent
563ba07543
commit
27d323d281
|
@ -16,7 +16,12 @@ stdenv.mkDerivation {
|
|||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
patches = [ ./netatop.service.patch ];
|
||||
patches = [
|
||||
# fix paths in netatop.service
|
||||
./fix-paths.patch
|
||||
# Specify PIDFile in /run, not /var/run to silence systemd warning
|
||||
./netatop.service.patch
|
||||
];
|
||||
preConfigure = ''
|
||||
patchShebangs mkversion
|
||||
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
|
||||
|
|
11
pkgs/os-specific/linux/netatop/fix-paths.patch
Normal file
11
pkgs/os-specific/linux/netatop/fix-paths.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/netatop.service
|
||||
+++ b/netatop.service
|
||||
@@ -8,5 +8,5 @@
|
||||
Type=oneshot
|
||||
-ExecStartPre=/sbin/modprobe netatop
|
||||
-ExecStart=/usr/sbin/netatopd
|
||||
-ExecStopPost=/sbin/rmmod netatop
|
||||
+ExecStartPre=@kmod@/bin/modprobe netatop
|
||||
+ExecStart=@out@/bin/netatopd
|
||||
+ExecStopPost=@kmod@/bin/rmmod netatop
|
||||
PIDFile=/var/run/netatop.pid
|
|
@ -1,14 +1,7 @@
|
|||
--- a/netatop.service
|
||||
+++ b/netatop.service
|
||||
@@ -7,8 +7,8 @@
|
||||
[Service]
|
||||
Type=oneshot
|
||||
-ExecStartPre=/sbin/modprobe netatop
|
||||
-ExecStart=/usr/sbin/netatopd
|
||||
-ExecStopPost=/sbin/rmmod netatop
|
||||
@@ -11,3 +11,3 @@
|
||||
ExecStopPost=@kmod@/bin/rmmod netatop
|
||||
-PIDFile=/var/run/netatop.pid
|
||||
+ExecStartPre=@kmod@/bin/modprobe netatop
|
||||
+ExecStart=@out@/bin/netatopd
|
||||
+ExecStopPost=@kmod@/bin/rmmod netatop
|
||||
+PIDFile=/run/netatop.pid
|
||||
RemainAfterExit=yes
|
||||
|
|
Loading…
Reference in a new issue