#450 check for bash breaks some opensipsctl commands

trunk
closed-accepted
tools (25)
5
2011-11-29
2011-11-25
No

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

Discussion

  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> razvancrainea
     
  • Razvan Crainea

    Razvan Crainea - 2011-11-29
    • status: open --> closed-accepted
     

Log in to post a comment.