[Devel] Patch for openserctl

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jul 3 11:47:33 CEST 2006


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 matty at shibby.net foo matty91 at gmail.com
> 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 matty at shibby.net foo matty91 at gmail.com
>
> [ ..... ]
>
> echo $1|awk -F @ '{print $1}'
> ++ echo matty at matty.com
> ++ awk -F @ '{print $1}'
> awk: syntax error near line 1
> awk: bailing out near line 1
> + SERUSER=
> echo $1|awk -F @ '{print $2}'
> ++ echo matty at matty.com
> ++ 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 at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>




More information about the Devel mailing list