Correct syntax error in install_server.sh #1148

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@nsabine

nsabine commented Jun 7, 2013

Shell ! operator requires a space. In the current script, all defaults are accepted automatically because the "if" statements silently error.

RedHat Enterprise 6.4

sh-4.1$ which chkconfig
/sbin/chkconfig

example:

sh-4.1$  if [ !`which chkconfig` ]; then echo "won't get here"; fi
sh: !`which: event not found

corrected:

sh-4.1$  if [ ! `which chkconfig` ]; then echo "not found"; else echo "found"; fi
found
Correct syntax error in install_server.sh
Shell ! operator requires a space.  In the current script, all defaults are accepted automatically because the "if" statements silently error.


RedHat Enterprise 6.4
sh-4.1$ which chkconfig
/sbin/chkconfig


example: 
sh-4.1$  if [ !`which chkconfig` ]; then echo "won't get here"; fi
sh: !`which: event not found

corrected: 
sh-4.1$  if [ ! `which chkconfig` ]; then echo "not found"; else echo "found"; fi
found

TrafeX added a commit to TrafeX/redis that referenced this pull request Jun 12, 2013

@mattsta mattsta closed this May 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment