author | tille <tille> | 2002-06-24 12:35:34 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-24 12:35:34 (UTC) |
commit | 428959b4974f51d55c088c0f6d73ee24b726a702 (patch) (unidiff) | |
tree | bcebd87976a683e830ce916c005e4d8ebd6c3f90 /scripts/update | |
parent | 5bbfde2c34b3bbccdae89171fa0528ca8ae22b32 (diff) | |
download | opie-428959b4974f51d55c088c0f6d73ee24b726a702.zip opie-428959b4974f51d55c088c0f6d73ee24b726a702.tar.gz opie-428959b4974f51d55c088c0f6d73ee24b726a702.tar.bz2 |
fixed endless loop
-rwxr-xr-x | scripts/update/opie-update.postinst | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/scripts/update/opie-update.postinst b/scripts/update/opie-update.postinst index 70a5008..de045a4 100755 --- a/scripts/update/opie-update.postinst +++ b/scripts/update/opie-update.postinst | |||
@@ -1,52 +1,58 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash -v |
2 | # | 2 | # |
3 | # script to remove and reinstall opie | 3 | # script to remove and reinstall opie |
4 | # | 4 | # |
5 | # it's free so do not sell it | 5 | # it's free so do not sell it |
6 | # (c) patrick s. vogtp <tille@handhelds.org> | 6 | # (c) patrick s. vogtp <tille@handhelds.org> |
7 | 7 | ||
8 | IPKG_REMOVE="ipkg remove" | 8 | IPKG_REMOVE="ipkg remove" |
9 | IPKG_INSTALL="ipkg install" | 9 | IPKG_INSTALL="ipkg install" |
10 | echo "Upating opie" | 10 | echo "Upating opie" |
11 | pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | 11 | pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` |
12 | 12 | ||
13 | 13 | ||
14 | echo "Stopping Opie" | 14 | echo "Stopping Opie" |
15 | `/etc/init.d/qpe stop` | 15 | `/etc/init.d/opie stop` |
16 | 16 | ||
17 | echo "start" > /tmp/update.log | ||
17 | 18 | ||
18 | for p in $pack; do | 19 | for p in $pack; do |
19 | cmd="$IPKG_REMOVE $p" | 20 | cmd="$IPKG_REMOVE $p" |
20 | echo "$cmd" | 21 | echo "rem. $p" >> /tmp/update.log |
21 | $cmd | 22 | $cmd |
22 | done | 23 | done |
23 | 24 | ||
24 | #to be sure | 25 | #to be sure... |
25 | pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | 26 | #... to have an endless loop ;-) |
26 | while [ $pack2 != "" ] | 27 | # so comment it! |
27 | do | 28 | #pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` |
28 | for p in $pack2; do | 29 | #while [ $pack2 != "" ] |
29 | cmd="$IPKG_REMOVE $p" | 30 | #do |
30 | echo "$cmd" | 31 | #echo "debug: while loop: $pack2" |
31 | $cmd | 32 | #for p in $pack2; do |
32 | done | 33 | #echo "debug for loop: $p" |
33 | pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | 34 | #cmd="$IPKG_REMOVE $p" |
34 | done; | 35 | #echo "$cmd" |
36 | #$cmd | ||
37 | #done | ||
38 | #pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | ||
39 | #done; | ||
35 | 40 | ||
36 | #might help | 41 | #might help |
37 | sync | 42 | sync |
38 | 43 | ||
39 | 44 | ||
40 | echo "Updateing" | 45 | echo "Updateing" |
41 | `ipkg update` | 46 | `ipkg update` |
42 | 47 | ||
43 | for p in $pack; do | 48 | for p in $pack; do |
44 | cmd="$IPKG_INSTALL $p" | 49 | cmd="$IPKG_INSTALL $p" |
50 | echo "inst. $p" >> /tmp/update.log | ||
45 | echo "$cmd" | 51 | echo "$cmd" |
46 | $cmd | 52 | $cmd |
47 | done | 53 | done |
48 | 54 | ||
49 | ipkg remove opie-update | 55 | ipkg remove opie-update |
50 | 56 | ||
51 | echo "Starting Opie" | 57 | echo "Starting Opie" |
52 | `/etc/init.d/qpe start` | 58 | `/etc/init.d/opie start` |