Results 1 to 2 of 2

Thread: How do I add another run level (level 7) in Ubuntu?

  1. #1
    Join Date
    May 2007
    Beans
    980
    Distro
    Ubuntu 18.04 Bionic Beaver

    How do I add another run level (level 7) in Ubuntu?

    Ubuntu has 8 run levels (0-6 and S), I want to add the run level 7.

    I have done the following:

    1.- Created the folder /etc/rc7.d/, which contains some symbolic links to /etc/init.d/

    2.- Created the file /etc/event.d/rc7 This is its content:

    PHP Code:
    # rc7 - runlevel 7 compatibility
    #
    # This task runs the old sysv-rc runlevel 7 ("multi-user") scripts.  It
    # is usually started by the telinit compatibility wrapper.

    start on runlevel 7

    stop on runlevel 
    [!7]

    console output
    script
        set 
    $(runlevel --set 7 || true)
        if [ 
    "$1" != "unknown" ]; then
            PREVLEVEL
    =$1
            RUNLEVEL
    =$2
            export PREVLEVEL RUNLEVEL
        fi

        exec 
    /etc/init.d/rc 7
    end script 
    I thought that would be enough, but telinit 7 still throws this error: telinit: illegal runlevel: 7

  2. #2
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do I add another run level (level 7) in Ubuntu?

    you're going to have to change some kernel/init code methinks.

    by default Ubuntu boots in runlevel 2 for the regular boot, why don't you want to use 3 or 4 or 5?
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •