On Thu, Mar 27, 2008 at 11:48:37PM +0100, Denys Vlasenko wrote:
> 
> Works for me:
> 
> # cat zz zz
> CKSUM=2173165883
> CKSUM2=2173165883
> if [ $CKSUM2 -eq $CKSUM ]; then
>    echo "Done"
>    exit 0
> else
>    echo "Check Sum Failed"
>    exit 1
> fi
> # ./busybox ash zz
> Done

For me?  Not so much!

  $ sudo chroot root /bin/sh


  BusyBox v1.8.2 (2008-02-13 15:22:16 PST) built-in shell (ash)
  Enter 'help' for a list of built-in commands.

  ~ # [ 2173165883 -eq 2173165883 ] && echo yes
  [: 2173165883: out of range
  ~ #

But, the string comparison I suggested earlier is just fine:

  ~ # [ 2173165883 = 2173165883 ] && echo yes
  yes
  ~ #

> What is your "sh"?
> (in other words: what "grep SH_IS .config" says? Mine says:
> # CONFIG_FEATURE_SH_IS_ASH is not set
> # CONFIG_FEATURE_SH_IS_HUSH is not set
> # CONFIG_FEATURE_SH_IS_MSH is not set
> CONFIG_FEATURE_SH_IS_NONE=y
> )

  $ grep SH_IS .config
  CONFIG_FEATURE_SH_IS_ASH=y
  # CONFIG_FEATURE_SH_IS_HUSH is not set
  # CONFIG_FEATURE_SH_IS_LASH is not set
  # CONFIG_FEATURE_SH_IS_MSH is not set
  # CONFIG_FEATURE_SH_IS_NONE is not set
  $

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to