Feeds:
Posts
Comments

Posts Tagged ‘init’

unix init — Jun 12, 2010

getty – set terminal type, modes, speed, and line discipline. getty is invoked by init, as the second process in the series, init > getty > login > shell, that ultimately connects a user with the HPUX system.Getty sets the terminal speed and characteristics and prompts for the users’  login information before passing control to the login program.

While the system is running, a user-spawned init directs the actions of the boot init. It accepts a one-character argument and signals the boot init with the kill() system call to perform the appropriate action :::

  • 0~6: Place the system into one of  the run levels 0 through 6
  • a|b|c: Process the inittab entries that have the special “run level” a, b or c, without changing the numeric run level
  • Q|q: Re-example the inittab entries without changing the run level
  • S|s: Enter the single-user mode. When this level change occurs, the logical system console /dev/syscon is changed to the terminal from which the command was executed

When boot init receives a child death signal telling it that a process it spawned has died, it records the fact and the reason it died in the utmps database, /etc/utmp, /var/adm/wtmps.

After boot init has spawned all of the processes specified in the file /etc/inittab, boot init waits for:

  • one of its descendant processes to die
  • a powerfail signal
  • signaled by a user init to change the system’s run level

when one the above conditions happen, boot init re-examine the /etc/inittab. New items can be added to the inittab file at any time.

Advertisements

Read Full Post »

Jun 7th — Unix Init

The init Daemon and command is a general process spawner. Its primary role is to create processes from a script stored in the file /etc/inittab. This file usually has init spawn  a getty on each line where user can log in.

In the single-user level, the logical system console terminal /dev/syscon is opened for reading and writing.

——————————————————————————————————-

Run levels in HPUX are defined as following:

0::::::Shut down HPUX

1::::::Start a subset of essential system processes

2::::::Start most system daemon and login processes

3::::::Export filesystems and start other system processes

4::::::Active graphical presentation managers and start other system processes

S|s:::Use for system administration(also called single-user mode)

The default system run level usually 3 or 4, depending on the system configuration.

——————————————————————————————————-

The inittab file entry usually has the following format:

id:rstate:action:process

  • id:::A one to four character value used to uniquely identify an entry
  • rstate:::Defines  the run level in which this entry is to be processed(0-6 | a-c | S|s)
  • action:::A keyword tells boot init how to treat the process specified in the process field
  • process:::This is a sh command to be executed

Read Full Post »