changing runlevelsystem. you have now follow opportunities: 1 adding -textmode- as kernel parameter starts a textshell 2. adding -debugging- starts elisa in verbose mode and with additional logfiles 3. adding -textmode debugging- starts textshell in verbose mode and with additional logfiles 4. adding nothing starts elisa in quiet mode without creating additional logfiles

This commit is contained in:
Stephan Raue 2009-03-28 00:01:06 +01:00
parent bbba652b87
commit 4858cf3e0f
22 changed files with 78 additions and 39 deletions

View File

@ -4,8 +4,10 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/bin/dbus-daemon; then
echo "### Starting D-BUS ###"
progress "Starting D-BUS"
mkdir -p /var/run/dbus
mkdir -p /var/lib/dbus

View File

@ -2,6 +2,10 @@
#
# store boot time
#
# runlevels: openelec, debug
# runlevels: openelec, text, debug
. /etc/sysconfig
progress "saving Starttime"
/bin/date > /tmp/bootdate

View File

@ -2,9 +2,11 @@
#
# load modules
#
# runlevels: openelec, debug, configure
# runlevels: openelec, text, debug
echo "### Loading kernel modules ###"
. /etc/sysconfig
progress "Loading kernel modules"
IFS='
'

View File

@ -4,9 +4,11 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/sbin/avahi-daemon; then
echo "### Starting Avahi Daemon ###"
progress "Starting Avahi Daemon"
mkdir -p /var/run/avahi-daemon
avahi-daemon -D

View File

@ -4,7 +4,9 @@
#
# runlevels: openelec, text, debug
echo "### Starting Bluetooth support ###"
. /etc/sysconfig
progress "Starting Bluetooth support"
/usr/bin/bluetoothd

View File

@ -4,8 +4,10 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/sbin/connmand; then
echo "### Starting Connection Manager ###"
progress "Starting Connection Manager"
connmand -d
fi

View File

@ -4,9 +4,11 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/bin/automountd; then
echo "### Starting D-BUS/HAL automounter ###"
progress "Starting D-BUS/HAL automounter"
automountd -d > /dev/null 2>&1

View File

@ -4,7 +4,9 @@
#
# runlevels: openelec, text, debug
echo "### Starting Syslog daemon ###"
. /etc/sysconfig
progress "Starting Syslog daemon"
mkdir -p /var/log
syslogd

View File

@ -4,12 +4,14 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
# get options
test -f /etc/network || exit 1
. /etc/network
if test "$TELNET_SERVER" = "yes" -a -f /etc/issue; then
echo "### Starting telnet daemon ###"
progress "Starting telnet daemon"
telnetd -f /etc/issue >/dev/null 2>&1 &
fi

View File

@ -4,12 +4,14 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
# get options
test -f /etc/network || exit 1
. /etc/network
if test "$HTTP_SERVER" = "yes"; then
echo "### Starting http daemon ###"
progress "Starting http daemon"
httpd -h /var/www >/dev/null 2>&1 &
fi

View File

@ -4,7 +4,9 @@
#
# runlevels: openelec, text, debug
echo "### Starting CRON daemon ###"
. /etc/sysconfig
progress "Starting CRON daemon"
mkdir -p /var/spool/cron/crontabs
crond -S

View File

@ -4,9 +4,9 @@
#
# runlevels: text
# start shell
. /etc/sysconfig
echo "### starting debug shell ###"
echo "*** type exit to exit ***"
progress "starting debug shell"
echo "*** type exit to exit ***"
exec /bin/sh </dev/tty1 >/dev/tty1 2>&1

View File

@ -4,8 +4,10 @@
#
# runlevels: openelec, text, debug,
echo "### syncing discs ###"
. /etc/sysconfig
progress "syncing discs"
sync
echo "### shutdown the system ###"
progress "shutdown the system"
poweroff

View File

