⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1139-1140.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Complete Command Reference:File Formats:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=05 //-->

<!-- PAGES=1103-1208 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="1136-1138.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1141-1143.html">Next</A></CENTER></P>







<A NAME="PAGENUM-1139"><P>Page 1139</P></A>





<TABLE>



<TR><TD>

rfc931 = timeout_in_seconds

</TD><TD>

</TD></TR><TR><TD>

rfc931 (no argument)

</TD><TD>

Look up the remote user name with the RFC

931 (ident and so on) protocol. This option is

silently ignored in case of services based on transports

other than TCP. It requires that the client system runs

an RFC 931 (ident and so on) compliant daemon and may cause noticeable delays with connections

from non-UNIX hosts. The time-out period is

optional. If no time-out is specified, a default value is taken.

</TD></TR></TABLE>



<P><B>

DIAGNOSTICS

</B></P>



<P>When a syntax error is found in an access control rule, the error is reported to the

syslog daemon; further options will be ignored, and service is denied.

</P>



<P><B>

SEE ALSO

</B></P>



<P>hosts_access(5), the default access control language

</P>



<P><B>

AUTHOR

</B></P>



<P>Wietse Venema (wietse@wzv.win.tue.nl), Department of Mathematics and Computing Science, Eindhoven University

of Technology, Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands.

</P>



<H3><A NAME="ch05_ 24">

inittab

</A></H3>



<P>inittab&#151;Format of the inittab file used by the SysV-compatible

init process.

</P>



<P><B>

DESCRIPTION

</B></P>



<P>The inittab file describes which processes are started at bootup and during normal operation (such as

/etc/rc, gettys). init distinguishes multiple run levels, of which each can have its own set of processes that are started. Valid

runlevels are 0_6 and A, B, and C for ondemand entries. An entry in the

inittab file has the following format:

</P>



<!-- CODE SNIP //-->

<PRE>

id:runlevels:action:process

</PRE>

<!-- END CODE SNIP //-->



<P>Lines beginning with # are ignored.

</P>



<TABLE>



<TR><TD>

id

</TD><TD>

A unique two-character-sequence which identifies an entry in

inittab.

</TD></TR><TR><TD>

</TD><TD>

Note: For gettys or other login processes, the

id field should be the tty suffix of the corresponding

tty, such as 1 for tty1. Otherwise, the login accounting will not

work correctly. This is a bug in login and will be fixed.

</TD></TR><TR><TD>

runlevels

</TD><TD>

Describes in which run levels the specified action should be taken.

</TD></TR><TR><TD>

action

</TD><TD>

Describes which action should be taken.

</TD></TR><TR><TD>

process

</TD><TD>

Specifies the process to be executed. If the process field starts with a

+ character, init will not do utmp and wtmp accounting for that process. This is needed for

gettys that insist on doing their own utmp/wtmp housekeeping. This is also a historic bug.

</TD></TR></TABLE>



<P>Valid actions are

</P>



<TABLE>



<TR><TD>

respawn

</TD><TD>

The process will be restarted whenever it terminates (such as

getty).

</TD></TR><TR><TD>

wait

</TD><TD>

The process will be started once when the specified run level is entered and

init will wait for its termination.

</TD></TR><TR><TD>

once

</TD><TD>

The process will be executed once when the specified run level is entered.

</TD></TR><TR><TD>

boot

</TD><TD>

The process will be executed during system boot. The run level field is ignored.

</TD></TR></TABLE>



<A NAME="PAGENUM-1140"><P>Page 1140</P></A>



<TABLE>



<TR><TD>

bootwait

</TD><TD>

The process will be executed during system boot while

init waits for its termination (such as /etc/rc). The

runlevel field is ignored.

</TD></TR><TR><TD>

off

</TD><TD>

This does nothing.

</TD></TR><TR><TD>

ondemand

</TD><TD>

A process marked with ondemand will be executed whenever the specified

ondemand run level is called. However, no runlevel change will occur.

</TD></TR><TR><TD>

initdefault

</TD><TD>

An initdefault-entry specifies the run level that should be entered after system boot.

If none exists, init will ask for a runlevel on the console.

</TD></TR><TR><TD>

sysinit

</TD><TD>

The process will be executed during system boot. It will be executed before any

boot or bootwait entries.

</TD></TR><TR><TD>

powerwait

</TD><TD>

The process will be executed when

init receives the SIGPWR signal, indicating that there

is something wrong with the power. init will wait for the process to finish before continuing.

</TD></TR><TR><TD>

powerfail

</TD><TD>

As powerwait but init will not wait for the processes completion.

</TD></TR><TR><TD>

powerokwait

</TD><TD>

The process will be executed when

init receives the SIGPWR signal, provided there is a

file called /etc/powerstatus containing the word

OK. This means that the power has come back again.

</TD></TR><TR><TD>

ctrlaltdel

</TD><TD>

The process will be executed when

init receives the SIGINT signal. This means that

someone on the system console pressed the Ctrl+Alt+Del key combination. Typically, one wants

to execute some sort of shutdown either to get into single_user level or to reboot the machine.

</TD></TR></TABLE>



<P>The runlevel field may contain multiple characters for different run levels, such as

123 if the process should be started in run levels 1, 2 and 3.

Ondemand entries may contain an A, B, or C. The

runlevel field of sysinit, boot, and bootwait entries

are ignored.

</P>

<P>When the run level is changed, any running processes that are not specified for the new run level are killed, first with

SIGTERM and then with SIGKILL.

</P>



<P><B>

EXAMPLES

</B></P>



<P>This is an example of an inittab that resembles the old Linux

inittab:

</P>



<!-- CODE //-->

<PRE>

# inittab for linux

id:1:initdefault:

rc::bootwait:/etc/rc

1:1:respawn:/etc/getty 9600 tty1

2:1:respawn:/etc/getty 9600 tty2

3:1:respawn:/etc/getty 9600 tty3

4:1:respawn:/etc/getty 9600 tty4

</PRE>

<!-- END CODE //-->



<P>This inittab file executes /etc/rc during boot and starts

gettys on tty1_tty4.

</P>



<P>A more elaborate inittab with different run levels (see the comments inside) is

</P>



<!-- CODE //-->

<PRE>

#Level to run in

id:4:initdefault:

ud::boot:/etc/update

rc::bootwait:/etc/rc

cr::boot:/etc/crond

#

# level 1: getty on tty1

# level 2: getty on tty1-4

# level 3: tty1-4, dialin via modem(ttys2)

# level 4: tty1-4, ttyb

#

mr:126:once:/usr/bin/nodialin

mi:345:once:/usr/bin/dialin

1:1234:respawn:/etc/getty 9600 tty1

2:234:respawn:/etc/getty 9600 tty2

3:234:respawn:/etc/getty 9600 tty3

</PRE>

<!-- END CODE //-->





<P><CENTER>

<a href="1136-1138.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1141-1143.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -