Announcement

Collapse
No announcement yet.

Need to edit init.d!!!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need to edit init.d!!!

    I have been trying to get my usplash to stop dropping to a shell during start up and shut down. What do I need to edit in my init.d to make this happen?


    Here is what my init.d looks like...


    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: usplash
    # Required-Start: $all
    # Required-Stop: $all
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Integrate usplash into the boot process
    # Description: This script deals with some awkward details of integrating
    # the userspace bootsplash screen into the boot process. On
    # start it stops the usplash daemon (counter-intuitive, but
    # usplash was already started in the initramfs); on stop, it
    # calls usplash_down (unless usplash is already running).
    ### END INIT INFO
    #
    # The usplash script makes sure that usplash exits at the end of
    # the boot sequence and re-run the console-screen.sh script to make
    # sure that the console fonts are actually set
    #
    # Written by Miquel van Smoorenburg <[email protected]>.
    # Modified for Debian
    # by Ian Murdock <[email protected]>.
    #
    # Version: @(#)skeleton 1.9 26-Feb-2001 [email protected]
    #

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/sbin/usplash
    NAME=usplash
    DESC="Userspace bootsplash utility"

    test -x $DAEMON || exit 0

    set -e

    usplash_down() {
    # first some sanity checks if we actually have usplash on the system
    #
    # check if usplash is runing and if it does, exit it
    # then re-run console-screen.sh because it can't set console-fonts
    # properly while the screen is in graphics mode
    #
    # also check if we are ended up in console 8. This means that
    # no gdm/kdm/xdm was started (otherwise we would be on vt7).
    # It happens when e.g. usplash timed out
    if type setupcon >/dev/null 2>&1; then
    CONSOLE_SCREEN=
    elif [ -x /etc/init.d/console-screen.sh ]; then
    CONSOLE_SCREEN="/etc/init.d/console-screen.sh start"
    else
    CONSOLE_SCREEN=
    fi
    if type usplash >/dev/null 2>&1 &&
    ( pidof usplash > /dev/null || [ "$(fgconsole 2>/dev/null)" = "8" ] ); then
    # Clear VT 8 of any console messages
    clear >/dev/tty8

    #ask usplash to go away
    usplash_write quit

    #wait until it is really gone or kill it if it dosn't exit
    i=0
    while pidof usplash > /dev/null; do
    i=$(($i + 1))
    if [ $i -gt 100 ]; then
    kill -9 `pidof usplash`
    break
    fi
    sleep 0.1
    done

    # reset all our virtual consoles, yay!
    if [ "$CONSOLE_SCREEN" ]; then
    $CONSOLE_SCREEN
    fi
    if [ "$(fgconsole 2>/dev/null)" = "8" ] && [ "$DO_NOT_SWITCH_VT" != "yes" ]; then
    chvt 1
    fi
    fi
    }

    case "$1" in
    start)
    #usplash_down
    ;;
    stop)
    SPLASH=true
    if [ -f /proc/cmdline ] ; then
    for x in $(cat /proc/cmdline); do
    case $x in
    nosplash*)
    SPLASH=false
    ;;
    splash*)
    SPLASH=true
    ;;
    esac
    done
    fi

    if [ "$SPLASH" = "true" ] ; then
    pidof usplash > /dev/null || usplash_down
    usplash_write "TIMEOUT 15"
    fi
    ;;
    *)
    N=/etc/init.d/$NAME
    # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
    echo "Usage: $N {start|stop}" >&2
    exit 1
    ;;
    esac

    exit 0
    Linux(Learning the curve...Like when driving!!!)
    Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

  • #2
    hi lock4days,
    you have to change

    case "$1" in
    start)
    #usplash_down
    ;;
    stop)

    to

    case "$1" in
    start)
    usplash_down
    ;;
    stop)

    i'll remember you to rename S98usplash (if exist) to S01usplash either in rc2.d and in rc3.d

    Comment


    • #3
      Once this issue is resolved my install will be 100% as far as I can tell for now. Everything else is working(thanks to n2o_2k)!!
      Linux(Learning the curve...Like when driving!!!)
      Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

      Comment


      • #4
        Originally posted by nemocrk View Post
        hi lock4days,
        you have to change

        case "$1" in
        start)
        #usplash_down
        ;;
        stop)

        to

        case "$1" in
        start)
        usplash_down
        ;;
        stop)

        i'll remember you to rename S98usplash (if exist) to S01usplash either in rc2.d and in rc3.d
        Will try this...Thank you!

        Do I change in rc4.d and rc5.d also???

        UPDATE: No change...worth the try though...I guess!?!?
        Linux(Learning the curve...Like when driving!!!)
        Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

        Comment


        • #5
          sorry in the previous post i've made a mistake...
          you have to give these commands:
          sudo update-rc.d -f usplash remove
          sudo update-rc.d usplash 01 S . 01 0 1 6

          the 1st one is to remove previous settings t 2nd one to make usplash the 1st thing to start

          Comment


          • #6
            Originally posted by nemocrk View Post
            sorry in the previous post i've made a mistake...
            you have to give these commands:
            sudo update-rc.d -f usplash remove
            sudo update-rc.d usplash 01 S . 01 0 1 6

            the 1st one is to remove previous settings t 2nd one to make usplash the 1st thing to start
            No change. System starts with usplash running, then after a few seconds it disappears and the rest of the boot process is in verbose mode(just when the system gets to "setting preliminary keymap"). So I guess its not actually dropping to a shell, rather it doesn't finish the whole boot process in GUI mode...how do I fix???
            Linux(Learning the curve...Like when driving!!!)
            Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

            Comment


            • #7
              have you done both the modify?
              either /etc/init.d/usplash and update-rc.d ?
              if so try the command:
              /etc/init.d/usplash start and tell me what's up.

              Comment


              • #8
                Originally posted by nemocrk View Post
                have you done both the modify?
                either /etc/init.d/usplash and update-rc.d ?
                if so try the command:
                /etc/init.d/usplash start and tell me what's up.
                Yes to both questions!

                Do you mean to rename usplash to usplash start?
                Linux(Learning the curve...Like when driving!!!)
                Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

                Comment


                • #9
                  Originally posted by locs4dayz View Post
                  Yes to both questions!

                  Do you mean to rename usplash to usplash start?
                  he means run "usplash start"and see what happens...
                  Former author of LinuxICE, nghost, nobdy.
                  Current author of Automotive Message Broker (AMB).
                  Works on Tizen IVI. Does not represent anyone or anything but himself.

                  Comment


                  • #10
                    Originally posted by kev000 View Post
                    he means run "usplash start"and see what happens...
                    I am still in the learning process of linux so bear with me. I'm assuming that this is supposed to be done in terminal with the "sudo usplash" command?

                    This is what I got...


                    [email protected]:/home/chrysler300m# sudo usplash
                    usplash: can't get console font: Invalid argument
                    bogl_init failed: EXPLODE

                    screen init failed
                    [email protected]:/home/chrysler300m#


                    So then I tried this and got this...

                    [email protected]:/home/chrysler300m# /etc/init.d/usplash start
                    [email protected]:/home/chrysler300m#


                    Then tried this and got...

                    [email protected]:/home/chrysler300m# sudo usplash start
                    [email protected]:/home/chrysler300m#

                    Then tried this and got...


                    [email protected]:/home/chrysler300m# usplash start
                    [email protected]:/home/chrysler300m#


                    Then tried this and got...


                    [email protected]:/home/chrysler300m# sudo /etc/init.d/usplash start
                    [email protected]:/home/chrysler300m#


                    Then tried this and got...

                    [email protected]:/home/chrysler300m# sudo usplash -c
                    bogl_init failed: EXPLODE

                    screen init failed
                    [email protected]:/home/chrysler300m#


                    Is This the way I'm supposed to do it? Keep in mind that when I start my system the usplash is there with the progress bar moving side to side but doesn't remain for the entire boot process!!
                    Linux(Learning the curve...Like when driving!!!)
                    Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

                    Comment


                    • #11
                      when you did :

                      [email protected]:/home/chrysler300m# /etc/init.d/usplash start

                      have you seen anything? if not try:

                      usplash_down

                      if you see something means that you don't have modified correctly your /etc/init.d/usplash
                      repost it to see the modification

                      otherwise reinstall usplash

                      Comment


                      • #12
                        Originally posted by nemocrk View Post
                        when you did :

                        [email protected]:/home/chrysler300m# /etc/init.d/usplash start

                        have you seen anything? if not try:

                        usplash_down

                        if you see something means that you don't have modified correctly your /etc/init.d/usplash
                        repost it to see the modification

                        otherwise reinstall usplash

                        Here is my edit...


                        #! /bin/sh
                        ### BEGIN INIT INFO
                        # Provides: usplash
                        # Required-Start: $all
                        # Required-Stop: $all
                        # Default-Start: 2 3 4 5
                        # Default-Stop: 0 1 6
                        # Short-Description: Integrate usplash into the boot process
                        # Description: This script deals with some awkward details of integrating
                        # the userspace bootsplash screen into the boot process. On
                        # start it stops the usplash daemon (counter-intuitive, but
                        # usplash was already started in the initramfs); on stop, it
                        # calls usplash_down (unless usplash is already running).
                        ### END INIT INFO
                        #
                        # The usplash script makes sure that usplash exits at the end of
                        # the boot sequence and re-run the console-screen.sh script to make
                        # sure that the console fonts are actually set
                        #
                        # Written by Miquel van Smoorenburg <[email protected]>.
                        # Modified for Debian
                        # by Ian Murdock <[email protected]>.
                        #
                        # Version: @(#)skeleton 1.9 26-Feb-2001 [email protected]
                        #

                        PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
                        DAEMON=/sbin/usplash
                        NAME=usplash
                        DESC="Userspace bootsplash utility"

                        test -x $DAEMON || exit 0

                        set -e

                        usplash_down() {
                        # first some sanity checks if we actually have usplash on the system
                        #
                        # check if usplash is runing and if it does, exit it
                        # then re-run console-screen.sh because it can't set console-fonts
                        # properly while the screen is in graphics mode
                        #
                        # also check if we are ended up in console 8. This means that
                        # no gdm/kdm/xdm was started (otherwise we would be on vt7).
                        # It happens when e.g. usplash timed out
                        if type setupcon >/dev/null 2>&1; then
                        CONSOLE_SCREEN=
                        elif [ -x /etc/init.d/console-screen.sh ]; then
                        CONSOLE_SCREEN="/etc/init.d/console-screen.sh start"
                        else
                        CONSOLE_SCREEN=
                        fi
                        if type usplash >/dev/null 2>&1 &&
                        ( pidof usplash > /dev/null || [ "$(fgconsole 2>/dev/null)" = "8" ] ); then
                        # Clear VT 8 of any console messages
                        clear >/dev/tty8

                        #ask usplash to go away
                        usplash_write quit

                        #wait until it is really gone or kill it if it dosn't exit
                        i=0
                        while pidof usplash > /dev/null; do
                        i=$(($i + 1))
                        if [ $i -gt 100 ]; then
                        kill -9 `pidof usplash`
                        break
                        fi
                        sleep 0.1
                        done

                        # reset all our virtual consoles, yay!
                        if [ "$CONSOLE_SCREEN" ]; then
                        $CONSOLE_SCREEN
                        fi
                        if [ "$(fgconsole 2>/dev/null)" = "8" ] && [ "$DO_NOT_SWITCH_VT" != "yes" ]; then
                        chvt 1
                        fi
                        fi
                        }

                        case "$1" in
                        start)
                        #usplash_quit
                        usplash_down
                        ;;
                        stop)
                        SPLASH=true
                        if [ -f /proc/cmdline ] ; then
                        for x in $(cat /proc/cmdline); do
                        case $x in
                        nosplash*)
                        SPLASH=false
                        ;;
                        splash*)
                        SPLASH=true
                        ;;
                        esac
                        done
                        fi

                        if [ "$SPLASH" = "true" ] ; then
                        pidof usplash > /dev/null || usplash_down
                        usplash_write "TIMEOUT 15"
                        fi
                        ;;
                        *)
                        N=/etc/init.d/$NAME
                        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
                        echo "Usage: $N {start|stop}" >&2
                        exit 1
                        ;;
                        esac

                        exit 0


                        The line"usplash_quit" was originally there, and I wasn't sure if removing it was the problem, so I just put it back and commented it out
                        Linux(Learning the curve...Like when driving!!!)
                        Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

                        Comment


                        • #13
                          so if in terminal you run:
                          sudo usplash_down
                          you can see your defined bootsplash?

                          Comment


                          • #14
                            Originally posted by nemocrk View Post
                            so if in terminal you run:
                            sudo usplash_down
                            you can see your defined bootsplash?

                            Yes... without the indicator moving side to side. Then after a few seconds it disappears and all I get is a blank screen with just the cursor blinking.

                            Reinstalled usplash, then ran and got...


                            [email protected]:/home/chrysler300m# sudo update-rc.d -f usplash remove
                            Removing any system startup links for /etc/init.d/usplash ...
                            /etc/rc0.d/K02usplash
                            /etc/rc1.d/K02usplash
                            /etc/rc2.d/S98usplash
                            /etc/rc3.d/S98usplash
                            /etc/rc4.d/S98usplash
                            /etc/rc5.d/S98usplash
                            /etc/rc6.d/K02usplash
                            [email protected]:/home/chrysler300m# sudo update-rc.d usplash 01 S . 01 0 1 6
                            usage: update-rc.d [-n] [-f] <basename> remove
                            update-rc.d [-n] <basename> defaults [NN | SS KK]
                            update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
                            -n: not really
                            -f: force
                            [email protected]:/home/chrysler300m#
                            Linux(Learning the curve...Like when driving!!!)
                            Worklog!!!http://www.mp3car.com/vbulletin/fabr...l-worklog.html

                            Comment


                            • #15
                              so if in terminal you type:
                              sudo /etc/init.d/usplash start
                              you have to see your bootsplash again... or not?

                              Comment

                              Working...
                              X