@ -19,10 +19,7 @@
for arg in $(cat /proc/cmdline); do
case $arg in
debugging)
DEBUG=yes
;;
text)
textmode)
TEXTMODE=yes
;;
configure)
@ -46,9 +43,7 @@
tar xaf "/usr/config/etc.tar.lzma" -C /storage
RUNLEVEL="openelec"
if test "$DEBUG" = yes; then
RUNLEVEL="debug"
elif test "$TEXTMODE" = yes; then
if test "$TEXTMODE" = yes; then
RUNLEVEL="text"
elif test "$CONFIGURE" = yes; then
RUNLEVEL="configure"

View File

@ -4,9 +4,11 @@
#
# runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/sbin/hald; then
echo "### Starting Hardware Abstraction Layer ###"
progress "Starting Hardware Abstraction Layer"
mkdir -p /var/cache/hald
mkdir -p /var/run/dbus/hald-local

View File

@ -8,7 +8,7 @@
if test -f /usr/sbin/udevd; then
echo "### starting Udev ###"
progress "starting Udev"
export UDEV_MAX_CHILDS=2
export UDEV_MAX_CHILDS_RUNNING=2

View File

@ -6,7 +6,7 @@
. /etc/sysconfig
echo "### starting Xorg ###"
progress "starting Xorg"
# modprobe drm
mkdir -p /var/lib/xkb/

View File

@ -47,16 +47,13 @@ export TTY
#-------------------------------------------------------------------------------
OE_X_WM_ENABLED=yes
#-------------------------------------------------------------------------------
# Default Font for WindowManager
#-------------------------------------------------------------------------------
WM_FONT='-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1'
#-------------------------------------------------------------------------------
# Elisas environment variables.
#-------------------------------------------------------------------------------
ELISA_DEBUG=yes
ELISA_FULLSCREEN=yes
ELISA_TMPLOG=yes
ELISA_LOGFILE='/var/log/elisa.log'
if test "$DEBUG" = yes; then
ELISA_DEBUG=yes
ELISA_TMPLOG=yes
ELISA_LOGFILE='/var/log/elisa.log'
fi

View File

@ -1,5 +1,20 @@
# parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
debugging)
DEBUG=yes
;;
esac
done
progress() {
if test "$DEBUG" = yes; then
echo "### $1 ###"
fi
}
/usr/bin/test -r /etc/conf.d/boot && . /etc/conf.d/boot
/usr/bin/test -r /etc/conf.d/core && . /etc/conf.d/core
/usr/bin/test -r /etc/conf.d/dhcp.override && . /etc/conf.d/dhcp.override
/usr/bin/test -r /etc/conf.d/debug && . /etc/conf.d/dhcp.override
/usr/bin/test -r /etc/conf.d/dhcp && . /etc/conf.d/dhcp
/usr/bin/test -r /etc/conf.d/elisa && . /etc/conf.d/elisa

View File

@ -9,7 +9,7 @@
FILE=/etc/gtk-2.0/gdk-pixbuf.loaders
if [ ! -e ${FILE} ]; then
echo "### setting up GTK ###"
progress "setting up GTK"
mkdir -p $(dirname ${FILE})
gdk-pixbuf-query-loaders > ${FILE}

View File

@ -9,7 +9,7 @@
FILE=/etc/pango/pango.modules
if [ ! -e ${FILE} ]; then
echo "### setting up Pango ###"
progress "setting up Pango"
mkdir -p $(dirname ${FILE})
pango-querymodules > ${FILE}

View File

@ -23,4 +23,8 @@ if /usr/bin/test "${ELISA_TMPLOG}" = "yes" ; then
args="${args} -l"
fi
/usr/bin/elisa ${args} 2> $ELISA_LOGFILE
if /usr/bin/test "${ELISA_DEBUG}" = "yes" ; then
/usr/bin/elisa ${args} 2> $ELISA_LOGFILE
else
/usr/bin/elisa ${args} > /dev/null 2>&1
fi