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