Skip to content

Commit

Permalink
提交翻译完成内容 (LCTT#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin2011qi authored Jul 11, 2017
1 parent 8252aab commit 6f0c1b6
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 222 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@

#### sysv

* **未实施** chapter06/sysklogd.xml
* **未实施** chapter06/sysvinit.xml
* **未实施** chapter06/eudev.xml
* **未实施** chapter07/introduction.xml
* **未实施** chapter07/bootscripts.xml
* **未实施** chapter07/network.xml
* **未实施** chapter07/usage.xml
* **未实施** chapter07/profile.xml
* **未实施** appendices/scripts.xml
* **未实施** appendices/udev-rules.xml
* **已完成** chapter06/sysklogd.xml
* **已完成** chapter06/sysvinit.xml
* **已完成** chapter06/eudev.xml
* **已完成** chapter07/introduction.xml
* **已完成** chapter07/bootscripts.xml
* **martin** chapter07/network.xml
* **martin** chapter07/usage.xml
* **martin** chapter07/profile.xml
* **已完成** appendices/scripts.xml
* **已完成** appendices/udev-rules.xml

以上为 sysv 独立章节,混合章节内部缓步更新。

Expand Down
16 changes: 4 additions & 12 deletions appendices/scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,18 @@
%general-entities;
]>

<appendix id="scripts" xreflabel="Appendix D" revision="sysv">
<appendix id="scripts" xreflabel="附录 D" revision="sysv">
<?dbhtml dir="scripts"?>
<?dbhtml filename="scripts.html"?>

<title>Boot and sysconfig scripts version-&lfs-bootscripts-version;</title>
<title>启动及系统配置脚本版本-&lfs-bootscripts-version;</title>

<para>The scripts in this appendix are listed by the directory where they
normally reside. The order is <filename
class='directory'>/etc/rc.d/init.d</filename>, <filename
class='directory'>/etc/sysconfig</filename>, <filename
class='directory'>/etc/sysconfig/network-devices</filename>, and <filename
class='directory'>/etc/sysconfig/network-devices/services</filename>. Within
each section, the files are listed in the order they are normally called.
</para>
<para>本附录中的脚本按其常规存放的目录顺序列出。顺序按次为 <filename class='directory'>/etc/rc.d/init.d</filename>,<filename class='directory'>/etc/sysconfig</filename>,<filename class='directory'>/etc/sysconfig/network-devices</filename>,和 <filename class='directory'>/etc/sysconfig/network-devices/services</filename>。各个段落中,文件会按其通常情况下,调用的顺序列出。</para>

<sect1 id="rc" role="wrap">
<title>/etc/rc.d/init.d/rc</title>

<para>The <systemitem>rc</systemitem> script is the first script called by
<application>init</application> and initiates the boot process.</para>
<para><systemitem>rc</systemitem> 脚本是 <application>init</application> 调用的第一个,也是开始启动过程伊始运行的第一个脚本。</para>

<screen>&rc;</screen>
</sect1>
Expand Down
7 changes: 3 additions & 4 deletions appendices/udev-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
%general-entities;
]>

<appendix id="rules" xreflabel="Appendix E" revision="sysv">
<appendix id="rules" xreflabel="附录 E" revision="sysv">
<?dbhtml dir="scripts"?>
<?dbhtml filename="eudev-rules.html"?>

<title>udev configuration rules</title>
<title>udev 配置规则</title>

<para>The rules in this appendix are listed for convenience. Installation is
normally done via instructions in <xref linkend='ch-system-eudev'/>. </para>
<para>本附录仅为方便,在此处列出了配置规则。实则,经过 <xref linkend='ch-system-eudev'/> 的说明,安装已然已经完成。</para>

<sect1 id="lfsrules" role="wrap">
<title>55-lfs.rules</title>
Expand Down
64 changes: 24 additions & 40 deletions chapter06/eudev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<sect2 role="package">
<title/>

<para>The Eudev package contains programs for dynamic creation of device
nodes.</para>
<para>Eudev 软件包包含动态创建设备节点的程序。</para>

<segmentedlist>
<segtitle>&buildtime;</segtitle>
Expand All @@ -38,26 +37,25 @@
</sect2>

<sect2 role="installation">
<title>Installation of Eudev</title>
<title>安装 Eudev</title>

<para>First, fix a test script:</para>
<para>首先,修复一个测试脚本:</para>

<screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>

<para>Next, remove an unneeded line that causes a build failure:</para>
<para>接着,去掉会导致编译失败,又不需要的一行:</para>

<screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>

<para>Next, add a workaround to prevent the /tools directory from being
hard coded into Eudev binary files library locations:</para>
<para>接着,追加一个解决方案以保证 /tools 目录不会被硬编码到 Eudev 的二进制文件库处:</para>

<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
BLKID_CFLAGS="-I/tools/include"
EOF</userinput></screen>

<para>Prepare Eudev for compilation:</para>
<para>准备编译 Eudev</para>

<screen><userinput remap="configure">./configure --prefix=/usr \
--bindir=/sbin \
Expand All @@ -81,34 +79,32 @@ EOF</userinput></screen>
-->

<para>Compile the package:</para>
<para>编译软件包:</para>

<screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>

<para>Create some directories now that are needed for tests, but
will also be used as a part of installation:</para>
<para>现在创建一些目录,不仅仅是为了测试需求,一部分的安装操作也将用到:</para>

<screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
mkdir -pv /etc/udev/rules.d</userinput></screen>

<para>To test the results, issue:</para>
<para>测试编译结果,通过:</para>

<screen><userinput remap="test">make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>

<para>Install the package:</para>
<para>安装软件包:</para>

<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>

<para>Install some custom rules and support files useful in an LFS
environment:</para>
<para>安装一些对 LFS 的环境中有益的自定义规则和支持文件:</para>

<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.bz2
make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>

</sect2>

<sect2 id="conf-eudev" role="configuration">
<title>Configuring Eudev</title>
<title>配置 Eudev</title>

<indexterm zone="conf-eudev">
<primary sortas="a-Eudev">Eudev</primary>
Expand All @@ -119,27 +115,21 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
</indexterm>

<para>Information about hardware devices is maintained in the
<filename class="directory">/etc/udev/hwdb.d</filename> and
<filename class="directory">/usr/lib/udev/hwdb.d</filename> directories.
<application>Eudev</application> needs that information to be compiled
into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
initial database:</para>
<para>有关硬件的设备存放在 <filename class="directory">/etc/udev/hwdb.d</filename> 和 <filename class="directory">/usr/lib/udev/hwdb.d</filename> 目录中。<application>Eudev</application> 需要将这些信息编译到一个二进制数据库文件 <filename>/etc/udev/hwdb.bin</filename> 中去。创建初始数据库:</para>

<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb --update</userinput></screen>

<para>This command needs to be run each time the hardware information is
updated.</para>
<para>该命令需在每次更新硬件信息时运行。</para>

</sect2>

<sect2 id="contents-eudev" role="content">
<title>Contents of Eudev</title>
<title>Eudev 软件包的内容</title>

<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed libraries</segtitle>
<segtitle>Installed directories</segtitle>
<segtitle>安装的程序</segtitle>
<segtitle>安装的库</segtitle>
<segtitle>安装的目录</segtitle>

<seglistitem>
<seg><!-- These are in /lib/udev and not to be called by the user:
Expand All @@ -148,21 +138,18 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>

<seg>libudev.so</seg>

<seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-20140408</seg>
<seg>/etc/udev, /lib/udev, /usr/share/doc/udev-20140408</seg>
</seglistitem>
</segmentedlist>

<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<bridgehead renderas="sect3">简要介绍</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="udevadm" revision="sysv">
<term><command>udevadm</command></term>
<listitem>
<para>Generic udev administration tool: controls the udevd daemon,
provides info from the udev database, monitors uevents, waits for
uevents to finish, tests udev configuration, and triggers uevents
for a given device</para>
<para>通用 udev 管理工具:控制守护进程 udevd,从 udev 数据库提供信息,监控 uevent,等待 uevent 完成,测试 udev 配置,并为给定的设备触发 uevent</para>
<indexterm zone="ch-system-eudev udevadm">
<primary sortas="b-udevadm">udevadm</primary>
</indexterm>
Expand All @@ -172,9 +159,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="udevd">
<term><command>udevd</command></term>
<listitem>
<para>A daemon that listens for uevents on the netlink socket,
creates devices and runs the configured external programs in
response to these uevents</para>
<para>一个守护进程,用于监听 netlink 套接字上 uevent,创建设备和运行这些 uevent 的应答中已被配置了的外部命令</para>
<indexterm zone="ch-system-eudev udevd">
<primary sortas="b-udevd">udevd</primary>
</indexterm>
Expand All @@ -184,7 +169,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="libudev">
<term><filename class="libraryfile">libudev</filename></term>
<listitem>
<para>A library interface to udev device information</para>
<para>一个 udev 设备信息的库接口</para>
<indexterm zone="ch-system-eudev libudev">
<primary sortas="c-libudev">libudev</primary>
</indexterm>
Expand All @@ -194,8 +179,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="etc-udev">
<term><filename class="directory">/etc/udev</filename></term>
<listitem>
<para>Contains udev configuration files,
device permissions, and rules for device naming</para>
<para>包含 udev 的配置文件,设备权限,以及设备命名规则</para>
<indexterm zone="ch-system-eudev etc-udev">
<primary sortas="e-/etc/udev">/etc/udev</primary>
</indexterm>
Expand Down
34 changes: 14 additions & 20 deletions chapter06/sysklogd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<sect2 role="package">
<title/>

