summaryrefslogtreecommitdiffstats
path: root/defaultenv/bin/_update
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv/bin/_update')
-rw-r--r--defaultenv/bin/_update26
1 files changed, 17 insertions, 9 deletions
diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update
index 6f2ebd3157..87e6922326 100644
--- a/defaultenv/bin/_update
+++ b/defaultenv/bin/_update
@@ -10,14 +10,16 @@ if [ ! -e "$part" ]; then
exit 1
fi
-if [ x$ip = xdhcp ]; then
- dhcp
-fi
-
-ping $eth0.serverip
-if [ $? -ne 0 ] ; then
- echo "Server did not reply! Update aborted."
- exit 1
+if [ x$mode = xtftp ]; then
+ if [ x$ip = xdhcp ]; then
+ dhcp
+ fi
+
+ ping $eth0.serverip
+ if [ $? -ne 0 ] ; then
+ echo "Server did not reply! Update aborted."
+ exit 1
+ fi
fi
unprotect $part
@@ -30,6 +32,12 @@ erase $part
echo
echo "flashing $image to $part"
echo
-tftp $image $part
+
+if [ x$mode = xtftp ]; then
+ tftp $image $part
+else
+ loadb -f $image -c
+ cp $image $part
+fi
protect $part