sysutils/munin-node: Fix plugins/zfs_compress if label contains . (dot)

Fixes "[ERROR] config error" that occurs if "." (dot) is in label

PR:		281118
Reported by:	takefu <takefu@airport.fm>
Tested by:	John W. O'Brien <john@saltant.com>
Approved by:	portmgr (maintainer timeout, 3+ months)
This commit is contained in:
takefu 2025-03-16 19:24:29 +01:00 committed by Daniel Engberg
parent 45be879062
commit 59c213f707
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= munin PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION} PORTVERSION= ${MUNIN_VERSION}
PORTREVISION= 0 PORTREVISION= 1
CATEGORIES= sysutils perl5 CATEGORIES= sysutils perl5
PKGNAMESUFFIX= -node PKGNAMESUFFIX= -node

View file

@ -13,7 +13,7 @@ EOM
listing=$(zfs get -t filesystem -H compressratio) listing=$(zfs get -t filesystem -H compressratio)
while read -r label _ ratio _; do while read -r label _ ratio _; do
clean_label=$(echo "${label}" | sed -e 's|/|__|g') clean_label=$(echo "${label}" | sed -e 's|/|__|g' -e 's|\.|_|g' )
echo "${clean_label}.label ${label}" echo "${clean_label}.label ${label}"
echo "${clean_label}.value ${ratio%x}" echo "${clean_label}.value ${ratio%x}"
done <<eot done <<eot