Hi Matty,

thanks for debugging and for the patch - it was committed on the CVS.

regards,
bogdan

Matty wrote:


When I run openserctl on a Solaris 10 host, I keep getting the following error when attempting to add a user:

$ openserctl add [EMAIL PROTECTED] foo [EMAIL PROTECTED]
awk: syntax error near line 1
awk: bailing out near line 1
awk: syntax error near line 1
awk: bailing out near line 1
HA1 calculation failed

After enabling verbose output, it looks like two awk statements add spaces between the "-F" option and the delimiter:

$ openserctl add [EMAIL PROTECTED] foo [EMAIL PROTECTED]

[ ..... ]

echo $1|awk -F @ '{print $1}'
++ echo [EMAIL PROTECTED]
++ awk -F @ '{print $1}'
awk: syntax error near line 1
awk: bailing out near line 1
+ SERUSER=
echo $1|awk -F @ '{print $2}'
++ echo [EMAIL PROTECTED]
++ awk -F @ '{print $2}'
awk: syntax error near line 1
awk: bailing out near line 1

Would it be possible to remove the spaces? I attached a patch that removes the spaces, and gawk, nawk and awk seem to be ok with it.

Thanks,
- Ryan
--
UNIX Administrator
http://daemons.net/~matty


[1] Patch to openserctl

--- openserctl.new       Sun Jul  2 22:03:41 2006
+++ openserctl  Sun Jul  2 22:03:53 2006
@@ -410,8 +410,8 @@
 # calculate name and domain of current user
 set_user() {

-       SERUSER=`echo $1|awk -F @ '{print $1}'`
-       SERDOMAIN=`echo $1|awk -F @ '{print $2}'`
+       SERUSER=`echo $1|awk -F@ '{print $1}'`
+       SERDOMAIN=`echo $1|awk -F@ '{print $2}'`

        if [ -z "$SERDOMAIN" ] ; then
                SERDOMAIN="$SIP_DOMAIN"

_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel



_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to