diff --git a/packages/sysutils/busybox/init.d/01_syslogd b/packages/sysutils/busybox/init.d/01_syslogd index 9dec128943..e03bb3e5ed 100755 --- a/packages/sysutils/busybox/init.d/01_syslogd +++ b/packages/sysutils/busybox/init.d/01_syslogd @@ -1,5 +1,5 @@ # -# start cron daemon +# start syslog daemon # # runlevels: openelec, text, debug diff --git a/packages/sysutils/busybox/init.d/02_date b/packages/sysutils/busybox/init.d/02_date deleted file mode 100755 index 09c799dd2d..0000000000 --- a/packages/sysutils/busybox/init.d/02_date +++ /dev/null @@ -1,9 +0,0 @@ -# store boot time -# -# runlevels: openelec, text, debug - -( - progress "saving Bootdate" - - /bin/date > /tmp/bootdate -)& diff --git a/packages/sysutils/busybox/init.d/02_network b/packages/sysutils/busybox/init.d/02_network new file mode 100755 index 0000000000..218dd533ee --- /dev/null +++ b/packages/sysutils/busybox/init.d/02_network @@ -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 diff --git a/packages/sysutils/busybox/init.d/10_debugshell b/packages/sysutils/busybox/init.d/10_debugshell new file mode 100755 index 0000000000..e4b8f2ba91 --- /dev/null +++ b/packages/sysutils/busybox/init.d/10_debugshell @@ -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 2>&1 +)& + diff --git a/packages/sysutils/busybox/init.d/80_debug b/packages/sysutils/busybox/init.d/80_debug deleted file mode 100755 index f58bbd3b28..0000000000 --- a/packages/sysutils/busybox/init.d/80_debug +++ /dev/null @@ -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 2>&1 diff --git a/packages/sysutils/busybox/init.d/99_shutdown b/packages/sysutils/busybox/init.d/99_shutdown deleted file mode 100755 index 6ee6aac763..0000000000 --- a/packages/sysutils/busybox/init.d/99_shutdown +++ /dev/null @@ -1,9 +0,0 @@ -# shutdown the system -# -# runlevels: openelec, text, debug, - -progress "syncing discs" - sync - -progress "shutdown the system" - poweroff diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index e413cb34ce..6317204f73 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -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/hosts $INSTALL/etc/hosts + echo $HOSTNAME > $INSTALL/etc/hostname + echo $GREATING0 > $INSTALL/etc/issue echo $GREATING1 >> $INSTALL/etc/issue echo $GREATING2 >> $INSTALL/etc/issue diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 3b16f24ada..596e920f10 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -10,8 +10,6 @@ -a -f /usr/share/splash/Splash.png \ ] && ply-image /usr/share/splash/Splash.png & - HOSTNAME="openelec" - # mounting needed filesystems progress "mounting needed filesystems" $IONICE mount -n -t ramfs none /var @@ -27,17 +25,6 @@ $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 progress "copying config into storage" mkdir -p $HOME/.config @@ -74,22 +61,6 @@ $IONICE mkdir -p /var/run/dbus/hald-runner 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 2>&1 & - fi - # getting runlevel RUNLEVEL="openelec" if test "$TEXTMODE" = yes; then @@ -115,4 +86,4 @@ echo "### it seems we have an problem ###" echo "### starting emergency shell... ###" echo "###################################" - exec /bin/sh /dev/tty3 2>&1 + exec /bin/sh /dev/tty1 2>&1