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 # runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/bin/dbus-daemon; then if test -f /usr/bin/dbus-daemon; then
echo "### Starting D-BUS ###" progress "Starting D-BUS"
mkdir -p /var/run/dbus mkdir -p /var/run/dbus
mkdir -p /var/lib/dbus mkdir -p /var/lib/dbus

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,11 @@
# #
# runlevels: openelec, text, debug # runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/bin/automountd; then 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 automountd -d > /dev/null 2>&1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,11 @@
# #
# runlevels: openelec, text, debug # runlevels: openelec, text, debug
. /etc/sysconfig
if test -f /usr/sbin/hald; then 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/cache/hald
mkdir -p /var/run/dbus/hald-local mkdir -p /var/run/dbus/hald-local

View File

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

View File

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

View File

@ -47,16 +47,13 @@ export TTY
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
OE_X_WM_ENABLED=yes 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. # Elisas environment variables.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
ELISA_DEBUG=yes
ELISA_FULLSCREEN=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/boot && . /etc/conf.d/boot
/usr/bin/test -r /etc/conf.d/core && . /etc/conf.d/core /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/dhcp && . /etc/conf.d/dhcp
/usr/bin/test -r /etc/conf.d/elisa && . /etc/conf.d/elisa /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 FILE=/etc/gtk-2.0/gdk-pixbuf.loaders
if [ ! -e ${FILE} ]; then if [ ! -e ${FILE} ]; then
echo "### setting up GTK ###" progress "setting up GTK"
mkdir -p $(dirname ${FILE}) mkdir -p $(dirname ${FILE})
gdk-pixbuf-query-loaders > ${FILE} gdk-pixbuf-query-loaders > ${FILE}

View File

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

View File

@ -23,4 +23,8 @@ if /usr/bin/test "${ELISA_TMPLOG}" = "yes" ; then
args="${args} -l" args="${args} -l"
fi 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