autoupdate: use our new options dialog

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-01-23 00:40:33 +01:00
parent ea44373b60
commit 0350ec1e10
4 changed files with 38 additions and 61 deletions

View File

@ -1,48 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# update.conf
# This configuration file allows you to setup the update feature of
# openelec
# The update features retain all custom settings and files from both
# the openelec base system and xbmc
# Options are "no" / "manually" / "auto" )
# no: -Disable updates
# -No pop-up information about available updates
# -No automatic downloadling
# manually: Manual updates
# -Shows pop-up information about available updates
# -No automatic downloading
# -To update: Download the required openelec version, extract
# and copy the two files "SYSTEM" and "KERNEL" to the "Update"
# share (or /storage/.update)
# Reboot the system and the update will install automatically
# auto: Automatic updates
# -Shows pop-up information about available updates
# -New updates will be automatically downloaded
# -The system will notify you that a reboot is all that's
# required to complete the upgrade
AUTOUPDATE=manually

View File

@ -46,9 +46,6 @@ mkdir -p $INSTALL/etc
if [ -f $PROJECT_DIR/$PROJECT/autoupdate/update.conf ]; then
cp $PROJECT_DIR/$PROJECT/autoupdate/update.conf $INSTALL/etc
else
mkdir -p $INSTALL/usr/config
cp $PKG_DIR/config/update.conf $INSTALL/usr/config
fi
mkdir -p $INSTALL/etc/crontabs

View File

@ -20,10 +20,24 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
[ -f /etc/update.conf ] && . /etc/update.conf
[ -f /storage/.config/update.conf ] && . /storage/.config/update.conf
[ -f /etc/repo.conf ] && . /etc/repo.conf || exit 0
[ -n "$KEYFILE" ] && SCP_ARG="-i $KEYFILE"
OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml"
if [ -f /etc/update.conf ]; then
. /etc/update.conf
elif [ -f "$OPENELEC_SETTINGS" ]; then
AUTOUPDATE=`grep UPDATE_AUTO $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
else
exit 0
fi
if [ -f /etc/repo.conf ]; then
. /etc/repo.conf
if [ -n "$KEYFILE" ]; then
SCP_ARG="-i $KEYFILE"
fi
else
exit 0
fi
download () {
case "$DL_METHOD" in
@ -74,7 +88,7 @@ if [ ! -f /var/lock/update.lock ]; then
elif [ "$AUTOUPDATE" = "auto" ]; then
# show a message if a new version is avaible
send_message "New update avaible: r$NEW_VERSION - downloading and extract the new version..."
send_message "New update avaible: r$NEW_VERSION - downloading and extracting the new version..."
# locking autoupdate
touch /var/lock/update.lock

View File

@ -20,10 +20,24 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
[ -f /etc/update.conf ] && . /etc/update.conf
[ -f /storage/.config/update.conf ] && . /storage/.config/update.conf
[ -f /etc/repo.conf ] && . /etc/repo.conf || exit 0
[ -n "$KEYFILE" ] && SCP_ARG="-i $KEYFILE"
OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml"
if [ -f /etc/update.conf ]; then
. /etc/update.conf
elif [ -f "$OPENELEC_SETTINGS" ]; then
AUTOUPDATE=`grep UPDATE_AUTO $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
else
exit 0
fi
if [ -f /etc/repo.conf ]; then
. /etc/repo.conf
if [ -n "$KEYFILE" ]; then
SCP_ARG="-i $KEYFILE"
fi
else
exit 0
fi
download () {
case "$DL_METHOD" in
@ -81,7 +95,7 @@ if [ ! -f /var/lock/update.lock ]; then
elif [ "$AUTOUPDATE" = "auto" ]; then
# show a message if a new version is avaible
send_message "New update avaible: $NEW_VERSION - downloading and extract the new version..."
send_message "New update avaible: $NEW_VERSION - downloading and extracting the new version..."
# locking autoupdate
touch /var/lock/update.lock