[e4adc3]: scripts / S2handlewebupdate  Maximize  Restore  History

Download this file

27 lines (22 with data), 712 Bytes

#!/bin/sh

TAR="/mnt/flash/root/bin/busybox tar"
GZIP="/mnt/flash/root/bin/busybox gzip"
UPDATEFILE=/mnt/flash/update/update.tgz
MOUNTPOINT=/mnt/flash/update
MKFS_JFFS2=/mnt/flash/root/bin/mkfs.jffs2
MTDBLOCK=/dev/mtdblock7

mount -t jffs2 $MTDBLOCK $MOUNTPOINT
if [ ! -f $MOUNTPOINT/FORMATED ]; then
   echo "formating "$MTDBLOCK
   umount $MOUNTPOINT
   mkdir /tmp/emptydir
   $MKFS_JFFS2 -b -d /tmp/emptydir > $MTDBLOCK
   mount -t jffs2 $MTDBLOCK $MOUNTPOINT
   touch $MOUNTPOINT/FORMATED 
fi

if [ -f $UPDATEFILE ]; then
  echo "found updatefile"
  $GZIP -c -d $UPDATEFILE | $TAR x update_scripts/dowebupdate.sh -C /tmp
  chmod +x /tmp/update_scripts/dowebupdate.sh
  /tmp/update_scripts/dowebupdate.sh
fi

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks