mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
fix runlevel-system
This commit is contained in:
parent
4fa0a53190
commit
abb023506c
@ -2,7 +2,7 @@
|
||||
#
|
||||
# setup alsa (especially the mixer config)
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
echo "### Setting up sound card ###"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start D-BUS daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
if test -f /usr/bin/dbus-daemon; then
|
||||
echo "### Starting D-BUS ###"
|
||||
|
@ -2,6 +2,6 @@
|
||||
#
|
||||
# store boot time
|
||||
#
|
||||
# runlevels: geexbox, debug
|
||||
# runlevels: openelec, debug
|
||||
|
||||
/bin/date > /tmp/bootdate
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# load modules
|
||||
#
|
||||
# runlevels: geexbox, debug, install, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
echo "### Loading kernel modules ###"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start Avahi Daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
if test -f /usr/sbin/avahi-daemon; then
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# setup bluetooth daemons
|
||||
#
|
||||
# runlevels: geexbox, debug
|
||||
# runlevels: openelec, debug
|
||||
|
||||
echo "### Starting Bluetooth support ###"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start Connection Manager
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
if test -f /usr/sbin/connmand; then
|
||||
echo "### Starting Connection Manager ###"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start elisa
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start D-BUS/HAL automounter daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
if test -f /usr/bin/automountd; then
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start cron daemon
|
||||
#
|
||||
# runlevels: geexbox, debug
|
||||
# runlevels: openelec, debug
|
||||
|
||||
echo "### Starting Syslog daemon ###"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start telnet daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
# get options
|
||||
test -f /etc/network || exit 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start http daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
# get options
|
||||
test -f /etc/network || exit 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start cron daemon
|
||||
#
|
||||
# runlevels: geexbox, debug
|
||||
# runlevels: openelec, debug
|
||||
|
||||
echo "### Starting CRON daemon ###"
|
||||
|
||||
|
@ -6,6 +6,18 @@
|
||||
BOOT=`/bin/busybox cat /proc/cmdline | /bin/busybox sed 's/.*boot=// ; 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 mount -t ext3 -o ro,noatime $BOOT /flash
|
||||
@ -13,16 +25,25 @@
|
||||
|
||||
if [ -f "/flash/openelec.system" ]; then
|
||||
/bin/busybox mount /flash/openelec.system /sysroot
|
||||
INIT=/sbin/init.system
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo Could not mount system on /sysroot. Starting debugging shell....
|
||||
INIT=/sbin/nosystem
|
||||
/bin/busybox sh </dev/tty1 >/dev/tty1 2>&1
|
||||
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 /storage /sysroot/storage
|
||||
|
||||
/bin/busybox umount /proc
|
||||
/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
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
if test -f /usr/sbin/hald; then
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# start udev daemon
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# configure X.Org video settings
|
||||
#
|
||||
# runlevels: geexbox
|
||||
# runlevels: openelec
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# configure GDK Pixbuf Loaders
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# configure Pango Modules
|
||||
#
|
||||
# runlevels: geexbox, debug, configure
|
||||
# runlevels: openelec, debug, configure
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user