aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios-plugins/nagios-plugins.post-upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'main/nagios-plugins/nagios-plugins.post-upgrade')
-rw-r--r--main/nagios-plugins/nagios-plugins.post-upgrade19
1 files changed, 13 insertions, 6 deletions
diff --git a/main/nagios-plugins/nagios-plugins.post-upgrade b/main/nagios-plugins/nagios-plugins.post-upgrade
index 1e62e986f7..2750e50264 100644
--- a/main/nagios-plugins/nagios-plugins.post-upgrade
+++ b/main/nagios-plugins/nagios-plugins.post-upgrade
@@ -1,8 +1,15 @@
#!/bin/sh
-cat <<EOF
-NOTE: Since 2.0.3-r2 all plugins are separated into subpackages
- (e.g. nagios-plugins-disk) and nagios-plugins contains only common
- files. If you want to install *all* plugins at once, then you can do:
- apk add nagios-plugins-all.
-EOF
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "2.0.3-r2")" = "<" ]; then
+ cat <<-EOF
+ * Since 2.0.3-r2 all plugins are separated into subpackages
+ * (e.g. nagios-plugins-disk) and nagios-plugins contains only common
+ * files. If you want to install *all* plugins at once, then you can do:
+ * apk add nagios-plugins-all.
+ EOF
+fi
+
+exit 0