<para>The Sysklogd package contains programs for logging system messages,
such as those given by the kernel when unusual things happen.</para>
<para>Sysklogd 软件包包含用于记录系统消息的程序,它们记录着,诸如,一些异乎寻常的事件发生时,内核给出的那些消息。</para>

<segmentedlist>
<segtitle>&buildtime;</segtitle>
Expand All @@ -39,28 +38,27 @@
</sect2>

<sect2 role="installation">
<title>Installation of Sysklogd</title>
<title>安装 Sysklogd</title>

<para>First, fix problems that causes a segmentation fault under
some conditions in klogd and fix an obsolete program construct:</para>
<para>首先,修复 klogd 在某些条件下会导致 “segmentation fault” 的问题,并修复一个过时的程序结构:</para>

<screen><userinput remap="pre">sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
sed -i 's/union wait/int/' syslogd.c</userinput></screen>

<para>Compile the package:</para>
<para>编译软件包:</para>

<screen><userinput remap="make">make</userinput></screen>

<para>This package does not come with a test suite.</para>
<para>该软件包没有测试套件。</para>

<para>Install the package:</para>
<para>安装软件包:</para>

<screen><userinput remap="install">make BINDIR=/sbin install</userinput></screen>

</sect2>

<sect2 id="conf-sysklogd" role="configuration">
<title>Configuring Sysklogd</title>
<title>配置 Sysklogd</title>

<indexterm zone="conf-sysklogd">
<primary sortas="a-Sysklogd">Sysklogd</primary>
Expand All @@ -71,8 +69,7 @@ sed -i 's/union wait/int/' syslogd.c</userinput></screen>
<primary sortas="e-/etc/syslog.conf">/etc/syslog.conf</primary>
</indexterm>

<para>Create a new <filename>/etc/syslog.conf</filename> file by running the
following:</para>
<para>运行以下命令新建 <filename>/etc/syslog.conf</filename> 文件:</para>

<screen><userinput>cat &gt; /etc/syslog.conf &lt;&lt; "EOF"
<literal># Begin /etc/syslog.conf
Expand All @@ -91,25 +88,25 @@ EOF</userinput></screen>
</sect2>

<sect2 id="contents-sysklogd" role="content">
<title>Contents of Sysklogd</title>
<title>Sysklogd 软件包的内容</title>

<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>安装的程序</segtitle>

<seglistitem>
<seg>klogd and syslogd</seg>
<seg>klogd syslogd</seg>
</seglistitem>
</segmentedlist>

<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<bridgehead renderas="sect3">简要介绍</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>

<varlistentry id="klogd">
<term><command>klogd</command></term>
<listitem>
<para>A system daemon for intercepting and logging kernel messages</para>
<para>一个用于拦截和记录内核消息的系统守护进程</para>
<indexterm zone="ch-system-sysklogd klogd">
<primary sortas="b-klogd">klogd</primary>
</indexterm>
Expand All @@ -119,10 +116,7 @@ EOF</userinput></screen>
<varlistentry id="syslogd">
<term><command>syslogd</command></term>
<listitem>
<para>Logs the messages that system programs offer for logging [Every
logged message contains at least a date stamp and a hostname, and
normally the program's name too, but that depends on how trusting the
logging daemon is told to be.]</para>
<para>记录系统程序中需要记录的消息[记录的消息中至少会包含时间戳和主机名,程序名通常也会有,这要取决于记录守护进程的可信度。]</para>
<indexterm zone="ch-system-sysklogd syslogd">
<primary sortas="b-syslogd">syslogd</primary>
</indexterm>
Expand Down
Loading

0 comments on commit 6f0c1b6

Please sign in to comment.