Fix smartflash flash script so it forks again...

This commit is contained in:
Stefan `Sec` Zehl 2012-05-06 15:04:17 +02:00
parent 206e008c15
commit 2896c53800
1 changed files with 5 additions and 2 deletions

View File

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
bin=frimware.bin bin=firmware.bin
if [ ! -z "$3" ] ; then if [ ! -z "$3" ] ; then
bin=$3 bin=$3
fi fi
dd if=$3 seek=4 of=/dev/$1 2>/dev/null dd if=$bin seek=4 of=/dev/$1 2>/dev/null
if [ $? != 0 ] ; then
echo "Flash failed: $1 @ $2"
fi
if [ -z "$3" ] ; then if [ -z "$3" ] ; then
echo "FLASH done: $1 @ $2" echo "FLASH done: $1 @ $2"
else else