- remove init script to save boottime
- add init script for initial networking (move from /sbin/init)
- create /etc/hostname for hostname
- add init script for debugshell (move from /sbin/init)
- remove old init script for debugshell
- remove old init script for shutdown
- start rescue console on tty1
This commit is contained in:
Stephan Raue 2010-03-14 17:31:05 +01:00
parent 72b761c97a
commit ca935bf329
8 changed files with 38 additions and 57 deletions

View File

@ -1,5 +1,5 @@
# #
# start cron daemon # start syslog daemon
# #
# runlevels: openelec, text, debug # runlevels: openelec, text, debug

View File

@ -1,9 +0,0 @@
# store boot time
#
# runlevels: openelec, text, debug
(
progress "saving Bootdate"
/bin/date > /tmp/bootdate
)&

View File

@ -0,0 +1,19 @@
#
# start syslog daemon
#
# runlevels: openelec, text, debug
HOSTNAME=`cat /etc/hostname`
export $HOSTNAME
# bring lo up, whether we have network card or not
progress "starting Loopback Network interface"
ifconfig lo 127.0.0.1 up
# setup hostname
progress "Setup hostname"
echo $HOSTNAME > /proc/sys/kernel/hostname
# create /etc/hosts file, useful for gethostbyname(localhost)
echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts

View File

@ -0,0 +1,15 @@
# start the ACPI daemon subsystem
#
# runlevels: openelec, text, debug
TTY="3"
(
echo "#############################################"
echo "### it seems we are running in Debug mode ###"
echo "### starting debugging shell on console $TTY ###"
echo "### ...... switch with ctrl-alt-f$TTY ...... ###"
echo "#############################################"
exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1
)&

View File

@ -1,8 +0,0 @@
# start a debugging shell
#
# runlevels: text, debug
progress "starting debug shell"
echo "*** type exit to exit ***"
exec /bin/sh </dev/tty1 >/dev/tty1 2>&1

View File

@ -1,9 +0,0 @@
# shutdown the system
#
# runlevels: openelec, text, debug,
progress "syncing discs"
sync
progress "shutdown the system"
poweroff

View File

@ -25,6 +25,8 @@ ROOT_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $ROOT_PASSWORD`"
ln -sf /var/run/resolv.conf $INSTALL/etc/resolv.conf ln -sf /var/run/resolv.conf $INSTALL/etc/resolv.conf
ln -sf /var/run/hosts $INSTALL/etc/hosts ln -sf /var/run/hosts $INSTALL/etc/hosts
echo $HOSTNAME > $INSTALL/etc/hostname
echo $GREATING0 > $INSTALL/etc/issue echo $GREATING0 > $INSTALL/etc/issue
echo $GREATING1 >> $INSTALL/etc/issue echo $GREATING1 >> $INSTALL/etc/issue
echo $GREATING2 >> $INSTALL/etc/issue echo $GREATING2 >> $INSTALL/etc/issue

View File

@ -10,8 +10,6 @@
-a -f /usr/share/splash/Splash.png \ -a -f /usr/share/splash/Splash.png \
] && ply-image /usr/share/splash/Splash.png & ] && ply-image /usr/share/splash/Splash.png &
HOSTNAME="openelec"
# mounting needed filesystems # mounting needed filesystems
progress "mounting needed filesystems" progress "mounting needed filesystems"
$IONICE mount -n -t ramfs none /var $IONICE mount -n -t ramfs none /var
@ -27,17 +25,6 @@
$IONICE chmod 1777 /var/run /var/tmp $IONICE chmod 1777 /var/run /var/tmp
# bring lo up, whether we have network card or not
progress "starting Loopback Network interface"
ifconfig lo 127.0.0.1 up
# setup hostname
progress "Setup hostname"
echo $HOSTNAME > /proc/sys/kernel/hostname
# create /etc/hosts file, useful for gethostbyname(localhost)
echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts
# copying config into storage # copying config into storage
progress "copying config into storage" progress "copying config into storage"
mkdir -p $HOME/.config mkdir -p $HOME/.config
@ -74,22 +61,6 @@
$IONICE mkdir -p /var/run/dbus/hald-runner $IONICE mkdir -p /var/run/dbus/hald-runner
hald --verbose=no --daemon=yes --use-syslog hald --verbose=no --daemon=yes --use-syslog
# starting Connman
progress "Starting Connection Manager"
$IONICE mkdir -p /var/run
$IONICE touch /var/run/resolv.conf
connmand
# starting debugging shell
if test "$DEBUG" = yes; then
echo "#############################################"
echo "### it seems we are running in Debug mode ###"
echo "### starting debugging shell on console 3 ###"
echo "### ...... switch with ctrl-alt-f3 ...... ###"
echo "#############################################"
exec /bin/sh </dev/tty3 >/dev/tty3 2>&1 &
fi
# getting runlevel # getting runlevel
RUNLEVEL="openelec" RUNLEVEL="openelec"
if test "$TEXTMODE" = yes; then if test "$TEXTMODE" = yes; then
@ -115,4 +86,4 @@
echo "### it seems we have an problem ###" echo "### it seems we have an problem ###"
echo "### starting emergency shell... ###" echo "### starting emergency shell... ###"
echo "###################################" echo "###################################"
exec /bin/sh </dev/tty3 >/dev/tty3 2>&1 exec /bin/sh </dev/tty1 >/dev/tty1 2>&1