From: Andy Spencer Date: Fri, 16 Oct 2009 02:56:26 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://pileus.org/git/?p=mkinit;a=commitdiff_plain;h=251806416f3873063894d70b68ff6b0398b18283 --- diff --git a/init.mk b/init.mk index 151f014..8af525b 100644 --- a/init.mk +++ b/init.mk @@ -173,9 +173,10 @@ alsa-stop_cmd=alsactl store sshd-start_cmd=/usr/sbin/sshd sshd-stop_cmd=pkill sshd -dbus-start:QVPservice -u: localhost-start +dbus-start:QVPservice -u: fsclean-start localhost-start echo Starting dbus - $P /usr/bin/dbus-daemon -- --system + $P mkdir -p /var/run/dbus + $P /usr/bin/dbus-daemon --system service -U $target dbus-stop_cmd=pkill dbus-daemon diff --git a/src/mkinit b/src/mkinit index 0b0dd80..83e69fd 100755 --- a/src/mkinit +++ b/src/mkinit @@ -45,6 +45,7 @@ function process { cmd=$1 shift arg=$* + exec 1>/dev/console case "$cmd" in boot ) echo @@ -88,6 +89,12 @@ function process { esac } +# Telinit +if [ $$ != 1 -a $1 != "-t" ]; then + echo "$@" > $FIFO + exit +fi + # Handle arguments TMP=`getopt -n "$0" \ --options hrt \ @@ -119,7 +126,7 @@ shift; cmd=$1 shift; arg=$* # Debugging output -if [ "$TEST" ]; then +if $TEST; then echo 'Options' echo ' test:' $TEST echo ' reload:' $RELOAD @@ -137,7 +144,7 @@ test ! -e $INITCTL && process $cmd $arg # Fork listeners -if [ ! "$RELOAD" ]; then +if ! $RELOAD; then # Fork /dev/initctl listener ( exec 0<&- 1<&- 2<&- initctld $INITCTL | @@ -153,7 +160,7 @@ if [ ! "$RELOAD" ]; then echo $line > $FIFO history -s $line done - [ "$TEST" ] && break + $TEST && break exec 0/dev/console echo "Respawning on /dev/console.." >&2 sleep 1