summaryrefslogtreecommitdiff
path: root/scripts
authortille <tille>2002-06-24 12:35:34 (UTC)
committer tille <tille>2002-06-24 12:35:34 (UTC)
commit428959b4974f51d55c088c0f6d73ee24b726a702 (patch) (unidiff)
treebcebd87976a683e830ce916c005e4d8ebd6c3f90 /scripts
parent5bbfde2c34b3bbccdae89171fa0528ca8ae22b32 (diff)
downloadopie-428959b4974f51d55c088c0f6d73ee24b726a702.zip
opie-428959b4974f51d55c088c0f6d73ee24b726a702.tar.gz
opie-428959b4974f51d55c088c0f6d73ee24b726a702.tar.bz2
fixed endless loop
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/update/opie-update.postinst36
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
8IPKG_REMOVE="ipkg remove" 8IPKG_REMOVE="ipkg remove"
9IPKG_INSTALL="ipkg install" 9IPKG_INSTALL="ipkg install"
10echo "Upating opie" 10echo "Upating opie"
11pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` 11pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"`
12 12
13 13
14echo "Stopping Opie" 14echo "Stopping Opie"
15`/etc/init.d/qpe stop` 15`/etc/init.d/opie stop`
16 16
17echo "start" > /tmp/update.log
17 18
18for p in $pack; do 19for p in $pack; do
19cmd="$IPKG_REMOVE $p" 20cmd="$IPKG_REMOVE $p"
20echo "$cmd" 21echo "rem. $p" >> /tmp/update.log
21$cmd 22$cmd
22done 23done
23 24
24#to be sure 25#to be sure...
25pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` 26#... to have an endless loop ;-)
26while [ $pack2 != "" ] 27# so comment it!
27do 28#pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"`
28for p in $pack2; do 29#while [ $pack2 != "" ]
29cmd="$IPKG_REMOVE $p" 30#do
30echo "$cmd" 31#echo "debug: while loop: $pack2"
31$cmd 32#for p in $pack2; do
32done 33#echo "debug for loop: $p"
33pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` 34#cmd="$IPKG_REMOVE $p"
34done; 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
37sync 42sync
38 43
39 44
40echo "Updateing" 45echo "Updateing"
41`ipkg update` 46`ipkg update`
42 47
43for p in $pack; do 48for p in $pack; do
44cmd="$IPKG_INSTALL $p" 49cmd="$IPKG_INSTALL $p"
50echo "inst. $p" >> /tmp/update.log
45echo "$cmd" 51echo "$cmd"
46$cmd 52$cmd
47done 53done
48 54
49ipkg remove opie-update 55ipkg remove opie-update
50 56
51echo "Starting Opie" 57echo "Starting Opie"
52`/etc/init.d/qpe start` 58`/etc/init.d/opie start`