1 #### THIS SCRIPT IS NOT FINISHED YET! ####
4 newkern=b00a5d617f11366689488395b19411de
5 oldkern=3112d1782a90c2c87ae17a152a35deae
6 currkern=$(md5sum /boot/uImage | cut -d" " -f1)
7 needfree=$(ls -lk uImage | grep uImage | cut -d" " -f5)
8 oldinterfaces=23f72750f2f7335b9c2ed3f55aaa5061
9 oldrcwl1251=7a6361e842f0f589418218436affbe07
10 newmmenu=af66a5118a9bfef8eca5de13ee64c6a1
12 oldmmenu2=fa45e9bc91c48640a9ea592de5fbeb3c
14 oldmmenuconf2=c90d33c362121ddd0e24e9eac0b82da9
15 newmmenuconf=d3b237cf95ff6c6e81b23483e87391e1
16 currmmenu=$(md5sum /usr/bin/mmenu | cut -d" " -f1)
17 currmmenuconf=$(md5sum /etc/pandora/conf/mmenu.conf | cut -d" " -f1)
18 err="Your system has been updated without any errors."
22 if zenity --question --title="Update Package 2" --text="This PND updates your Pandora OS. You can safely delete it after it has finished.\nThis pack includes all updates from Hotfix 1 as well.\n\nDo you want to start the upgrade now? " --ok-label="Start now" --cancel-label="Don't do it" ; then
26 echo "# Updating kernel if needed"
31 if [ $oldkern = $currkern ]; then
33 currfree=$(df /boot | grep boot | awk '{print $4}')
34 if [ $currfree -lt $needfree ]; then
35 err="There is not enough diskspace on /boot/ to update the kernel.\n\nKernel couldn't be updated."
36 echo "Kernel not updated - not enough diskspace on /boot/" >> /tmp/updater.log
38 cp uImage /boot/uImage.new
40 currkern=$(md5sum /boot/uImage.new | cut -d" " -f1)
41 if [ $currkern = $newkern ]; then
42 mv /boot/uImage /boot/uImage.old
43 mv /boot/uImage.new /boot/uImage
44 currkern=$(md5sum /boot/uImage | cut -d" " -f1)
45 if [ $currkern != $newkern ]; then
47 mv /boot/uImage.old /boot/uImage
48 err="There was a checksum error while copying the kernel.\n\nKernel couldn't be updated. Please check your SD-Card and try to recopy the PND-File."
49 echo "Kernel not updated - checksum error" >> /tmp/updater.log
53 err="There was a checksum error while copying the kernel.\n\nKernel couldn't be updated. Please check your SD-Card and try to recopy the PND-File."
54 echo "Kernel not updated - checksum error" >> /tmp/updater.log
58 echo "Kernel successfully updated" >> /tmp/updater.log
61 # Libraries for HotFix 1
64 echo "# Installing missing Python libraries"
65 if [ ! -f /usr/lib/glob.py ];
66 opkg install gnome-vfs-plugin-ftp_2.24.1-r2.5_armv7a.ipk gnome-vfs-plugin-http_2.24.1-r2.5_armv7a.ipk python-pycairo_1.4.0-ml3.5_armv7a.ipk python-pygtk_2.16.0-r1.5_armv7a.ipk python-shell_2.6.4-ml9.1.5_armv7a.ipk
67 echo "Python libraries successfully updated" >> /tmp/updater.log
70 echo "Python libraries were installed." >> /tmp/updater.log
77 echo "# Installing updated MiniMenu"
78 if [ $oldmmenu1 = $currmmenu -o $oldmmenu2 = $currmenu]; then
80 cp 2/mmenu /usr/bin/mmenu.new
81 cp 2/mmenu.conf /etc/pandora/conf/mmenu.conf.new
83 currmmenu=$(md5sum /usr/bin/mmenu.new | cut -d" " -f1)
84 if [ $currmmenu = $newmmenu ]; then
85 mv /usr/bin/mmenu /usr/bin/mmenu.old
86 mv /etc/pandora/conf/mmenu.conf /etc/pandora/conf/mmenu.conf.old
87 mv /usr/bin/mmenu.new /usr/bin/mmenu
88 mv /etc/pandora/conf/mmenu.conf.new /etc/pandora/conf/mmenu.conf
89 currmmenu=$(md5sum /boot/uImage | cut -d" " -f1)
90 if [ $currmmenu != $newmmenu ]; then
92 rm /etc/pandora/conf/mmenu.conf
93 mv /etc/pandora/conf/mmenu.conf.old /etc/pandora/conf/mmenu.conf
94 mv /usr/bin/mmenu.old /usr/bin/mmenu
95 err="There was a checksum error while copying MiniMenu.\n\nMiniMenu couldn't be updated. Please check your SD-Card and try to recopy the PND-File."
96 echo "MiniMenu not updated - checksum error" >> /tmp/updater.log
100 rm /etc/pandora/conf/mmenu.conf.new
101 err="There was a checksum error while copying MiniMenu.\n\nMiniMenu couldn't be updated. Please check your SD-Card and try to recopy the PND-File."
102 echo "MiniMenu not updated - checksum error" >> /tmp/updater.log
106 echo "MiniMenu successfully updated" >> /tmp/updater.log
109 # Libraries for HotFix 2
112 echo "# Installing Boost Library"
113 if [ ! -f /usr/lib/glob.py ];
115 echo "Boost library successfully updated" >> /tmp/updater.log
118 echo "Boost library was already up-to-date." >> /tmp/updater.log
121 # Bugfixes in Scripts
124 echo "# Installing updated scripts"
130 # Zenity Progress goes here