Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ telninit(1m) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                 init(1m)



        _________________________________________________________________
        init, telinit
        initialize and control processes
        _________________________________________________________________


        SYNTAX

        /etc/init [0123456SsQq]

        /etc/telinit [0123456sSQqabc]


        DESCRIPTION

           Init

        Init creates processes based on instructions stored in the file
        /etc/inittab. Init reads inittab and then invokes the getty(1M)
        program which initializes terminal (tty) line parameters in
        preparation for users to login.  Init also controls autonomous
        processes required by your particular system.

        Init considers the system to be in a run level at any given time.
        A run level can be viewed as a software configuration in which
        only a selected group of processes exist.  Run levels are labeled
        s, 0, 1, 2, 3, 4, 5, or 6.  To change the run level, a superuser
        can execute the init program with a run level as an argument.
        This user-spawned init sends appropriate signals to the orginal
        init that was spawned by the operating system at boot time,
        telling it which run level to change to.

        Init is invoked as the last step in the boot procedure.  It first
        looks in /etc/inittab for an entry of the type initdefault If it
        finds such an entry, init uses the run level specified in that
        entry as the initial run level to enter.  If this entry is not in
        inittab or inittab is not found, init requests that the user
        enter a run level from the system console.  If an S is entered,
        init goes into the single-user level.  This is the only run level
        that doesn't require the existence of a properly formatted
        inittab file.  If /etc/inittab doesn't exist, then by default the
        only legal run level that can exist is single-user.

        In the single-user level, the system console /dev/syscon is
        opened for reading and writing and the command /bin/su is invoked
        immediately.  You can exit from the single-user run level in two
        ways.  First, if the shell is terminated (via an end-of-file),
        init reprompts for a new run level.  Second, the init or telinit
        command can signal init and force it to change the run level of
        the system.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                 init(1m)



        The device /dev/syscon should always be linked to the physical
        system console (/dev/systty) located next to the processor.

        When init prompts for the new run level, the operator can enter
        only one of the digits 0 through 6 or the letters S or s.  If S
        is entered, init operates as previously described in single-user
        mode; This operation may only be performed from the system
        console.

        When init comes up initially and whenever it switches out of
        single-user mode to normal run modes, it sets the ioctl(2) modes
        of the system console, /dev/syscon, to a set of default nodes.

        If the operator types 0 through 6, init enters the corresponding
        run level.  Any other input will be rejected and the user will be
        re-prompted.  If this is the first time init has entered a run
        level other than single-user, init first scans inittab for
        special entries of the type boot and bootwait . These entries are
        performed, if the run level entered matches that of the entry
        before any normal processing of inittab . The inittab file is
        scanned to find all entries that are to be processed for that run
        level.

        Run levels 2 or 3 contain all of the terminal processes and
        agents that are spawned in the multi-user environment.  Level 3
        is a multi-user mode used for DG/UX systems running the Network
        File System (NFS).

        In a multi-user environment, the inittab file is usually set up
        so that init creates a process for each terminal on the system.

        For terminal processes, the shell ultimately terminates because
        of an end-of-file either typed explicitly or generated as the
        result of hanging up.  When init receives a signal telling it
        that a process it spawned has terminated, it records the
        termination and the reason for it in /etc/utmp and /etc/wtmp if
        it exists.  See who(1).  A history of the processes spawned is
        kept in /etc/wtmp.

        To spawn each process in the inittab file, init reads each entry
        and forks a child process for each entry that should be
        respawned.  After it has spawned all of the processes specified
        by the inittab file, init waits for one of its descendant
        processes to die, a powerfail signal, or for a signal from init
        or telinit to change the system's run level.  When one of the
        above three conditions occurs, init re-examines the inittab file.
        New entries can be added to the inittab file at any time;
        however, init still waits for one of the above three conditions
        to occur.  To provide for an instantaneous response, the init Q
        or init q command can wake init to re-examine the inittab file.




        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)





                                                                 init(1m)



        When init is requested to change run levels (via telinit), init
        sends the warning signal (SIGTERM) to all processes that are
        undefined in the target run level.  Init waits 20 seconds before
        forcibly terminating these processes via the kill signal
        (SIGKILL).


           Telinit

        Telinit, which is linked to /etc/init, directs the actions of
        init.  It takes a one-character argument and signals init via the
        kill system call to perform the appropriate action.  The
        following arguments serve as directives to init:

             0-6      Place the system in one of the run levels 0-6.

             a,b,c    Process only those /etc/inittab file entries set to
                      run level a, b or c.

             Q,q      Re-examine the /etc/inittab file.

             s,S      Enter single-user mode.  This operation may be
                      performed only from the system console.

        Telinit can be run only by a superuser or a member of group sys.


        FILES

        /etc/inittab
        /etc/utmp
        /etc/wtmp
        /dev/syscon
        /dev/systty


        NOTES

        The DG/UX System does not currently support powerfail.


        SEE ALSO

        getty(1M), login(1), sh(1), who(1), kill(2), inittab(4), utmp(4).


        DIAGNOSTICS

        If init finds that it is respawning an entry from /etc/inittab
        more than 10 times in two minutes, it assumes that there is an
        error in the command string.  It generates an error message on



        DG/UX 4.00                                                 Page 3
               Licensed material--property of copyright holder(s)





                                                                 init(1m)



        the system console and refuses to respawn this entry until either
        five minutes have elapsed or it receives a signal from a user
        init (telinit).  This keeps init from using up system resources
        when someone makes a typographical error in the inittab file or a
        program is removed that is referenced in the inittab file.

















































        DG/UX 4.00                                                 Page 4
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026