Bugs item #3579719, was opened at 2012-10-24 04:09
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3579719&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
Group: 1.5.x
Status: Open
Resolution: Wont Fix
Priority: 2
Private: No
Submitted By: Perazim (perazim2)
Assigned to: Nobody/Anonymous (nobody)
Summary: opensipsdbctl create fails

Initial Comment:
Running 1.5.3 on openwrt. Sorry this is such an old version but 1.5.3 is the 
newest available for openwrt. Configured for mysql and mysql is initialized 
itself and running. I have configured opensips.cfg and opensipsctlrc properly. 
When I run opensipsdbctl create, I receive:

root@OpenWrt:/etc/opensips# opensipsdbctl create
/usr/sbin/opensipsdbctl: /usr/lib/opensips//opensipsctl/opensipsdbctl.base: 
line 35: syntax error: missing '}'

I have looked at the code and don't see anything missing.

Next, I built opensips on a Fedora 14 system. This yields the same results as 
above.

What's wrong here?

Perazim

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2012-10-26 12:59

Message:
Try to use optware: http://www.nslu2-linux.org/
The package there should be properly built.

Regards,
Ovidiu Sas

----------------------------------------------------------------------

Comment By: Perazim (perazim2)
Date: 2012-10-26 12:44

Message:
So besides not running when using the busybox ash shell, I also had to
include stty when I included the bash shell. Then I had to deal with
libncursesw not being included for some reason, appears to be a bug in the
openwrt build system. I added it via opkg package and this fixed the mysql
problem. Now back to why opensipsdbctl create doesn't work: The path to the
shared sql scripts was way wrong and once corrected, these sql scripts were
not even included in the openwrt port of opensips.

I don't understand how all of this could have even come close to running.
Maybe it was only used with some other database?

Once I correct this, I will get back to you with what I did.

Thanks,
Perazim


----------------------------------------------------------------------

Comment By: Perazim (perazim2)
Date: 2012-10-26 04:46

Message:
Same error returned when using bash. I built openwrt with bash included as
I have extra flash memory and ran:

# bash
# ?
bash: ?: command not found    (to verify it is really bash running)

root@OpenWrt:/etc# opensipsdbctl create
/usr/sbin/opensipsdbctl: /usr/lib/opensips//opensipsctl/opensipsdbctl.base:
line 35: syntax error: missing '}'
root@OpenWrt:/etc# 

Then I looked in /usr/sbin/opensipsdbctl and updated #!/bin/sh to
#!bin/bash and got further in the process:

root@OpenWrt:/usr/lib/opensips/opensipsctl# opensipsdbctl create
/usr/lib/opensips//opensipsctl/opensipsdbctl.mysql: line 50: stty: command
not found
MySQL password for root:
/usr/lib/opensips//opensipsctl/opensipsdbctl.mysql: line 52: stty: command
not found
n7p0sq12
/usr/lib/opensips//opensipsctl/opensipsdbctl.mysql: line 54: stty: command
not found

INFO: test server charset
mysql: can't load library 'libncursesw.so.5'
mysql: can't load library 'libncursesw.so.5'
BusyBox v1.19.4 (2012-10-26 12:55:11 IST) multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f
FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

        -H      Add 'filename:' prefix
        -h      Do not add 'filename:' prefix
        -n      Add 'line_no:' prefix
        -l      Show only names of files that match
        -L      Show only names of files that don't match
        -c      Show only count of matching lines
        -o      Show only the matching part of line
        -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
        -v      Select non-matching lines
        -s      Suppress open and read errors
        -r      Recurse
        -i      Ignore case
        -w      Match whole words only
        -F      PATTERN is a literal (not regexp)
        -E      PATTERN is an extended regexp
        -m N    Match up to N times per file
        -A N    Print N lines of trailing context
        -B N    Print N lines of leading context
        -C N    Same as '-A N -B N'
        -e PTRN Pattern to match
        -f FILE Read pattern from file

/usr/lib/opensips//opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary
operator expected
INFO: creating database opensips ...
mysql: can't load library 'libncursesw.so.5'
ERROR: Creating core database and grant privileges failed!
root@OpenWrt:/usr/lib/opensips/opensipsctl# 


Which I haven't yet had a chance to follow up on. Looks like opensipsdbctl
is shell type sensative. From looking at this forum, it seems that you work
this on fridays. After today, would the next time you look at this be in a
week?

Thanks for the help.

Perazim



----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-10-26 03:40

Message:
Try to run opensipsdnctl via the "bash" shell to see if you still get the
error.

Bogdan

----------------------------------------------------------------------

Comment By: Perazim (perazim2)
Date: 2012-10-26 03:13

Message:
This is on an openwrt (trunk) system:

root@OpenWrt:~# sh

BusyBox v1.19.4 (2012-10-15 14:49:33 IST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@OpenWrt:~# 

Perazim



----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-10-26 02:56

Message:
Hi Perazim,

1.5.3 is no longer maintained (see http://www.opensips.org/Main/Ver15x ) -
I suggest to download sources from 1.8 for usage.

BTW, what shell are you using ?

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3579719&group_id=232389

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

Reply via email to