diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-01-10 16:03:00 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-01-10 16:03:00 +0100 |
commit | 91c8ff1c3f772e0ae8d7c60a3252c5efced9fe92 (patch) | |
tree | 2705f4c42f5d91085e5f3a0ca8832b932d2ce756 /package | |
parent | 14dae150926ddceb74579a72b77c9c003f595a80 (diff) | |
parent | 9b29f42bf5b6648617ddbdc31aa13703cd2ee44a (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/extra/sbin/update | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/package/base-files/extra/sbin/update b/package/base-files/extra/sbin/update index 0cd4ee713..c51962f5b 100755 --- a/package/base-files/extra/sbin/update +++ b/package/base-files/extra/sbin/update @@ -6,6 +6,11 @@ if [ $who -ne 0 ]; then exit 1 fi +if [ -x /sbin/mtd ];then + updatecmd="mtd -r write - linux" +else + updatecmd="gunzip -c | tar -xf -" +fi check_exit() { if [ $? -ne 0 ];then @@ -22,19 +27,19 @@ prepare() { extract_from_file() { prepare - cat $1 | gunzip -c | tar -xf - + cat $1 | $updatecmd check_exit } extract_from_ssh() { prepare - ssh $1 "cat $2" | gunzip -c | tar -xf - + ssh $1 "cat $2" | $updatecmd check_exit } extract_from_http() { prepare - wget -O - $1 | gunzip -c | tar -xf - + wget -O - $1 | $updatecmd check_exit } |