From 68f11caa9d96ff76d2675010d335c4b7f097c96b Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Thu, 9 Jul 2015 23:52:10 +0300 Subject: [PATCH] pandora-scripts: some tweaks - show version in OS update - drop samba from service config as samba itself was dropped --- recipes/pandora-system/pandora-scripts.bb | 2 +- .../pandora-scripts/op_osupgrade.sh | 16 +++++++++++++--- .../pandora-system/pandora-scripts/service.conf | 5 ++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index eccd198..5a4ca0a 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" RDEPENDS = "bash sed gawk grep zenity" -PR = "r164" +PR = "r165" SRC_URI = " \ file://op_bright.sh \ diff --git a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh index 973518a..fa0a837 100755 --- a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh +++ b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh @@ -2,7 +2,16 @@ work_script_path="/usr/pandora/scripts/op_osupgrade_work.sh" kernel_path="/boot/uImage-3" -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 +get_version() +{ + ver=`grep "Display Ver:" /etc/op-version | awk -F': ' '{print $2}' 2> /dev/null` + if [ -n "$ver" ]; then + echo "Current OS version:\n$ver" + fi +} + +ver=`get_version` +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$ver" --ok-label="Upgrade OS" --cancel-label="Quit" || exit 0 # check free space root_free=`df | grep '/$' | sed -e '2~1d' | awk '{print $4}'` @@ -18,7 +27,7 @@ fi # check for default angstrom feeds if cat /etc/opkg/*.conf | awk -F# '{printf $1}' | grep -q www.angstrom-distribution.org; then zenity --error --text "There seem to be Angstrom feeds in your opkg configs, \ -upgraging from them is known to make the system unbootable. +upgrading from them is known to make the system unbootable. Aborting." exit 1 fi @@ -36,8 +45,9 @@ kernelmd5_new=`md5sum $kernel_path` if test -e /tmp/upgrade_ok; then rm -f /tmp/upgrade_ok + ver=`get_version` zenity --info --title="Upgrade complete" \ - --text "All operations have been finished.\n\nYou can find a log file at /tmp/upgrade.log" + --text "All operations have been finished.\n\nYou can find a log file at /tmp/upgrade.log\n\n$ver" if [ "$kernelmd5_old" != "$kernelmd5_new" ]; then zenity --question --title="Kernel updated" \ --text "The kernel has been updated,\nreboot is needed to start it.\n\nReboot now?" \ diff --git a/recipes/pandora-system/pandora-scripts/service.conf b/recipes/pandora-system/pandora-scripts/service.conf index 1bb7932..b8caf9c 100644 --- a/recipes/pandora-system/pandora-scripts/service.conf +++ b/recipes/pandora-system/pandora-scripts/service.conf @@ -1,7 +1,6 @@ -/etc/rc5.d/S20samba#Start Samba on bootup#update-rc.d -f samba remove#update-rc.d -f samba defaults 20 /etc/rc5.d/S30wl1251-init#Enable Wifi on bootup#update-rc.d -f wl1251-init remove#update-rc.d -f wl1251-init defaults 30 40 -/etc/rc5.d/S30usbhost#Enable USB Host on bootup#update-rc.d -f usbhost remove#update-rc.d -f usbhost defaults 30 40 +/etc/rc5.d/S30usbhost#Enable USB Host (drains battery)#update-rc.d -f usbhost remove#update-rc.d -f usbhost defaults 30 40 /etc/rc5.d/S10dropbear#Start Dropbear (SSH login) on bootup#update-rc.d -f dropbear remove#update-rc.d -f dropbear defaults 10 /etc/rcS.d/S39alsa-state#Save/Restore ALSA Mixer Settings#update-rc.d -f alsa-state remove#update-rc.d -f alsa-state start 39 S . stop 31 0 1 6 . /etc/rcS.d/S45mountnfs.sh#Mount remote filesystems on bootup#update-rc.d -f mountnfs.sh remove;update-rc.d -f umountnfs.sh remove#update-rc.d -f mountnfs.sh start 45 S . ;update-rc.d -f umountnfs.sh start 31 0 6 . -/etc/rc5.d/S50usb-gadget#Start USB Network on bootup#update-rc.d -f usb-gadget remove#update-rc.d -f usb-gadget defaults 50 \ No newline at end of file +/etc/rc5.d/S50usb-gadget#Start USB OTG port on bootup#update-rc.d -f usb-gadget remove#update-rc.d -f usb-gadget defaults 50 -- 2.39.2