busybox: start init scripts on RUNLEVEL=boot

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-09-07 23:13:37 +02:00
parent 0e5dfc0d71
commit 5a491d0429
8 changed files with 130 additions and 75 deletions

View File

@ -23,5 +23,11 @@
#
# runlevels: openelec, installer, textmode
progress "mounting needed filesystems"
case $RUNLEVEL in
boot)
progress "mounting needed filesystems"
mount -n -t ramfs none /var
;;
poweroff|reboot)
;;
esac

View File

@ -23,7 +23,9 @@
#
# runlevels: openelec, installer, textmode
progress "make variable directory structure"
case $RUNLEVEL in
boot)
progress "make variable directory structure"
mkdir -p /var/cache \
/var/lock \
/var/media \
@ -47,7 +49,7 @@ progress "make variable directory structure"
touch /var/log/wtmp
chmod 1777 /var/log/wtmp
# others:
# others:
mkdir -p /var/lib/polkit-1
chmod 700 /var/lib/polkit-1
mkdir -p /var/lib/polkit-1/localauthority/10-vendor.d
@ -58,3 +60,10 @@ progress "make variable directory structure"
mkdir -p /var/lib/udisks
mkdir -p /var/lib/upower
;;
poweroff|reboot)
;;
esac

View File

@ -25,7 +25,8 @@
TTY="3"
if [ "$DEBUG" = "yes" ]; then
case $RUNLEVEL in
boot)
echo "###########################################"
echo "## it seems we are running in Debug mode ##"
echo "## starting debugging shell on console $TTY ##"
@ -33,5 +34,9 @@ if [ "$DEBUG" = "yes" ]; then
echo "###########################################"
openvt -w -c $TTY /bin/sh &
;;
poweroff|reboot)
;;
esac
fi

View File

@ -25,9 +25,16 @@
OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml"
if [ -f "$OPENELEC_SETTINGS" ]; then
case $RUNLEVEL in
boot)
if [ -f "$OPENELEC_SETTINGS" ]; then
progress "creating system settings"
mkdir -p /var/config
cat "$OPENELEC_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/settings.conf
fi
fi
;;
poweroff|reboot)
;;
esac

View File

@ -23,7 +23,9 @@
#
# runlevels: openelec, textmode
if [ -d /usr/config ]; then
case $RUNLEVEL in
boot)
if [ -d /usr/config ]; then
progress "copy userconfig and samples"
cd /usr/config
@ -42,4 +44,9 @@ if [ -d /usr/config ]; then
for sample in `find . -type f -name "*.sample"`; do
cp $sample /storage/.config/$sample
done
fi
fi
;;
poweroff|reboot)
;;
esac

View File

@ -23,10 +23,17 @@
#
# runlevels: openelec, installer, textmode
(
case $RUNLEVEL in
boot)
(
progress "Starting Syslog daemon"
syslogd
progress "Starting Kernellog daemon"
klogd
)&
)&
;;
poweroff|reboot)
;;
esac

View File

@ -23,5 +23,12 @@
#
# runlevels: openelec, installer, textmode
progress "Setup some CDROM settings"
case $RUNLEVEL in
boot)
progress "Setup some CDROM settings"
sysctl -w dev.cdrom.lock=0 > /dev/null 2>&1 &
;;
poweroff|reboot)
;;
esac

View File

@ -24,12 +24,19 @@
TTY="1"
echo "###########################################"
echo "## it seems we are running in Text mode. ##"
echo "## .... starting shell on console $TTY .... ##"
echo "## ...... switch with ctrl-alt-f$TTY ...... ##"
echo "###########################################"
case $RUNLEVEL in
boot)
echo "###########################################"
echo "## it seems we are running in Text mode. ##"
echo "## .... starting shell on console $TTY .... ##"
echo "## ...... switch with ctrl-alt-f$TTY ...... ##"
echo "###########################################"
while true; do
while true; do
openvt -w -c $TTY /bin/sh
done
done
;;
poweroff|reboot)
;;
esac