<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks Klaus,&nbsp; <BR>
&nbsp;<BR>
After change the&nbsp;LAST_LINE in the kamctlrc, the tail error is going, but it still says user "xxxx" already exists.<BR>
<BR># tail tool<BR>LAST_LINE="tail -1"<BR>
&nbsp;<BR>
I find the script below returns "false"&nbsp; which makes the kamctl exit.<BR>
&nbsp;<BR>
# params: user<BR># output: false if exists, true otherwise<BR>is_user() {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_user $1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUERY="select count(*) from $SUB_TABLE where \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $SUBSCRIBER_COLUMN='$OSERUSER' and $REALM_COLUMN='$OSERDOMAIN';"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CNT=`$DBROCMD "$QUERY" "$DBRAWPARAMS" | $EGREP -v ERROR | $LAST_LINE`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mdbg "is_user: user counter=$CNT"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ "$CNT" = "0" ] ; then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; false<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<BR>}<BR><BR>
&nbsp;<BR>
What could be the cause?<BR>
&nbsp;<BR>
Thanks,<BR>
Kevin<BR>
<BR>&nbsp;<BR>&gt; Date: Thu, 10 Jun 2010 10:11:18 +0200<BR>&gt; From: klaus.mailinglists@pernau.at<BR>&gt; To: kevin.jzh@hotmail.com<BR>&gt; CC: sr-users@lists.sip-router.org<BR>&gt; Subject: Re: [SR-Users] Fail to add user account<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Am 10.06.2010 03:12, schrieb JinKevin:<BR>&gt; &gt; AppSer01:root@/usr/local/kamailio-3.0/sbin$ kamctl add 2000 2000<BR>&gt; &gt; usage: tail [+/-[n][lbc][f]] [file]<BR>&gt; &gt; tail [+/-[n][l][r|f]] [file]<BR>&gt; &gt; INFO: user '2000' already exists<BR>&gt; <BR>&gt; <BR>&gt; between your kamctl command and the error message (user '2000' already<BR>&gt; exists) is an error produced by the tail command.<BR>&gt; <BR>&gt; Looks like kamctl uses tail in a way which is not supported on your OS.<BR>&gt; <BR>&gt; regards<BR>&gt; klaus<BR>                                               <br /><hr />更多热辣资讯尽在新版MSN首页! <a href='http://cn.msn.com/' target='_new'>立刻访问!</a></body>
</html>