[BusyBox] [ : not found error

Ramya Ravichandran rrhsin at yahoo.co.in
Fri Apr 5 03:05:05 UTC 2002


Hi,

    The code below works fine with my RH distribution
but with busybox + tiny login + uclibc it does not.
     It is the startup script that I exexcute from
inittab and I get the error “test : not found” when
the ‘if’ statement gets executed

#!	/bin/sh
#update	# Sync disks every 30 seconds. Needed for
older Linux kernels only.
echo
echo  $"Checking the root file system"
echo
/sbin/fsck -T / 2> /dev/null
mv=$?
echo $mv
echo


if  test "$mv" -lt 2 ; then
	echo $"Remounting the root filesystem in read write
mode "
	mount -o remount,rw /
	echo $"Mounting the proc filesystem "
	mount -n -t proc /proc /proc
	mount -a			# Mount default filesystems.
elif test "$mv" -gt 2 ; then
	  echo $"An error occured during the file system
check"
          echo $"Mounting the filesystem as read only"
   	  umount -a
           mount -n -o remount,ro /
fi		

	     

Thanks






__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



More information about the busybox mailing list