Replace = with == in bash string tests
authorHugo Villeneuve <hugo@hugovil.com>
Wed, 28 Aug 2013 00:38:39 +0000 (20:38 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 31 Jul 2014 02:15:23 +0000 (22:15 -0400)
stage1/bootscripts/rc

index a85b893..f747bc8 100755 (executable)
@@ -61,7 +61,7 @@ trap ":" INT QUIT TSTP
 runlevel=${1}
 
 # If no runlevel was passed as an argument, we won't change runlevels.
-if [ "${runlevel}" = "" ]; then
+if [ "${runlevel}" == "" ]; then
     echo "Usage: ${0} <runlevel>" >&2
     exit ${EXIT_CODE_FAILURE}
 fi
@@ -137,7 +137,7 @@ for start_script in $(ls /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null); do
        # If the service was not started in the previous level, or if we just
        # stopped it in this runlevel, then we need to start or restart it.
        check_script_status ${start_script}
-       if [ ${?} = ${EXIT_CODE_SUCCESS} ]; then
+       if [ ${?} == ${EXIT_CODE_SUCCESS} ]; then
            startup ${start_script} start
            retval=${?}
            if [ ${retval} -ne ${EXIT_CODE_SUCCESS} -a ${retval} -ne ${EXIT_CODE_WARNING} ]; then