[Kamailio-Devel] [ openser-Bugs-2096538 ] egrep incompatibilty issue on Solaris 10

SourceForge.net noreply at sourceforge.net
Mon Sep 29 15:44:02 CEST 2008


Bugs item #2096538, was opened at 2008-09-06 09:39
Message generated for change (Comment added) made by m-akl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2096538&group_id=139143

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: ver 1.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Muhammad Akl (m-akl)
Assigned to: Henning Westerholt (henningw)
Summary: egrep incompatibilty issue on Solaris 10

Initial Comment:
bug is found in version 1.2.2 , 1.3.3 OS : Solaris 10

for 1.2.2 it's found in openser_mysql.sh file 

for 1.3.3 it's found in openserdbctl.mysql

problem :

After executing openserdbctl or openser_mysql.sh scripts you may encounter this message :

egrep: illegal operation help

usage: egrep [-c | -l | -q] [-bhinsvx]pattern_list [file....]
       egrep: [-c | -l | -q] [-bhinsvx]    [ -e pattern_list ]  ....  [-f pattern_file] ..... [file....] 


Solution: 

This message will appear due to incompatibility issues for some commands (e.g egrep) and to solve this problem just edit the /sbin/openser_mysql.sh or /lib/openser/openserctl/openserdbcl.mysql files and search for the line :

While [ `echo ALLCHARSETS | $GREP -icw $CURRCHARSET` = 0

Just remove the letter w to be like this :

While [ `echo ALLCHARSETS | $GREP -ic $CURRCHARSET` = 0

as -w option is not supported either by Solaris egrep or gnu egrep (i have tested the both )


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

>Comment By: Muhammad Akl (m-akl)
Date: 2008-09-29 15:44

Message:
Hi henningw, 

after trying some grep-like commands on solaris , i found that the most
compliant one for the switches that  caused the problem in the bug is ggrep
and it accepts all the switches were mentioned above (e.g -e -E -w etc ...)


so what is the solution for this case ? 

Regards 

Muhammad



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

Comment By: Muhammad Akl (m-akl)
Date: 2008-09-25 10:34

Message:
hi henningw,

I tested the solaris grep tool as you suggested , but the surprise is that
solaris grep does not support another two switches which are 

-e and -E ,the following error appeared why i was trying to grep instead
of egrep :

http://pastebin.com/m5175e6f

after these errors appeared i edited the openserdbctl.mysql and removed
the -e switch from this line : 

$GREP -iv -e "utf8\|ucs2"

and for the -E switch :

if [ `echo $CURRCHARSET | $GREP -cE "\w+"` = "0" ]; then

the openserdbctl starting to working properly without any problem , so I
suggest to keep egrep and just remove the -w switch 

regards 

Muhammad

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

Comment By: Henning Westerholt (henningw)
Date: 2008-09-24 14:51

Message:
Hi Muhammad,

thanks for the report. I've commited a change to the trunk and 1.3, 1.4
branches. I checked the man page for solaris grep, this has the necessary
'-w' switch. The problem was, that the config wrongly suggested 'egrep'
when the 'grep' should be used.

Would be great if you could test with GREP="grep" in openserctlrc.

Henning

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2096538&group_id=139143



More information about the Devel mailing list