diff options
Diffstat (limited to 'defaultenv/bin/update')
-rw-r--r-- | defaultenv/bin/update | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/defaultenv/bin/update b/defaultenv/bin/update index 504bff60a0..032f3409f5 100644 --- a/defaultenv/bin/update +++ b/defaultenv/bin/update @@ -5,8 +5,9 @@ type="" device_type="" check=n +mode=tftp -while getopt "ht:d:f:c" Option +while getopt "ht:d:f:m:c" Option do if [ ${Option} = t ]; then type=${OPTARG} @@ -16,6 +17,8 @@ elif [ ${Option} = f ]; then imagename=${OPTARG} elif [ ${Option} = c ]; then check=y +elif [ ${Option} = m ]; then + mode=${OPTARG} else . /env/bin/_update_help exit 0 @@ -45,6 +48,12 @@ else exit 1 fi +if [ x${mode} != xtftp ] && [ x${mode} != xxmodem ] ; then + echo "unsupported mode ${mode}." + . /env/bin/_update_help + exit 1 +fi + . /env/bin/_update if [ x${check} = xy ]; then crc32 -f $image -F $part |