Hi.

This diff removes the patch that uses jot instead of seq and fix the shebang.
It was supposed to be /bin/sh instead of /usr/local/bin/bash but at some point
it became:
#!/usr/local/bin/bash
#!/bin/sh


OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/munin/Makefile,v
retrieving revision 1.110
diff -u -p -r1.110 Makefile
--- Makefile    11 Mar 2022 19:46:24 -0000      1.110
+++ Makefile    12 Mar 2022 14:03:52 -0000
@@ -9,6 +9,8 @@ PKGNAME-main =  munin-node-$V
 PKGNAME-server =munin-server-$V
 CATEGORIES =   net
 
+REVISION-main =        0
+
 HOMEPAGE =     https://munin-monitoring.org/
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=munin/}
 
Index: patches/patch-plugins_node_d_openbsd_vmstat_in
===================================================================
RCS file: /cvs/ports/net/munin/patches/patch-plugins_node_d_openbsd_vmstat_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-plugins_node_d_openbsd_vmstat_in
--- patches/patch-plugins_node_d_openbsd_vmstat_in      11 Mar 2022 19:46:25 
-0000      1.2
+++ patches/patch-plugins_node_d_openbsd_vmstat_in      12 Mar 2022 14:03:52 
-0000
@@ -1,7 +1,7 @@
 Index: plugins/node.d.openbsd/vmstat.in
 --- plugins/node.d.openbsd/vmstat.in.orig
 +++ plugins/node.d.openbsd/vmstat.in
-@@ -75,10 +75,7 @@ if [ "$1" = "config" ]; then
+@@ -73,10 +73,7 @@ if [ "$1" = "config" ]; then
        echo 'blocked.label wait'
        echo 'blocked.info processes blocked for resources (I/O, paging, etc)'
        echo 'blocked.type GAUGE'
Index: patches/patch-plugins_node_d_squeezebox__in
===================================================================
RCS file: /cvs/ports/net/munin/patches/patch-plugins_node_d_squeezebox__in,v
retrieving revision 1.7
diff -u -p -r1.7 patch-plugins_node_d_squeezebox__in
--- patches/patch-plugins_node_d_squeezebox__in 11 Mar 2022 19:46:25 -0000      
1.7
+++ patches/patch-plugins_node_d_squeezebox__in 12 Mar 2022 14:03:52 -0000
@@ -1,57 +1,9 @@
-seq -> jot (handily avoiding the need for bashisms)
-correct nc path
-
 Index: plugins/node.d/squeezebox_.in
 --- plugins/node.d/squeezebox_.in.orig
 +++ plugins/node.d/squeezebox_.in
-@@ -1,5 +1,5 @@
- #!@@BASH@@
--# -*- sh -*-
+@@ -1,4 +1,4 @@
+-#!@@BASH@@
 +#!@@GOODSH@@
+ # -*- sh -*-
  
  : <<=cut
- 
-@@ -141,7 +141,6 @@ if [ "$CMD" = "years" ]; then
-         years_array=$(printf "%b" "years 0 $no_of_years\\nexit\\n" | "$NC" 
"$HOST" "$PORT" | sed 's/%3A/:/g' | cut -d ' ' -f 4- | sed 's/year://g' | cut 
-d ' ' -f "-$no_of_years")
-         # shellcheck disable=SC2207
-         arr1=( $(echo "$years_array" | tr -s ' ' ' ') )
--      (( no_of_years-- )) # We don't need that last entry in the array
-       if [ "$1" = "config" ]; then
-                 echo "graph_title Number of years"
-                 echo "graph_vlabel years"
-@@ -153,7 +152,7 @@ if [ "$CMD" = "years" ]; then
-               printf "graph_order y"
-                 echo "${years_array// / y}"
- 
--                for i in $(seq 0 "$no_of_years"); do
-+                for i in $(jot "$no_of_years" 0); do
-                         year=${arr1[$i]}
-                         if [ "$year" = 0 ]; then
-                                 echo "y0.label No year"
-@@ -168,7 +167,7 @@ if [ "$CMD" = "years" ]; then
-                 done
-                 exit 0
-         fi
--        for i in $(seq 0 "$no_of_years"); do
-+        for i in $(jot "$no_of_years" 0); do
-                 year=${arr1[$i]}
-                 printf "y%s.value " "$year"
-                 printf "%b" "albums 0 0 year:${year}\\nexit\\n" | "$NC" 
"$HOST" "$PORT" | sed 's/%3A/:/g' | cut -d ':' -f 3
-@@ -180,7 +179,7 @@ elif [ "$CMD" = "signalstrength" ] || [ "$CMD" = "mixe
-             echo "graph_category radio"
-             COUNT=$(printf "%b" 'player count ?\nexit\n' | "$NC" "$HOST" 
"$PORT" | cut -d " " -f 3)
-             (( COUNT-- ))
--            for ID in $(seq 0 "$COUNT"); do
-+            for ID in $(jot "$COUNT" 0); do
-                 MAC=$(printf "%b" "player id $ID ?\\nexit\\n" | "$NC" "$HOST" 
"$PORT" | cut -d " " -f 4 | sed 's/%3A/:/g')
-                 NAME=$(printf "%b" "player name $MAC ?\\nexit\\n" | "$NC" 
"$HOST" "$PORT" | cut -d " " -f 4 | sed 's/%20/ /g')
-                 MAC2=${MAC//:/}
-@@ -191,7 +190,7 @@ elif [ "$CMD" = "signalstrength" ] || [ "$CMD" = "mixe
-         fi
-         COUNT=$(printf "%b" 'player count ?\nexit\n' | "$NC" "$HOST" "$PORT" 
| cut -d " " -f 3)
-         (( COUNT-- ))
--        for ID in $(seq 0 "$COUNT"); do
-+        for ID in $(jot "$COUNT" 0); do
-             MAC=$(printf "%b" "player id $ID ?\\nexit\\n" | "$NC" "$HOST" 
"$PORT" | cut -d " " -f 4 | sed 's/%3A/:/g')
-             VAL=$(printf "%b" "$MAC $CMD ?\\nexit\\n"| "$NC" "$HOST" "$PORT" 
| cut -d " " -f 2- | sed "s/$CMD //")
-             MAC2=${MAC//:/}




-- 
Antoine

Reply via email to