Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-settings

Conflicts:
	packages/sysutils/busybox/init.d/06_systemconfig
This commit is contained in:
Stephan Raue 2013-03-23 04:27:02 +01:00
commit ee04cfe3f4
12 changed files with 88 additions and 44 deletions

View File

@ -488,9 +488,10 @@
check_update() { check_update() {
progress "Checking for updates" progress "Checking for updates"
# if [ -f "/flash/MACH_KERNEL" ]; then # check for ATV1 mach-o-kernel
# IMAGE_KERNEL="MACH_KERNEL" if [ -f "/flash/com.apple.Boot.plist" -a -f "/flash/boot.efi" ]; then
# fi UPDATE_KERNEL="MACH_KERNEL"
fi
if [ -f "$UPDATE_DIR/$UPDATE_KERNEL" -a -f "$UPDATE_DIR/$UPDATE_SYSTEM" ] ; then if [ -f "$UPDATE_DIR/$UPDATE_KERNEL" -a -f "$UPDATE_DIR/$UPDATE_SYSTEM" ] ; then
if [ -f "$UPDATE_DIR/.nocheck" ] ; then if [ -f "$UPDATE_DIR/.nocheck" ] ; then
@ -542,19 +543,14 @@
update_bootloader update_bootloader
REBOOT="1" REBOOT="1"
else else
/bin/busybox rm "$UPDATE_DIR/$UPDATE_KERNEL" /bin/busybox rm -rf $UPDATE_DIR/[0-9a-zA-Z]* &>/dev/null
/bin/busybox rm "$UPDATE_DIR/$UPDATE_SYSTEM"
echo "md5 check failed. normal startup in 30s..." echo "md5 check failed. normal startup in 30s..."
/bin/busybox sync /bin/busybox sync
/bin/busybox usleep 30000000 /bin/busybox usleep 30000000
fi fi
/bin/busybox rm "$UPDATE_DIR/${UPDATE_KERNEL}.md5" &>/dev/null /bin/busybox rm -rf $UPDATE_DIR/[0-9a-zA-Z]* &>/dev/null
/bin/busybox rm "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" &>/dev/null
else else
/bin/busybox rm "$UPDATE_DIR/$UPDATE_KERNEL" /bin/busybox rm -rf $UPDATE_DIR/[0-9a-zA-Z]* &>/dev/null
/bin/busybox rm "$UPDATE_DIR/$UPDATE_SYSTEM"
/bin/busybox rm "$UPDATE_DIR/${UPDATE_KERNEL}.md5" &>/dev/null
/bin/busybox rm "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" &>/dev/null
echo "size check failed. normal startup in 30s..." echo "size check failed. normal startup in 30s..."
/bin/busybox sync /bin/busybox sync
/bin/busybox usleep 30000000 /bin/busybox usleep 30000000

View File

@ -39,9 +39,9 @@ fi
# starting autostart script (will be removed later again, dont use it!!!) # starting autostart script (will be removed later again, dont use it!!!)
AUTOSTART="/storage/.config/autostart.sh" AUTOSTART="/storage/.config/autostart.sh"
if [ -f $AUTOSTART ]; then if [ -f $AUTOSTART ]; then
echo "!!! AUTOSTART script detected !!!" >> /var/log/messages echo '!!! AUTOSTART script detected !!!' | logger -t Boot
cat "$AUTOSTART" >> /var/log/messages cat "$AUTOSTART" | logger -t Boot
echo "!!! -End of autostart script- !!!" >> /var/log/messages echo '!!! -End of autostart script- !!!' | logger -t Boot
sh $AUTOSTART sh $AUTOSTART
fi fi

View File

@ -0,0 +1,35 @@
From 9944240ba52d19f04fb4bf468a8524f570e5fa6d Mon Sep 17 00:00:00 2001
From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Date: Fri, 22 Mar 2013 14:15:19 +0000
Subject: dnsproxy: Make sure we are not accessing null hash
If dnsproxy is not in use, like when connman has been started
with -r option, then the listener_table will be NULL which can
cause crash in hash table lookup call.
---
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index f698cfd..7a9ca91 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2916,6 +2916,9 @@ int __connman_dnsproxy_add_listener(int index)
if (index < 0)
return -EINVAL;
+ if (listener_table == NULL)
+ return 0;
+
if (g_hash_table_lookup(listener_table, GINT_TO_POINTER(index)) != NULL)
return 0;
@@ -2947,6 +2950,9 @@ void __connman_dnsproxy_remove_listener(int index)
DBG("index %d", index);
+ if (listener_table == NULL)
+ return;
+
ifdata = g_hash_table_lookup(listener_table, GINT_TO_POINTER(index));
if (ifdata == NULL)
return;
--
cgit v0.9.1

View File

@ -38,11 +38,8 @@ progress "make variable directory structure"
touch /var/run/utmp touch /var/run/utmp
chmod 1777 /var/run/utmp chmod 1777 /var/run/utmp
progress "make runtime directory structure"
ln -sf /storage/.config/modprobe.d /run/modprobe.d
progress "make logging directory structure" progress "make logging directory structure"
if test "$DEBUG" = "yes"; then if [ ! "$RUNLEVEL" = "installer" -a "$DEBUG" = "yes" ]; then
mkdir -p $HOME/log mkdir -p $HOME/log
ln -sf $HOME/log /var/log ln -sf $HOME/log /var/log
else else
@ -52,19 +49,24 @@ progress "make logging directory structure"
touch /var/log/wtmp touch /var/log/wtmp
chmod 1777 /var/log/wtmp chmod 1777 /var/log/wtmp
progress "make variable library directory structure" if [ ! "$RUNLEVEL" = "installer" ]; then
# others: progress "make runtime directory structure"
mkdir -p /var/lib/polkit-1 ln -sf /storage/.config/modprobe.d /run/modprobe.d
chmod 700 /var/lib/polkit-1
mkdir -p /var/lib/polkit-1/localauthority/10-vendor.d
mkdir -p /var/lib/polkit-1/localauthority/20-org.d
mkdir -p /var/lib/polkit-1/localauthority/30-site.d
mkdir -p /var/lib/polkit-1/localauthority/50-local.d
mkdir -p /var/lib/polkit-1/localauthority/90-mandatory.d
mkdir -p /var/lib/udisks progress "make variable library directory structure"
mkdir -p /var/lib/upower # others:
mkdir -p /var/lib/polkit-1
chmod 700 /var/lib/polkit-1
mkdir -p /var/lib/polkit-1/localauthority/10-vendor.d
mkdir -p /var/lib/polkit-1/localauthority/20-org.d
mkdir -p /var/lib/polkit-1/localauthority/30-site.d
mkdir -p /var/lib/polkit-1/localauthority/50-local.d
mkdir -p /var/lib/polkit-1/localauthority/90-mandatory.d
progress "make caching directory structure" mkdir -p /var/lib/udisks
mkdir -p $HOME/.cache/bluetooth mkdir -p /var/lib/upower
ln -sf $HOME/.cache/bluetooth /var/lib/bluetooth
progress "make caching directory structure"
mkdir -p $HOME/.cache/bluetooth
ln -sf $HOME/.cache/bluetooth /var/lib/bluetooth
fi

View File

@ -21,7 +21,7 @@
# #
# setup cdrom settings # setup cdrom settings
# #
# runlevels: openelec, installer, textmode # runlevels: openelec, textmode
progress "Setup some CDROM settings" progress "Setup some CDROM settings"
sysctl -w dev.cdrom.lock=0 > /dev/null 2>&1 & sysctl -w dev.cdrom.lock=0 > /dev/null 2>&1 &

View File

@ -21,7 +21,7 @@
# #
# start syslog daemon # start syslog daemon
# #
# runlevels: openelec, installer, textmode # runlevels: openelec, textmode
( (
progress "Starting Syslog daemon" progress "Starting Syslog daemon"

View File

@ -27,7 +27,18 @@
omit_pids+=( $@ ) omit_pids+=( $@ )
} }
_shutdown_script () {
SHUTDOWN="/storage/.config/shutdown.sh"
if [ -f $SHUTDOWN ]; then
echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh
cat "$SHUTDOWN" | logger -t shutdown.sh
echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh
sh $SHUTDOWN
fi
}
_safe_shutdown () { _safe_shutdown () {
_shutdown_script
add_omit_pids $(pidof connmand) add_omit_pids $(pidof connmand)
add_omit_pids $(pidof dbus-daemon) add_omit_pids $(pidof dbus-daemon)
killall5 -15 ${omit_pids[@]/#/-o } killall5 -15 ${omit_pids[@]/#/-o }

View File

@ -21,7 +21,7 @@
# #
# make variable directory structure # make variable directory structure
# #
# runlevels: openelec, installer, textmode # runlevels: openelec, textmode
progress "setting timezone" progress "setting timezone"
GUISETTINGS="/storage/.xbmc/userdata/guisettings.xml" GUISETTINGS="/storage/.xbmc/userdata/guisettings.xml"

View File

@ -210,12 +210,12 @@ MENU COLOR tabmsg 31;40 #ff868787 #00000000 std
LABEL installer LABEL installer
MENU LABEL Run OpenELEC Installer MENU LABEL Run OpenELEC Installer
KERNEL /KERNEL KERNEL /KERNEL
APPEND boot=UUID=$UUID installer quiet APPEND boot=UUID=$UUID installer quiet vga=current
LABEL live LABEL live
MENU LABEL Run OpenELEC Live MENU LABEL Run OpenELEC Live
KERNEL /KERNEL KERNEL /KERNEL
APPEND boot=UUID=$UUID disk=FILE=STORAGE,512 quiet APPEND boot=UUID=$UUID disk=FILE=STORAGE,512 quiet vga=current
EOF EOF

6
packages/tools/syslinux/files/create_livestick.bat Executable file → Normal file
View File

@ -97,7 +97,7 @@ IF ERRORLEVEL 1 goto InvalidDrive
>NUL copy README.md %DRIVE% >NUL copy README.md %DRIVE%
>NUL copy RELEASE %DRIVE% >NUL copy RELEASE %DRIVE%
>NUL copy openelec.ico %DRIVE% >NUL copy openelec.ico %DRIVE%
>NUL copy 3rdparty/syslinux/vesamenu.c32 %DRIVE% >NUL copy 3rdparty\syslinux\vesamenu.c32 %DRIVE%
>NUL copy splash.png %DRIVE% >NUL copy splash.png %DRIVE%
FOR /F "tokens=5" %%G IN ('vol %DRIVE% ^|find "-"') DO SET DRIVEUUID=%%G FOR /F "tokens=5" %%G IN ('vol %DRIVE% ^|find "-"') DO SET DRIVEUUID=%%G
@ -133,12 +133,12 @@ ECHO. >> %DRIVE%\syslinux.cfg
ECHO LABEL installer >> %DRIVE%\syslinux.cfg ECHO LABEL installer >> %DRIVE%\syslinux.cfg
ECHO MENU LABEL Run OpenELEC Installer >> %DRIVE%\syslinux.cfg ECHO MENU LABEL Run OpenELEC Installer >> %DRIVE%\syslinux.cfg
ECHO KERNEL /KERNEL >> %DRIVE%\syslinux.cfg ECHO KERNEL /KERNEL >> %DRIVE%\syslinux.cfg
ECHO APPEND boot=LABEL=OPENELEC installer quiet >> %DRIVE%\syslinux.cfg ECHO APPEND boot=LABEL=OPENELEC installer quiet vga=current >> %DRIVE%\syslinux.cfg
ECHO. >> %DRIVE%\syslinux.cfg ECHO. >> %DRIVE%\syslinux.cfg
ECHO LABEL live >> %DRIVE%\syslinux.cfg ECHO LABEL live >> %DRIVE%\syslinux.cfg
ECHO MENU LABEL Run OpenELEC Live >> %DRIVE%\syslinux.cfg ECHO MENU LABEL Run OpenELEC Live >> %DRIVE%\syslinux.cfg
ECHO KERNEL /KERNEL >> %DRIVE%\syslinux.cfg ECHO KERNEL /KERNEL >> %DRIVE%\syslinux.cfg
ECHO APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE,512 quiet >> %DRIVE%\syslinux.cfg ECHO APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE,512 quiet vga=current >> %DRIVE%\syslinux.cfg
GOTO END GOTO END
:InvalidDrive :InvalidDrive

BIN
packages/tools/syslinux/files/create_livestick.exe Executable file → Normal file

Binary file not shown.

6
tools/nsis-installer/oeinstaller.nsi Executable file → Normal file
View File

@ -147,15 +147,15 @@ Section "oeusbstart"
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' 'LABEL installer' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' 'LABEL installer'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' MENU LABEL Run OpenELEC Installer' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' MENU LABEL Run OpenELEC Installer'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' KERNEL /KERNEL' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' KERNEL /KERNEL'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC installer quiet' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC installer quiet vga=current'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' '' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ''
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' 'LABEL live' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' 'LABEL live'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' MENU LABEL Run OpenELEC Live' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' MENU LABEL Run OpenELEC Live'
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' KERNEL /KERNEL' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' KERNEL /KERNEL'
${If} $STORAGE_SIZE == "0" ${If} $STORAGE_SIZE == "0"
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE quiet $SSH_PARAM' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE quiet vga=current $SSH_PARAM'
${Else} ${Else}
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE,$STORAGE_SIZE quiet $SSH_PARAM' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ' APPEND boot=LABEL=OPENELEC disk=FILE=STORAGE,$STORAGE_SIZE quiet vga=current $SSH_PARAM'
${EndIf} ${EndIf}
${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' '' ${WriteToFile} '$DRIVE_LETTER\syslinux.cfg' ''
DetailPrint "" DetailPrint ""