[OpenSIPS-Devel] [ opensips-Bugs-3442146 ] check for bash breaks	some opensipsctl commands
    SourceForge.net 
    noreply at sourceforge.net
       
    Tue Nov 29 13:07:58 CET 2011
    
    
  
Bugs item #3442146, was opened at 2011-11-25 13:00
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3442146&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: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Revels (rrevels)
>Assigned to: Razvan Crainea (razvancrainea)
Summary: check for bash breaks some opensipsctl commands
Initial Comment:
Not sure when this crept in to opensipsctl.  I think I might have come across it before and just didn't have time to look for root cause.
At about line 31 is this block
if [ -z $SHELL_TESTED ] && [ -z $NOHLPRINT ] ; then
        if [ -x /bin/bash ]; then
                # bash is available
                export SHELL_TESTED=yes
                exec /bin/bash $0 $@
        else
                NOHLPRINT=yes
        fi
fi
The param array needs to be quoted when the new shell is called or things like opensipsctl db roexec "select * from usr_preferences" break.
if [ -z $SHELL_TESTED ] && [ -z $NOHLPRINT ] ; then
        if [ -x /bin/bash ]; then
                # bash is available
                export SHELL_TESTED=yes
                exec /bin/bash $0 "$@"
        else
                NOHLPRINT=yes
        fi
fi
----------------------------------------------------------------------
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3442146&group_id=232389
    
    
More information about the Devel
mailing list