]> Pileus Git - mkinit/commitdiff
(no commit message)
authorAndy Spencer <andy753421@gmail.com>
Fri, 16 Oct 2009 02:56:26 +0000 (02:56 +0000)
committerAndy Spencer <andy753421@gmail.com>
Fri, 16 Oct 2009 02:56:26 +0000 (02:56 +0000)
init.mk
src/mkinit

diff --git a/init.mk b/init.mk
index 151f014047fd5127288bb6df40a153be27651cf7..8af525b3e73fa81efef513596a9fc00ffb58a75a 100644 (file)
--- 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
 
index 0b0dd801810387e9f7cc0b040bebb4cdd3502964..83e69fd137523dfe696968eada6230e49a884974 100755 (executable)
@@ -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 2>/dev/console
                echo "Respawning on /dev/console.." >&2
                sleep 1