diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2011-01-07 03:45:39 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2011-01-07 04:01:28 +0100 |
commit | 532dd7a3871e389351d115fb19db73532bb6dd5b (patch) | |
tree | 6cb9e80ab8b3e30cc83af41b876dd24cca5b7fc0 /gen_funcs.sh | |
parent | genkernel.conf: Allow overriding GK_SHARE from the environment to ease up tes... (diff) | |
download | genkernel-532dd7a3871e389351d115fb19db73532bb6dd5b.tar.gz genkernel-532dd7a3871e389351d115fb19db73532bb6dd5b.tar.bz2 genkernel-532dd7a3871e389351d115fb19db73532bb6dd5b.zip |
Review and fix some -eq and -ne conditionals
This fixes "sh: bad number" with busybox 1.18.1 during activation of mdev.
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-x | gen_funcs.sh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh index e4a1c4ac..074ae0da 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -94,7 +94,7 @@ print_info() { # PRINT TO SCREEN ONLY IF PASSED LOGLEVEL IS HIGHER THAN # OR EQUAL TO SET DEBUG LEVEL - if [ "$1" -lt "${LOGLEVEL}" -o "$1" -eq "${LOGLEVEL}" ] + if [ "$1" -lt "${LOGLEVEL}" -o "$1" = "${LOGLEVEL}" ] then SCRPRINT='1' fi @@ -106,7 +106,7 @@ print_info() { fi # STRUCTURE DATA TO BE OUTPUT TO SCREEN, AND OUTPUT IT - if [ "${SCRPRINT}" -eq '1' ] + if [ "${SCRPRINT}" = '1' ] then if [ "${PREFIXLINE}" = '1' ] then @@ -124,7 +124,7 @@ print_info() { fi # STRUCTURE DATA TO BE OUTPUT TO FILE, AND OUTPUT IT - if [ "${SCRPRINT}" -eq '1' -o "${FORCEFILE}" -eq '1' ] + if [ "${SCRPRINT}" = '1' -o "${FORCEFILE}" = '1' ] then STRR=${2//${WARN}/} STRR=${STRR//${BAD}/} @@ -140,13 +140,13 @@ print_info() { if [ "${NEWLINE}" = '0' ] then - if [ "${TODEBUGCACHE}" -eq '1' ]; then + if [ "${TODEBUGCACHE}" = '1' ]; then DEBUGCACHE="${DEBUGCACHE}${STR}" else echo -ne "${STR}" >> ${LOGFILE} fi else - if [ "${TODEBUGCACHE}" -eq '1' ]; then + if [ "${TODEBUGCACHE}" = '1' ]; then DEBUGCACHE="${DEBUGCACHE}${STR}"$'\n' else echo "${STR}" >> ${LOGFILE} @@ -303,7 +303,7 @@ copy_image_with_preserve() { # Old product might be a different version. If so, we need to read # the symlink to see what it's name is, if there are symlinks. - if [ "${SYMLINK}" -eq '1' ] + if [ "${SYMLINK}" = '1' ] then print_info 4 "automatically managing symlinks and old images." 1 0 if [ -e "${BOOTDIR}/${symlinkName}" ] @@ -349,7 +349,7 @@ copy_image_with_preserve() { # When symlinks are not being managed by genkernel, old symlinks might # still be useful. Leave 'em alone unless managed. - if [ "${SYMLINK}" -eq '1' ] + if [ "${SYMLINK}" = '1' ] then print_info 5 " Deleting old symlinks, if any." rm -f "${BOOTDIR}/${symlinkName}" @@ -367,7 +367,7 @@ copy_image_with_preserve() { # print_info 5 " Same base version. May have to delete old image to make room." - if [ "${currDestImageExists}" -eq '1' ] + if [ "${currDestImageExists}" = '1' ] then if [ -e "${BOOTDIR}/${currDestImage}.old" ] then @@ -395,14 +395,14 @@ copy_image_with_preserve() { cp "${newSrceImage}" "${BOOTDIR}/${currDestImage}" || gen_die "Could not copy the ${symlinkName} image to ${BOOTDIR}!" - if [ "${SYMLINK}" -eq '1' ] + if [ "${SYMLINK}" = '1' ] then print_info 5 " Make new symlink(s) (from ${BOOTDIR}):" print_info 5 " ${symlinkName} -> ${currDestImage}" pushd ${BOOTDIR} >/dev/null ln -s "${currDestImage}" "${symlinkName}" || gen_die "Could not create the ${symlinkName} symlink!" - if [ "${prevDestImageExists}" -eq '1' ] + if [ "${prevDestImageExists}" = '1' ] then print_info 5 " ${symlinkName}.old -> ${prevDestImage}" ln -s "${prevDestImage}" "${symlinkName}.old" || @@ -486,7 +486,7 @@ set_config_with_override() { fi fi - if [ "$VarType" -eq "1" ] + if [ "${VarType}" = "1" ] then if isTrue "${Result}" then |