]> git.michaelhowe.org Git - packages/n/nagios-plugins-local.git/commitdiff
Stop installing (and diverting) check_running_kernel 0.26
authorMichael Howe <michael@michaelhowe.org>
Sun, 16 Jul 2023 19:56:09 +0000 (20:56 +0100)
committerMichael Howe <michael@michaelhowe.org>
Sun, 16 Jul 2023 19:56:09 +0000 (20:56 +0100)
Upstream have fixed their version, and keeping this local version in
sync is a waste of time (especially as it's broken with bookworm).

debian/changelog
debian/nagios-plugins-local-client.install
debian/nagios-plugins-local-client.postinst [new file with mode: 0644]
debian/nagios-plugins-local-client.preinst

index 2138a33ef926a622d80702cb211d6ff03d780507..36a71c9849dafb3a02efb16891574cb89b6f52f6 100644 (file)
@@ -1,3 +1,10 @@
+nagios-plugins-local (0.26) unstable; urgency=medium
+
+  * Remove check_running_kernel and associated overrides as the upstream
+    version was fixed back in 2019
+
+ -- Michael Howe <michael@michaelhowe.org>  Sun, 16 Jul 2023 20:53:51 +0100
+
 nagios-plugins-local (0.25) unstable; urgency=medium
 
   * Update remaining nagios plugins to python3, and also modernise them
index 1163b01c96f3316edbf627d34caf332289b7f869..f845d3628bae418739290c8bcfc24f64ba34ff87 100644 (file)
@@ -4,4 +4,3 @@
 /usr/lib/nagios/plugins/check_monit
 /usr/lib/nagios/plugins/check_iostat
 /usr/lib/nagios/plugins/check_systemd
-/usr/lib/nagios/plugins/check_running_kernel
diff --git a/debian/nagios-plugins-local-client.postinst b/debian/nagios-plugins-local-client.postinst
new file mode 100644 (file)
index 0000000..4853467
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+remove_diversion() {
+    dpkg-divert --package nagios-plugins-local-client --remove --rename /usr/lib/nagios/plugins/check_running_kernel
+}
+
+if [ "configure" = "$1" ] && dpkg --compare-versions "$2" ge "0.25"; then
+    if dpkg-divert --list | grep -q -F "/usr/lib/nagios/plugins/check_running_kernel" ; then
+        remove_diversion
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
index 68d8159a04a50c77d310706dd48bcd4edb56b91b..7e7173fb2b30a722672225977be5c03701d633f1 100644 (file)
@@ -6,9 +6,9 @@ add_diversion() {
     dpkg-divert --add --package nagios-plugins-local-client --rename --divert /usr/lib/nagios/plugins/check_running_kernel.distrib /usr/lib/nagios/plugins/check_running_kernel
 }
 
-if [ "upgrade" != "$1" ] || dpkg --compare-versions "$2" lt "0.20"; then
-    add_diversion
-fi
+#if [ "upgrade" != "$1" ] || dpkg --compare-versions "$2" lt "0.20"; then
+    add_diversion
+#fi
 
 #DEBHELPER#