From 214fa024f53003b4ce5aa0a7888f12f80684703f Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Mon, 23 Nov 2015 17:54:42 +0000 Subject: LinHES-system: linhes_update.sh & linhes_update2.sh: fix linhes.xml from being incomplete grep 2.22 changed of behavior so changed the options don't use pkill -USR1 mythfrontend as it causes some keybindings to not work after. --- abs/core/LinHES-system/PKGBUILD | 6 +-- abs/core/LinHES-system/linhes_update.sh | 72 +++++++++++++------------------- abs/core/LinHES-system/linhes_update2.sh | 49 ++++++++++------------ 3 files changed, 54 insertions(+), 73 deletions(-) diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index e3c1700..e8f220d 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=8.3 -pkgrel=19 +pkgrel=20 arch=('i686' 'x86_64') install=system.install pkgdesc="Everything that makes LinHES an automated system" @@ -124,8 +124,8 @@ md5sums=('76842f8cff548d2c1289e0992a8b84dd' 'cd28dd67a78f3b7da704e31db0298916' 'e9f545c3bcf9c85b45496c281fc6a1b8' 'a94fe6d980f4b810f2e2ae5352084b39' - '384956b4fd9bf40907856bab0e67b169' - 'f4ce577e2ab1b6dbf9def46a8ab86e2d' + '0d1632ea63d8145c173c6aecf0b007f0' + 'ff689f2e9572a78d88384b2e5774f579' '28f29578e5b3ba84fdf2aa57cf475bcf' '4a1fda884dcd7d65fb2690fbdbd92a83' '2b7fe3b57592823a4c7e3ec132dcb7f4' diff --git a/abs/core/LinHES-system/linhes_update.sh b/abs/core/LinHES-system/linhes_update.sh index d563504..3ac2a56 100644 --- a/abs/core/LinHES-system/linhes_update.sh +++ b/abs/core/LinHES-system/linhes_update.sh @@ -9,17 +9,6 @@ usage () { exit $1 } -restart_mfe () { - #check if started from mythfrontend-start and if so just kill mfe - #otherwise reload mfe - if [[ `pgrep -fx "/bin/bash /usr/LH/bin/mythfrontend-start"` ]] - then - killall mythfrontend - else - pkill -USR1 mythfrontend - fi -} - dsply () { if grep -q "Updates Available" /usr/share/mythtv/themes/defaultmenu/linhes.xml then @@ -28,10 +17,10 @@ dsply () { msg_client.py --kill msg_client.py --msg "Updates available!\nGo to the Service Menu to install the updates.|middle" else - restart_mfe + killall mythfrontend fi echo " Updates available!" - exit + exit else [ "$1" = false ] && { msg_client.py --msg "Checking for updates...|middle" --timeout 600 --tag "checkUpdates"; } echo " Checking for updates..." @@ -39,11 +28,11 @@ dsply () { } chck () { - sudo pacman -Sy + sudo pacman -Sy [ -f /tmp/to_be_upgraded ] && sudo rm /tmp/to_be_upgraded - sudo pacman -Qu > /tmp/to_be_upgraded - if [[ ! -s /tmp/to_be_upgraded ]] - then + sudo pacman -Qu > /tmp/to_be_upgraded + if [[ ! -s /tmp/to_be_upgraded ]] + then #hide LinHES update message on main menu echo " Hiding update message in LinHES theme." sudo sed -i '/LinHES UPDATE MESSAGE/c\ " >> /tmp/linhes.xml.tmp - echo " " >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp + sed -e '/\#Check/,/\#Check/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp + grep -va '/mythmenu' /tmp/linhes.xml > /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo " " >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml - echo "" > /tmp/update3.xml.tmp + echo "" > /tmp/update3.xml.tmp #check for kernel update and warn reboot is required if grep linux /tmp/to_be_upgraded || grep nvidia /tmp/to_be_upgraded - then + then echo "" >> /tmp/update3.xml.tmp echo " " >> /tmp/update3.xml.tmp - fi + fi #create menu items for each pkg to be upgraded - while read line; do + while read line; do echo "" >> /tmp/update3.xml.tmp echo " " >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp + sed -e '/\#UpdatesAv/,/\#UpdatesAv/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp + grep -va '/mythmenu' /tmp/linhes.xml > /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo " " >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml fi #hide LinHES update message on main menu sudo sed -i '/LinHES UPDATE MESSAGE/c\