Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct syntax error in install_server.sh #1148

Closed
wants to merge 1 commit into from

Conversation

nsabine
Copy link

@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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants