fix runlevel-system

This commit is contained in:
Stephan Raue 2009-03-18 20:39:21 +01:00
parent 4fa0a53190
commit abb023506c
19 changed files with 40 additions and 19 deletions

View File

@ -2,7 +2,7 @@
# #
# setup alsa (especially the mixer config) # setup alsa (especially the mixer config)
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
echo "### Setting up sound card ###" echo "### Setting up sound card ###"

View File

@ -2,7 +2,7 @@
# #
# start D-BUS daemon # start D-BUS daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
if test -f /usr/bin/dbus-daemon; then if test -f /usr/bin/dbus-daemon; then
echo "### Starting D-BUS ###" echo "### Starting D-BUS ###"

View File

@ -2,6 +2,6 @@
# #
# store boot time # store boot time
# #
# runlevels: geexbox, debug # runlevels: openelec, debug
/bin/date > /tmp/bootdate /bin/date > /tmp/bootdate

View File

@ -2,7 +2,7 @@
# #
# load modules # load modules
# #
# runlevels: geexbox, debug, install, configure # runlevels: openelec, debug, configure
echo "### Loading kernel modules ###" echo "### Loading kernel modules ###"

View File

@ -2,7 +2,7 @@
# #
# start Avahi Daemon # start Avahi Daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
if test -f /usr/sbin/avahi-daemon; then if test -f /usr/sbin/avahi-daemon; then

View File

@ -2,7 +2,7 @@
# #
# setup bluetooth daemons # setup bluetooth daemons
# #
# runlevels: geexbox, debug # runlevels: openelec, debug
echo "### Starting Bluetooth support ###" echo "### Starting Bluetooth support ###"

View File

@ -2,7 +2,7 @@
# #
# start Connection Manager # start Connection Manager
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
if test -f /usr/sbin/connmand; then if test -f /usr/sbin/connmand; then
echo "### Starting Connection Manager ###" echo "### Starting Connection Manager ###"

View File

@ -2,7 +2,7 @@
# #
# start elisa # start elisa
# #
# runlevels: geexbox, debug, configure # runlevels: openelec
. /etc/sysconfig . /etc/sysconfig

View File

@ -2,7 +2,7 @@
# #
# start D-BUS/HAL automounter daemon # start D-BUS/HAL automounter daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
if test -f /usr/bin/automountd; then if test -f /usr/bin/automountd; then

View File

@ -2,7 +2,7 @@
# #
# start cron daemon # start cron daemon
# #
# runlevels: geexbox, debug # runlevels: openelec, debug
echo "### Starting Syslog daemon ###" echo "### Starting Syslog daemon ###"

View File

@ -2,7 +2,7 @@
# #
# start telnet daemon # start telnet daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
# get options # get options
test -f /etc/network || exit 1 test -f /etc/network || exit 1

View File

@ -2,7 +2,7 @@
# #
# start http daemon # start http daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
# get options # get options
test -f /etc/network || exit 1 test -f /etc/network || exit 1

View File

@ -2,7 +2,7 @@
# #
# start cron daemon # start cron daemon
# #
# runlevels: geexbox, debug # runlevels: openelec, debug
echo "### Starting CRON daemon ###" echo "### Starting CRON daemon ###"

View File

@ -6,6 +6,18 @@
BOOT=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*boot=// ; s/ .*//'` BOOT=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*boot=// ; s/ .*//'`
DISK=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*disk=// ; s/ .*//'` DISK=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*disk=// ; s/ .*//'`
# parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
debugging)
DEBUG=yes
;;
configure)
CONFIGURE=yes
;;
esac
done
/bin/busybox mdev -s /bin/busybox mdev -s
/bin/busybox mount -t ext3 -o ro,noatime $BOOT /flash /bin/busybox mount -t ext3 -o ro,noatime $BOOT /flash
@ -13,16 +25,25 @@
if [ -f "/flash/openelec.system" ]; then if [ -f "/flash/openelec.system" ]; then
/bin/busybox mount /flash/openelec.system /sysroot /bin/busybox mount /flash/openelec.system /sysroot
INIT=/sbin/init.system
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo Could not mount system on /sysroot. Starting debugging shell.... echo Could not mount system on /sysroot. Starting debugging shell....
INIT=/sbin/nosystem
/bin/busybox sh </dev/tty1 >/dev/tty1 2>&1 /bin/busybox sh </dev/tty1 >/dev/tty1 2>&1
fi fi
fi fi
RUNLEVEL="openelec"
if test "$DEBUG" = yes; then
RUNLEVEL="debug"
elif test "$CONFIGURE" = yes; then
RUNLEVEL="configure"
fi
/bin/busybox mount --bind /flash /sysroot/flash /bin/busybox mount --bind /flash /sysroot/flash
/bin/busybox mount --bind /storage /sysroot/storage /bin/busybox mount --bind /storage /sysroot/storage
/bin/busybox umount /proc /bin/busybox umount /proc
/bin/busybox umount /sys /bin/busybox umount /sys
exec /bin/busybox switch_root /sysroot /sbin/init.system exec /bin/busybox switch_root /sysroot $INIT $RUNLEVEL

View File

@ -2,7 +2,7 @@
# #
# start HAL daemon # start HAL daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
if test -f /usr/sbin/hald; then if test -f /usr/sbin/hald; then

View File

@ -2,7 +2,7 @@
# #
# start udev daemon # start udev daemon
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
. /etc/sysconfig . /etc/sysconfig

View File

@ -2,7 +2,7 @@
# #
# configure X.Org video settings # configure X.Org video settings
# #
# runlevels: geexbox # runlevels: openelec
. /etc/sysconfig . /etc/sysconfig

View File

@ -2,7 +2,7 @@
# #
# configure GDK Pixbuf Loaders # configure GDK Pixbuf Loaders
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
. /etc/sysconfig . /etc/sysconfig

View File

@ -2,7 +2,7 @@
# #
# configure Pango Modules # configure Pango Modules
# #
# runlevels: geexbox, debug, configure # runlevels: openelec, debug, configure
. /etc/sysconfig . /etc/sysconfig