lol

munin-node: patch to configure plugin-conf.d

Add a new patch (adding_sconfdir_munin-node.patch) to be able to
configure the location of plugin-conf.d (otherwise it has to be
configured at build time). This patch is very similar to the
existing 'adding_servicedir_munin-node.patch'.

authored by

Kjetil Orbekk and committed by
Bjørn Forsman
a2dc37c7 c164d835

+42
+41
pkgs/servers/monitoring/munin/adding_sconfdir_munin-node.patch
··· 1 + commit af5fa3623bb9a73052f9154be4a0f38c60ea42a2 2 + Author: Kjetil Orbekk <kjetil.orbekk@gmail.com> 3 + Date: Thu Nov 23 21:21:36 2017 -0500 4 + 5 + node: add --sconfdir to set plugin configuration dir 6 + 7 + diff --git a/node/sbin/munin-node b/node/sbin/munin-node 8 + index 909c8c4e..0ccf3941 100755 9 + --- a/node/sbin/munin-node 10 + +++ b/node/sbin/munin-node 11 + @@ -100,9 +100,11 @@ sub parse_args 12 + my @ORIG_ARGV = @ARGV; 13 + 14 + my $servicedir_cmdline; 15 + + my $sconfdir_cmdline; 16 + print_usage_and_exit() unless GetOptions( 17 + "config=s" => \$conffile, 18 + "servicedir=s" => \$servicedir_cmdline, 19 + + "sconfdir=s" => \$sconfdir_cmdline, 20 + "debug!" => \$DEBUG, 21 + "pidebug!" => \$PIDEBUG, 22 + "paranoia!" => \$paranoia, 23 + @@ -112,6 +114,7 @@ sub parse_args 24 + 25 + # We untaint the args brutally, since the sysadm should know what he does 26 + $servicedir = $1 if defined $servicedir_cmdline && $servicedir_cmdline =~ m/(.*)/; 27 + + $sconfdir = $1 if defined $sconfdir_cmdline && $sconfdir_cmdline =~ m/(.*)/; 28 + 29 + # Reset ARGV (for HUPing) 30 + @ARGV = @ORIG_ARGV; 31 + @@ -175,6 +178,10 @@ Use E<lt>fileE<gt> as configuration file. [@@CONFDIR@@/munin-node.conf] 32 + 33 + Override plugin directory [@@CONFDIR@@/plugins/] 34 + 35 + +=item B<< --sconfdir <dir> >> 36 + + 37 + +Override plugin configuration directory [@@CONFDIR@@/plugin-conf.d/] 38 + + 39 + =item B< --[no]paranoia > 40 + 41 + Only run plugins owned by root. Check permissions as well. [--noparanoia]
+1
pkgs/servers/monitoring/munin/default.nix
··· 68 68 # https://github.com/munin-monitoring/munin/pull/134 69 69 ./adding_servicedir_munin-node.patch 70 70 71 + ./adding_sconfdir_munin-node.patch 71 72 ./preserve_environment.patch 72 73 ]; 73 74