2 zenity --question --title="Update Firmware OS" --text="This little tool helps you to keep your firmware OS up-to-date with the latest tweaks.\n\nPlease note that this is in TESTING state and\nmight break parts of your system with unstable packages!\n\nMake sure your Pandora is connected to the internet and click the Upgrade-Button.\n\n" --ok-label="Upgrade OS" --cancel-label="Quit" || exit 0
5 root_free=`df | grep '/$' | sed -e '2~1d' | awk '{print $4}'`
6 if [ "$root_free" -lt 20000 ]; then
7 zenity --error --text "There is not enough free space left in root partition
8 (at least 20MB is required).
9 This usually means your NAND is almost full.
11 Delete some files and try again. Alternatively you can do a full reflash."
15 # check for default angstrom feeds
16 if cat /etc/opkg/*.conf | awk -F# '{printf $1}' | grep -q www.angstrom-distribution.org; then
17 zenity --error --text "There seem to be Angstrom feeds in your opkg configs, \
18 upgraging from them is known to make the system unbootable.
24 'echo "Updating package lists..." && \
25 opkg update 2>&1 | tee /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \
26 echo "Checking for updated packages..." && \
27 opkg upgrade 2>&1 | tee -a /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \
28 touch /tmp/upgrade_ok || sleep 3'
30 if test -e /tmp/upgrade_ok; then
31 zenity --info --title="Upgrade complete" \
32 --text "All operations have been finished.\n\nYou can find a logfile at /tmp/upgrade.log"
34 zenity --error --title="Errors detected" \
35 --text "Errors detected during update.\n\nYou can find a logfile at /tmp/upgrade.log"