mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
fix runlevel-system
This commit is contained in:
parent
4fa0a53190
commit
abb023506c
@ -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 ###"
|
||||||
|
|
||||||
|
@ -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 ###"
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#
|
#
|
||||||
# store boot time
|
# store boot time
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug
|
# runlevels: openelec, debug
|
||||||
|
|
||||||
/bin/date > /tmp/bootdate
|
/bin/date > /tmp/bootdate
|
||||||
|
@ -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 ###"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# setup bluetooth daemons
|
# setup bluetooth daemons
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug
|
# runlevels: openelec, debug
|
||||||
|
|
||||||
echo "### Starting Bluetooth support ###"
|
echo "### Starting Bluetooth support ###"
|
||||||
|
|
||||||
|
@ -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 ###"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# start elisa
|
# start elisa
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug, configure
|
# runlevels: openelec
|
||||||
|
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# start cron daemon
|
# start cron daemon
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug
|
# runlevels: openelec, debug
|
||||||
|
|
||||||
echo "### Starting Syslog daemon ###"
|
echo "### Starting Syslog daemon ###"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# start cron daemon
|
# start cron daemon
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug
|
# runlevels: openelec, debug
|
||||||
|
|
||||||
echo "### Starting CRON daemon ###"
|
echo "### Starting CRON daemon ###"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# start udev daemon
|
# start udev daemon
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug, configure
|
# runlevels: openelec, debug, configure
|
||||||
|
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# configure X.Org video settings
|
# configure X.Org video settings
|
||||||
#
|
#
|
||||||
# runlevels: geexbox
|
# runlevels: openelec
|
||||||
|
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# configure GDK Pixbuf Loaders
|
# configure GDK Pixbuf Loaders
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug, configure
|
# runlevels: openelec, debug, configure
|
||||||
|
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# configure Pango Modules
|
# configure Pango Modules
|
||||||
#
|
#
|
||||||
# runlevels: geexbox, debug, configure
|
# runlevels: openelec, debug, configure
|
||||||
|
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user