thiell/test — Issue #240: Commands in /etc/clustershell/groups.conf do not work with mawk, only with gawk
Author: thiell
Created: 2012-03-03 16:37:05+00:00
State: open
Labels: Lib

The commands in /etc/clustershell/groups.conf do not work with mawk, which is installed by default in Debian. Only with gawk, they work correctly.

{{{
# mawk -F: '/^[[:alnum:]_]/ {print $1}' /etc/clustershell/groups
# gawk -F: '/^[[:alnum:]_]/ {print $1}' /etc/clustershell/groups
nodes
all
}}}

For now the following patch is in the debian packages repository [1] :
{{{
--- a/conf/groups.conf
+++ b/conf/groups.conf
@@ -11,7 +11,7 @@ default: local
[local]
map: awk -F: '/^$GROUP:/ {print $2}' /etc/clustershell/groups
all: awk -F: '/^all:/ {print $2}' /etc/clustershell/groups
-list: awk -F: '/^[[:alnum:]_]/ {print $1}' /etc/clustershell/groups
+list: awk -F: '/^[0-9A-Za-z_-]/ {print $1}' /etc/clustershell/groups

[genders]
map: nodeattr -n $GROUP
}}}

1 - http://anonscm.debian.org/viewvc/python-apps/packages/clustershell/trunk/debian/patches/groups.conf_mawk_compatible.patch?revision=7976&view=markup