Date: Sun, 12 May 2013 18:54:29 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r41615 - projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/config Message-ID: <201305121854.r4CIsT9K030455@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Sun May 12 18:54:29 2013 New Revision: 41615 URL: http://svnweb.freebsd.org/changeset/doc/41615 Log: White space fix only. Translators can ignore. Approved by: bcr (mentor) Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/config/chapter.xml Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/config/chapter.xml ============================================================================== --- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/config/chapter.xml Sun May 12 17:59:38 2013 (r41614) +++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/config/chapter.xml Sun May 12 18:54:29 2013 (r41615) @@ -68,13 +68,12 @@ </listitem> <listitem> - <para>How to use the various configuration files in - <filename class="directory">/etc</filename>.</para> + <para>How to use the various configuration files in <filename + class="directory">/etc</filename>.</para> </listitem> <listitem> - <para>How to tune &os; using &man.sysctl.8; - variables.</para> + <para>How to tune &os; using &man.sysctl.8; variables.</para> </listitem> <listitem> @@ -120,8 +119,8 @@ <para>When laying out file systems with &man.bsdlabel.8; or &man.sysinstall.8;, remember that hard drives transfer data - faster from the outer tracks to the inner. Thus, smaller and - heavier-accessed file systems should be closer to the + faster from the outer tracks to the inner. Thus, smaller + and heavier-accessed file systems should be closer to the outside of the drive, while larger partitions like <filename class="directory">/usr</filename> should be placed toward the inner parts of the disk. It is a good idea to @@ -133,26 +132,25 @@ <para>The size of the <filename class="directory">/var</filename> partition reflects the intended machine's usage. This partition - is used to hold - mailboxes, log files, and printer spools. Mailboxes and log - files can grow to unexpected sizes depending on the number of - users and how long log files are kept. On average, most users - rarely need more than about a gigabyte of free disk space in - <filename class="directory">/var</filename>.</para> + is used to hold mailboxes, log files, and printer spools. + Mailboxes and log files can grow to unexpected sizes + depending on the number of users and how long log files + are kept. On average, most users rarely need more than + about a gigabyte of free disk space in <filename + class="directory">/var</filename>.</para> <note> - <para>Sometimes, a lot of disk space is - required in - <filename class="directory">/var/tmp</filename>. When new - software is installed with &man.pkg.add.1;, the packaging - tools extract a temporary copy of the packages under - <filename class="directory">/var/tmp</filename>. Large - software packages, like + <para>Sometimes, a lot of disk space is required in + <filename class="directory">/var/tmp</filename>. When + new software is installed with &man.pkg.add.1;, the + packaging tools extract a temporary copy of the packages + under <filename class="directory">/var/tmp</filename>. + Large software packages, like <application>Firefox</application>, <application>OpenOffice</application> or <application>LibreOffice</application> may be tricky to - install if there is not enough disk space under - <filename class="directory">/var/tmp</filename>.</para> + install if there is not enough disk space under <filename + class="directory">/var/tmp</filename>.</para> </note> <para>The <filename class="directory">/usr</filename> @@ -162,17 +160,14 @@ partition.</para> <para>When selecting partition sizes, keep the space - requirements in mind. Running out of space in - one partition while barely using another can be a - hassle.</para> + requirements in mind. Running out of space in one partition + while barely using another can be a hassle.</para> <note> - <para>The - <literal>Auto-defaults</literal> partition sizer used by - &man.sysinstall.8; will - sometimes select smaller than adequate - <filename class="directory">/var</filename> and - <filename class="directory">/</filename> partitions. + <para>The <literal>Auto-defaults</literal> partition sizer + used by &man.sysinstall.8; will sometimes select smaller + than adequate <filename class="directory">/var</filename> + and <filename class="directory">/</filename> partitions. Partition wisely and generously.</para> </note> </sect3> @@ -185,30 +180,27 @@ <para>As a rule of thumb, the swap partition should be about double the size of physical memory (<acronym>RAM</acronym>) - as the kernel's - virtual memory (<acronym>VM</acronym>) paging algorithms - are tuned to perform - best when the swap partition is at least two times - the size of main memory. Systems with minimal - <acronym>RAM</acronym> may - perform better with more swap. Configuring too little swap - can lead to inefficiencies in the <acronym>VM</acronym> - page scanning code and - might create issues later if more memory is added.</para> + as the kernel's virtual memory (<acronym>VM</acronym>) + paging algorithms are tuned to perform best when the swap + partition is at least two times the size of main memory. + Systems with minimal <acronym>RAM</acronym> may perform + better with more swap. Configuring too little swap can + lead to inefficiencies in the <acronym>VM</acronym> page + scanning code and might create issues later if more memory + is added.</para> <para>On larger systems with multiple <acronym>SCSI</acronym> - disks or multiple - <acronym>IDE</acronym> disks operating on different - controllers, it is - recommended that swap be configured on each drive, up to - four drives. The swap partitions should be approximately - the same size. The kernel can handle arbitrary sizes but - internal data structures scale to 4 times the largest swap - partition. Keeping the swap partitions near the same size - will allow the kernel to optimally stripe swap space across - disks. Large swap sizes are fine, even if swap is not used - much. It might be easier to recover from a runaway program - before being forced to reboot.</para> + disks or multiple <acronym>IDE</acronym> disks operating + on different controllers, it is recommended that swap be + configured on each drive, up to four drives. The swap + partitions should be approximately the same size. The + kernel can handle arbitrary sizes but internal data + structures scale to 4 times the largest swap partition. + Keeping the swap partitions near the same size will allow + the kernel to optimally stripe swap space across disks. + Large swap sizes are fine, even if swap is not used much. + It might be easier to recover from a runaway program before + being forced to reboot.</para> </sect3> <sect3> @@ -218,24 +210,24 @@ fine, but there are several reasons why this is a bad idea. First, each partition has different operational characteristics and separating them allows the file system - to tune accordingly. For example, the root and - <filename class="directory">/usr</filename> partitions are + to tune accordingly. For example, the root and <filename + class="directory">/usr</filename> partitions are read-mostly, with few writes, while a lot of reads and - writes could occur in - <filename class="directory">/var</filename> and - <filename class="directory">/var/tmp</filename>.</para> + writes could occur in <filename + class="directory">/var</filename> and <filename + class="directory">/var/tmp</filename>.</para> <para>By properly partitioning a system, fragmentation introduced in the smaller write heavy partitions will not bleed over into the mostly read partitions. Keeping the write loaded partitions closer to the disk's edge will increase I/O performance in the partitions where it occurs - the most. While I/O performance in the larger - partitions may be needed, shifting them more toward the edge - of the disk will not lead to a significant performance - improvement over moving - <filename class="directory">/var</filename> to the edge. - Finally, there are safety concerns. A smaller, neater root + the most. While I/O performance in the larger partitions + may be needed, shifting them more toward the edge of the + disk will not lead to a significant performance + improvement over moving <filename + class="directory">/var</filename> to the edge. Finally, + there are safety concerns. A smaller, neater root partition which is mostly read-only has a greater chance of surviving a bad crash.</para> </sect3> @@ -251,8 +243,8 @@ </indexterm> <para>The principal location for system configuration information - is <filename>/etc/rc.conf</filename>. This file contains - a wide range of configuration information and it is read at + is <filename>/etc/rc.conf</filename>. This file contains a + wide range of configuration information and it is read at system startup to configure the system. It provides the configuration information for the <filename>rc*</filename> files.</para> @@ -269,8 +261,7 @@ system-specific configuration in order to keep administration overhead down. The recommended approach is to place system-specific configuration into - <filename>/etc/rc.conf.local</filename>. For - example:</para> + <filename>/etc/rc.conf.local</filename>. For example:</para> <itemizedlist> <listitem> @@ -291,10 +282,10 @@ ifconfig_fxp0="inet 10.1.1.1/8"</program </listitem> </itemizedlist> - <para>Distribute <filename>/etc/rc.conf</filename> - to every system using <command>rsync</command> or a - similar program, while <filename>/etc/rc.conf.local</filename> - remains unique.</para> + <para>Distribute <filename>/etc/rc.conf</filename> to every + system using <command>rsync</command> or a similar program, + while <filename>/etc/rc.conf.local</filename> remains + unique.</para> <para>Upgrading the system using &man.sysinstall.8; or <command>make world</command> will not overwrite @@ -320,18 +311,17 @@ ifconfig_fxp0="inet 10.1.1.1/8"</program <indexterm><primary>/usr/local/etc</primary></indexterm> - <para>Typically, these files are installed in - <filename class="directory">/usr/local/etc</filename>. In the - case where an application has a large number of configuration + <para>Typically, these files are installed in <filename + class="directory">/usr/local/etc</filename>. In the case + where an application has a large number of configuration files, a subdirectory will be created to hold them.</para> <para>Normally, when a port or package is installed, sample configuration files are also installed. These are usually identified with a suffix such as <filename>.sample</filename>. - If - there are no existing configuration files for the application, - they can be created by copying the - sample files.</para> + If there are no existing configuration files for the + application, they can be created by copying the sample + files.</para> <para>For example, consider the contents of the directory <filename @@ -348,10 +338,10 @@ ifconfig_fxp0="inet 10.1.1.1/8"</program -rw-r--r-- 1 root wheel 7980 May 20 1998 srm.conf -rw-r--r-- 1 root wheel 7933 May 20 1998 srm.conf.default</literallayout> - <para>The file sizes show that only - <filename>srm.conf</filename> has been changed. A later - update of the <application>Apache</application> port would not - overwrite this changed file.</para> + <para>The file sizes show that only <filename>srm.conf</filename> + has been changed. A later update of the + <application>Apache</application> port would not overwrite + this changed file.</para> </sect1> <sect1 id="configtuning-starting-services"> @@ -371,10 +361,10 @@ ifconfig_fxp0="inet 10.1.1.1/8"</program <para>Many users install third party software on &os; from the Ports Collection and require the installed services to be - started upon system initialization. Services, - such as <filename role="package">mail/postfix</filename> or - <filename role="package">www/apache22</filename> are just two of - the many software packages which may be started during system + started upon system initialization. Services, such as + <filename role="package">mail/postfix</filename> or + <filename role="package">www/apache22</filename> are just two + of the many software packages which may be started during system initialization. This section explains the procedures available for starting third party software.</para> @@ -386,13 +376,12 @@ ifconfig_fxp0="inet 10.1.1.1/8"</program <para>Now that &os; includes <filename>rc.d</filename>, configuration of application startup is easier and provides - more features. Using the key words discussed in - <xref linkend="configtuning-rcd"/>, - applications can be set to start after certain other services - and extra flags can be passed through - <filename>/etc/rc.conf</filename> in place of hard coded flags - in the start up script. A basic script may look similar to - the following:</para> + more features. Using the key words discussed in <xref + linkend="configtuning-rcd"/>, applications can be set to + start after certain other services and extra flags can be + passed through <filename>/etc/rc.conf</filename> in place of + hard coded flags in the start up script. A basic script may + look similar to the following:</para> <programlisting>#!/bin/sh # @@ -429,34 +418,32 @@ run_rc_command "$1"</programlisting> <programlisting>utility_enable="YES"</programlisting> - <para>This method allows for easier manipulation of - command line arguments, inclusion of the default functions - provided in <filename>/etc/rc.subr</filename>, compatibility - with &man.rcorder.8;, and provides for easier - configuration via <filename>rc.conf</filename>.</para> + <para>This method allows for easier manipulation of command + line arguments, inclusion of the default functions provided + in <filename>/etc/rc.subr</filename>, compatibility with + &man.rcorder.8;, and provides for easier configuration via + <filename>rc.conf</filename>.</para> </sect2> <sect2> <title>Using Services to Start Services</title> - <para>Other services can be started using - &man.inetd.8;. Working - with &man.inetd.8; and its configuration is + <para>Other services can be started using &man.inetd.8;. + Working with &man.inetd.8; and its configuration is described in depth in <xref linkend="network-inetd"/>.</para> <para>In some cases, it may make more sense to use &man.cron.8; to start system services. This approach - has a number of advantages as &man.cron.8; - runs these processes as the owner of the &man.crontab.5;. - This allows regular users to start and maintain their own + has a number of advantages as &man.cron.8; runs these + processes as the owner of the &man.crontab.5;. This allows + regular users to start and maintain their own applications.</para> <para>The <literal>@reboot</literal> feature of &man.cron.8;, - may be used in - place of the time specification. This causes the job to - run when &man.cron.8; is started, normally during system - initialization.</para> + may be used in place of the time specification. This causes + the job to run when &man.cron.8; is started, normally during + system initialization.</para> </sect2> </sect1> @@ -479,20 +466,18 @@ run_rc_command "$1"</programlisting> <para>One of the most useful utilities in &os; is &man.cron.8;. This utility runs in the background and regularly checks <filename>/etc/crontab</filename> for tasks to execute and - searches - <filename class="directory">/var/cron/tabs</filename> for custom - &man.crontab.5; files. These files store - information about specific functions which - &man.cron.8; is supposed to perform at certain - times.</para> + searches <filename class="directory">/var/cron/tabs</filename> + for custom &man.crontab.5; files. These files store + information about specific functions which &man.cron.8; is + supposed to perform at certain times.</para> <para>Two different types of configuration files are used by - &man.cron.8;: the system crontab and user crontabs. - These formats only differ in the sixth field and later. In the - system crontab, &man.cron.8; runs the command as - the user specified in the sixth field. In a user crontab, all - commands run as the user who created the crontab, so the sixth - field is the last field; this is an important security feature. + &man.cron.8;: the system crontab and user crontabs. These + formats only differ in the sixth field and later. In the + system crontab, &man.cron.8; runs the command as the user + specified in the sixth field. In a user crontab, all commands + run as the user who created the crontab, so the sixth field + is the last field; this is an important security feature. The final field is always the command to run.</para> <note> @@ -505,14 +490,13 @@ run_rc_command "$1"</programlisting> just like any other user. The <username>root</username> user crontab is separate from the system crontab, <filename>/etc/crontab</filename>. - Because the system crontab - invokes the specified commands as <username>root</username>, - there is usually no - need to create a user crontab for - <username>root</username>.</para> + Because the system crontab invokes the specified commands as + <username>root</username>, there is usually no need to create + a user crontab for <username>root</username>.</para> </note> - <para>Here is a sample entry from <filename>/etc/crontab</filename>:</para> + <para>Here is a sample entry from + <filename>/etc/crontab</filename>:</para> <programlisting># /etc/crontab - root's crontab for FreeBSD # @@ -538,15 +522,13 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin </callout> <callout arearefs="co-env"> - <para>The equals - (<literal>=</literal>) character is used to define any - environment settings. In this example, it is used to define - the <envar>SHELL</envar> and <envar>PATH</envar>. - If the <envar>SHELL</envar> is omitted, - &man.cron.8; will use the default of - &man.sh.1;. If the <envar>PATH</envar> - is omitted, no default will be used and file locations will - need to be absolute.</para> + <para>The equals (<literal>=</literal>) character is used to + define any environment settings. In this example, it is + used to define the <envar>SHELL</envar> and + <envar>PATH</envar>. If the <envar>SHELL</envar> is + omitted, &man.cron.8; will use the default of &man.sh.1;. + If the <envar>PATH</envar> is omitted, no default will be + used and file locations will need to be absolute.</para> </callout> <callout arearefs="co-field-descr"> @@ -557,20 +539,18 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <literal>who</literal>, and <literal>command</literal>. These are almost all self explanatory. <literal>minute</literal> is the time in minutes when the - specified command - will be run. <literal>hour</literal> is the hour when - the specified command will be run. + specified command will be run. <literal>hour</literal> is + the hour when the specified command will be run. <literal>mday</literal> stands for day of the month and - <literal>month</literal> - designates the month. The <literal>wday</literal> option - stands for day of the week. These fields must be - numeric values, representing the twenty-four hour clock, - or a <literal>*</literal>, representing all values for that - field. The + <literal>month</literal> designates the month. The + <literal>wday</literal> option stands for day of the week. + These fields must be numeric values, representing the + twenty-four hour clock, or a <literal>*</literal>, + representing all values for that field. The <literal>who</literal> field only exists in the system - crontab. This field specifies - which user the command should be run as. The last field is - the command to be executed.</para> + crontab. This field specifies which user the command + should be run as. The last field is the command to be + executed.</para> </callout> <callout arearefs="co-main"> @@ -580,9 +560,8 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <literal>*</literal> characters mean <quote>first-last</quote>, and can be interpreted as <emphasis>every</emphasis> time. In this example, - &man.atrun.8; is invoked by - <username>root</username> every five minutes, regardless of - the day or month.</para> + &man.atrun.8; is invoked by <username>root</username> + every five minutes, regardless of the day or month.</para> <para>Commands can have any number of flags passed to them; however, commands which extend to multiple lines need to be @@ -591,11 +570,10 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin </callout> </calloutlist> - <para>This is the basic setup for every - &man.crontab.5;. However, field number six, which specifies - the username, only exists in the system - &man.crontab.5;. This field should be omitted for - individual user &man.crontab.5; files.</para> + <para>This is the basic setup for every &man.crontab.5;. + However, field number six, which specifies the username, only + exists in the system &man.crontab.5;. This field should be + omitted for individual user &man.crontab.5; files.</para> <sect2 id="configtuning-installcrontab"> <title>Installing a Crontab</title> @@ -604,17 +582,16 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <para>Do not use the procedure described here to edit and install the system crontab, <filename>/etc/crontab</filename>. Instead, use an - editor and &man.cron.8; will notice that the file - has changed and immediately begin using the updated version. + editor and &man.cron.8; will notice that the file has + changed and immediately begin using the updated version. See <ulink url="&url.books.faq;/admin.html#root-not-found-cron-errors"> this FAQ entry</ulink> for more information.</para> </important> - <para>To install a freshly written user - &man.crontab.5;, use an editor to create - and save a file in the proper format. Then, specify the file - name with &man.crontab.1;:</para> + <para>To install a freshly written user &man.crontab.5;, use + an editor to create and save a file in the proper format. + Then, specify the file name with &man.crontab.1;:</para> <screen>&prompt.user; <userinput>crontab crontab-file</userinput></screen> @@ -627,13 +604,12 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <para>Users who wish to begin their own crontab file from scratch, without the use of a template, can use - <command>crontab -e</command>. This will - invoke the default editor with an empty file. When the file - is saved, it will be automatically installed by - &man.crontab.1;.</para> + <command>crontab -e</command>. This will invoke the default + editor with an empty file. When the file is saved, it will + be automatically installed by &man.crontab.1;.</para> - <para>In order to remove a user &man.crontab.5; - completely, use <command>crontab -r</command>.</para> + <para>In order to remove a user &man.crontab.5; completely, + use <command>crontab -r</command>.</para> </sect2> </sect1> @@ -651,46 +627,41 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <title>Using &man.rc.8; Under &os;</title> - <para>In 2002, &os; integrated the NetBSD &man.rc.8; - system for system initialization. The files - listed in <filename class="directory">/etc/rc.d</filename> - provide basic services which can - be controlled with the <option>start</option>, + <para>In 2002, &os; integrated the NetBSD &man.rc.8; system for + system initialization. The files listed in <filename + class="directory">/etc/rc.d</filename> provide basic services + which can be controlled with the <option>start</option>, <option>stop</option>, and <option>restart</option> options - to &man.service.8;. - For instance, &man.sshd.8; can be restarted with the following - command:</para> + to &man.service.8;. For instance, &man.sshd.8; can be restarted + with the following command:</para> <screen>&prompt.root; <userinput>service sshd restart</userinput></screen> <para>This procedure can be used to start services on a running - system. - Services will be started automatically at boot time as - specified in &man.rc.conf.5;. For example, to enable &man.natd.8; - at system startup, add the - following line to <filename>/etc/rc.conf</filename>:</para> + system. Services will be started automatically at boot time + as specified in &man.rc.conf.5;. For example, to enable + &man.natd.8; at system startup, add the following line to + <filename>/etc/rc.conf</filename>:</para> <programlisting>natd_enable="YES"</programlisting> <para>If a <option>natd_enable="NO"</option> line is already present, change the <literal>NO</literal> to <literal>YES</literal>. The &man.rc.8; scripts will - automatically load - any dependent services during the next boot, as - described below.</para> - - <para>Since the &man.rc.8; system is primarily - intended to start and stop services at system startup and - shutdown time, - the <option>start</option>, <option>stop</option> and + automatically load any dependent services during the next boot, + as described below.</para> + + <para>Since the &man.rc.8; system is primarily intended to start + and stop services at system startup and shutdown time, the + <option>start</option>, <option>stop</option> and <option>restart</option> options will only perform their action if the appropriate <filename>/etc/rc.conf</filename> variable is set. For instance, <command>sshd restart</command> will only work if <varname>sshd_enable</varname> is set to <option>YES</option> in <filename>/etc/rc.conf</filename>. To <option>start</option>, <option>stop</option> or - <option>restart</option> a service regardless of the settings in - <filename>/etc/rc.conf</filename>, these commands should be + <option>restart</option> a service regardless of the settings + in <filename>/etc/rc.conf</filename>, these commands should be prefixed with <quote>one</quote>. For instance, to restart &man.sshd.8; regardless of the current <filename>/etc/rc.conf</filename> setting, execute the following @@ -700,9 +671,8 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <para>To check if a service is enabled in <filename>/etc/rc.conf</filename>, run the appropriate - &man.rc.8; script with - <option>rcvar</option>. This example checks to see if - &man.sshd.8; is enabled in + &man.rc.8; script with <option>rcvar</option>. This example + checks to see if &man.sshd.8; is enabled in <filename>/etc/rc.conf</filename>:</para> <screen>&prompt.root; <userinput>service sshd rcvar</userinput> @@ -711,9 +681,7 @@ $sshd_enable=YES</screen> <note> <para>The <literal># sshd</literal> line is output from the - above command, - not a - <username>root</username> console.</para> + above command, not a <username>root</username> console.</para> </note> <para>To determine whether or not a service is running, use @@ -723,40 +691,38 @@ $sshd_enable=YES</screen> <screen>&prompt.root; <userinput>service sshd status</userinput> sshd is running as pid 433.</screen> - <para>In some cases, it is also possible to <option>reload</option> - a service. This attempts to send a signal to an individual - service, forcing the service to reload its configuration files. - In most cases, this means sending the service a - <literal>SIGHUP</literal> signal. Support for this feature is - not included for every service.</para> - - <para>The &man.rc.8; system is used for - network services and it also contributes to most of the system - initialization. For instance, when the + <para>In some cases, it is also possible to + <option>reload</option> a service. This attempts to send a + signal to an individual service, forcing the service to reload + its configuration files. In most cases, this means sending + the service a <literal>SIGHUP</literal> signal. Support for + this feature is not included for every service.</para> + + <para>The &man.rc.8; system is used for network services and it + also contributes to most of the system initialization. For + instance, when the <filename>/etc/rc.d/bgfsck</filename> script is executed, it - prints - out the following message:</para> + prints out the following message:</para> <screen>Starting background file system checks in 60 seconds.</screen> - <para>This script is used for background file system - checks, which occur only during system initialization.</para> + <para>This script is used for background file system checks, + which occur only during system initialization.</para> <para>Many system services depend on other services to function properly. For example, &man.yp.8; and other - <acronym>RPC</acronym>-based services may - fail to start until after the &man.rpcbind.8; - service has started. To resolve this issue, - information about dependencies and other meta-data is included - in the comments at the top of each startup script. The - &man.rcorder.8; program is used to parse these comments + <acronym>RPC</acronym>-based services may fail to start until + after the &man.rpcbind.8; service has started. To resolve this + issue, information about dependencies and other meta-data is + included in the comments at the top of each startup script. + The &man.rcorder.8; program is used to parse these comments during system initialization to determine the order in which system services should be invoked to satisfy the dependencies.</para> - <para>The following key word must be included in all startup scripts - as it is required by &man.rc.subr.8; to <quote>enable</quote> - the startup script:</para> + <para>The following key word must be included in all startup + scripts as it is required by &man.rc.subr.8; to + <quote>enable</quote> the startup script:</para> <itemizedlist> <listitem> @@ -773,15 +739,15 @@ sshd is running as pid 433.</screen> <listitem> <para><literal>REQUIRE</literal>: Lists services which are required for this service. The script containing this key - word will run - <emphasis>after</emphasis> the specified services.</para> + word will run <emphasis>after</emphasis> the specified + services.</para> </listitem> <listitem> <para><literal>BEFORE</literal>: Lists services which depend on this service. The script containing this key word will - run - <emphasis>before</emphasis> the specified services.</para> + run <emphasis>before</emphasis> the specified + services.</para> </listitem> </itemizedlist> @@ -791,9 +757,9 @@ sshd is running as pid 433.</screen> <quote>runlevels</quote> used by some &unix; operating systems.</para> - <para>Additional information - can be found in &man.rc.8; and &man.rc.subr.8;. Refer to - <ulink url="&url.articles.rc-scripting">this article</ulink> for + <para>Additional information can be found in &man.rc.8; and + &man.rc.subr.8;. Refer to <ulink + url="&url.articles.rc-scripting">this article</ulink> for instructions on how to create custom &man.rc.8; scripts.</para> </sect1> @@ -818,8 +784,8 @@ sshd is running as pid 433.</screen> </indexterm> <para>Adding and configuring a network interface card - (<acronym>NIC</acronym>) is a common task for - any &os; administrator.</para> + (<acronym>NIC</acronym>) is a common task for any &os; + administrator.</para> <sect2> <title>Locating the Correct Driver</title> @@ -832,14 +798,12 @@ sshd is running as pid 433.</screen> <para>First, determine the model of the <acronym>NIC</acronym> and the chip it uses. &os; supports a wide variety of <acronym>NIC</acronym>s. Check the Hardware Compatibility - List for - the &os; release to see if the <acronym>NIC</acronym> is - supported.</para> + List for the &os; release to see if the <acronym>NIC</acronym> + is supported.</para> <para>If the <acronym>NIC</acronym> is supported, determine - the name of the &os; - driver for the <acronym>NIC</acronym>. Refer to - <filename>/usr/src/sys/conf/NOTES</filename> and + the name of the &os; driver for the <acronym>NIC</acronym>. + Refer to <filename>/usr/src/sys/conf/NOTES</filename> and <filename>/usr/src/sys/<replaceable>arch</replaceable>/conf/NOTES</filename> for the list of <acronym>NIC</acronym> drivers with some information about the supported chipsets. When in doubt, read @@ -848,12 +812,10 @@ sshd is running as pid 433.</screen> limitations of the driver.</para> <para>The drivers for common <acronym>NIC</acronym>s are - already present - in the <filename>GENERIC</filename> kernel, meaning the - <acronym>NIC</acronym> - should show up during boot. In this example, two - <acronym>NIC</acronym>s using - the &man.dc.4; driver are present on the system:</para> + already present in the <filename>GENERIC</filename> kernel, + meaning the <acronym>NIC</acronym> should show up during boot. + In this example, two <acronym>NIC</acronym>s using the + &man.dc.4; driver are present on the system:</para> <screen>dc0: <82c169 PNIC 10/100BaseTX> port 0xa000-0xa0ff mem 0xd3800000-0xd38 000ff irq 15 at device 11.0 on pci0 @@ -871,36 +833,33 @@ dc1: Ethernet address: 00:a0:cc:da:da:db dc1: [ITHREAD]</screen> <para>If the driver for the <acronym>NIC</acronym> is not - present in - <filename>GENERIC</filename>, but a driver is available, the - driver will need to be loaded before the - <acronym>NIC</acronym> can be - configured and used. This may be accomplished in one of two - ways:</para> + present in <filename>GENERIC</filename>, but a driver is + available, the driver will need to be loaded before the + <acronym>NIC</acronym> can be configured and used. This may + be accomplished in one of two ways:</para> <itemizedlist> <listitem> <para>The easiest way is to load a kernel module for the <acronym>NIC</acronym> using &man.kldload.8;. To also - automatically - load the driver at boot time, add the appropriate line to + automatically load the driver at boot time, add the + appropriate line to <filename>/boot/loader.conf</filename>. Not all - <acronym>NIC</acronym> - drivers are available as modules.</para> + <acronym>NIC</acronym> drivers are available as + modules.</para> </listitem> <listitem> <para>Alternatively, statically compile support for the - <acronym>NIC</acronym> - into a custom kernel. Refer to + <acronym>NIC</acronym> into a custom kernel. Refer to <filename>/usr/src/sys/conf/NOTES</filename>, <filename>/usr/src/sys/<replaceable>arch</replaceable>/conf/NOTES</filename> and the manual page of the driver to determine which line to add to the custom kernel configuration file. For more - information about recompiling the kernel, refer to - <xref linkend="kernelconfig"/>. If the - <acronym>NIC</acronym> was detected - at boot, the kernel does not need to be recompiled.</para> + information about recompiling the kernel, refer to <xref + linkend="kernelconfig"/>. If the + <acronym>NIC</acronym> was detected at boot, the kernel + does not need to be recompiled.</para> </listitem> </itemizedlist> @@ -914,7 +873,8 @@ dc1: [ITHREAD]</screen> <secondary>device drivers</secondary> </indexterm> <indexterm> - <primary><acronym>KLD</acronym> (kernel loadable object)</primary> + <primary><acronym>KLD</acronym> (kernel loadable + object)</primary> </indexterm> <!-- We should probably omit the expanded name, and add a <see> entry for it. Whatever is done must also be done to the same indexterm in @@ -925,23 +885,19 @@ linuxemu/chapter.xml --> community because they regard such information as trade secrets. Consequently, the developers of &os; and other operating systems are left with two choices: develop the - drivers - by a long and pain-staking process of reverse engineering or - using the existing driver binaries available for - µsoft.windows; platforms.</para> - - <para>&os; provides - <quote>native</quote> support for the Network Driver - Interface Specification (<acronym>NDIS</acronym>). It - includes - &man.ndisgen.8; which can be used to - convert a &windowsxp; driver - into a format that can be used on &os;. - Because the &man.ndis.4; driver uses a - &windowsxp; binary, it only runs on &i386; and amd64 systems. - <acronym>PCI</acronym>, CardBus, <acronym>PCMCIA</acronym>, - and <acronym>USB</acronym> devices are - supported.</para> + drivers by a long and pain-staking process of reverse + engineering or using the existing driver binaries available + for µsoft.windows; platforms.</para> + + <para>&os; provides <quote>native</quote> support for the + Network Driver Interface Specification + (<acronym>NDIS</acronym>). It includes &man.ndisgen.8; + which can be used to convert a &windowsxp; driver into a + format that can be used on &os;. Because the &man.ndis.4; + driver uses a &windowsxp; binary, it only runs on &i386; + and amd64 systems. <acronym>PCI</acronym>, CardBus, + <acronym>PCMCIA</acronym>, and <acronym>USB</acronym> + devices are supported.</para> <para>To use &man.ndisgen.8;, three things are needed:</para> @@ -963,11 +919,9 @@ linuxemu/chapter.xml --> <para>Download the <filename>.SYS</filename> and <filename>.INF</filename> files for the specific - <acronym>NIC</acronym>. - Generally, - these can be found on the driver CD or at the vendor's - website. The following examples use - <filename>W32DRIVER.SYS</filename> and + <acronym>NIC</acronym>. Generally, these can be found on + the driver CD or at the vendor's website. The following + examples use <filename>W32DRIVER.SYS</filename> and <filename>W32DRIVER.INF</filename>.</para> <para>The driver bit width must match the version of &os;. @@ -982,9 +936,8 @@ linuxemu/chapter.xml --> <para>This command is interactive and prompts for any extra information it requires. A new kernel module will be - generated in - the current directory. Use &man.kldload.8; to load the new - module:</para> + generated in the current directory. Use &man.kldload.8; + to load the new module:</para> <screen>&prompt.root; <userinput>kldload <replaceable>./W32DRIVER_SYS.ko</replaceable></userinput></screen> @@ -998,13 +951,12 @@ linuxemu/chapter.xml --> <screen>&prompt.root; <userinput>kldload ndis</userinput> &prompt.root; <userinput>kldload if_ndis</userinput></screen> - <para>The first command loads the &man.ndis.4; - miniport driver - wrapper and the second loads the generated <acronym>NIC</acronym> - driver.</para> + <para>The first command loads the &man.ndis.4; miniport driver + wrapper and the second loads the generated + <acronym>NIC</acronym> driver.</para> - <para>Check &man.dmesg.8; to see if there were any load errors. - If all went well, the output should be similar to + <para>Check &man.dmesg.8; to see if there were any load + errors. If all went well, the output should be similar to the following:</para> <screen>ndis0: <Wireless-G PCI Adapter> mem 0xf4100000-0xf4101fff irq 3 at device 8.0 on pci1 @@ -1013,15 +965,14 @@ ndis0: Ethernet address: 0a:b1:2c:d3:4e: ndis0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen> - <para>From here, - <devicename>ndis0</devicename> can be configured like any other - <acronym>NIC</acronym>.</para> + <para>From here, <devicename>ndis0</devicename> can be + configured like any other <acronym>NIC</acronym>.</para> - <para>To configure the system to load the &man.ndis.4; modules at - boot time, copy the generated module, + <para>To configure the system to load the &man.ndis.4; modules + at boot time, copy the generated module, <filename>W32DRIVER_SYS.ko</filename>, to <filename - class="directory">/boot/modules</filename>. Then, - add the following line to + class="directory">/boot/modules</filename>. Then, add the + following line to <filename>/boot/loader.conf</filename>:</para> <programlisting>W32DRIVER_SYS_load="YES"</programlisting> @@ -1037,8 +988,7 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18M </indexterm> <para>Once the right driver is loaded for the - <acronym>NIC</acronym>, the - card needs to be configured. It + <acronym>NIC</acronym>, the card needs to be configured. It may have been configured at installation time by &man.sysinstall.8;.</para> @@ -1088,13 +1038,12 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,M <para>&os; uses the driver name followed by the order in which the card is detected at boot to name the <acronym>NIC</acronym>. For example, - <devicename>sis2</devicename> is - the third <acronym>NIC</acronym> on the system using the - &man.sis.4; + <devicename>sis2</devicename> is the third + <acronym>NIC</acronym> on the system using the &man.sis.4; driver.</para> - <para>In this example, <devicename>dc0</devicename> - is up and running. The key indicators are:</para> + <para>In this example, <devicename>dc0</devicename> is up and + running. The key indicators are:</para> <orderedlist> <listitem> @@ -1104,26 +1053,26 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,M <listitem> <para>The card has an Internet (<literal>inet</literal>) - address, - <hostid role="ipaddr">192.168.1.3</hostid>.</para> + address, <hostid + role="ipaddr">192.168.1.3</hostid>.</para> </listitem> <listitem> <para>It has a valid subnet mask - (<literal>netmask</literal>), where - <hostid role="netmask">0xffffff00</hostid> is the same as + (<literal>netmask</literal>), where <hostid + role="netmask">0xffffff00</hostid> is the same as <hostid role="netmask">255.255.255.0</hostid>.</para> </listitem> <listitem> - <para>It has a valid broadcast address, - <hostid role="ipaddr">192.168.1.255</hostid>.</para> + <para>It has a valid broadcast address, <hostid + role="ipaddr">192.168.1.255</hostid>.</para> </listitem> <listitem> <para>The <acronym>MAC</acronym> address of the card - (<literal>ether</literal>) - is <hostid role="mac">00:a0:cc:da:da:da</hostid>.</para> + (<literal>ether</literal>) is <hostid + role="mac">00:a0:cc:da:da:da</hostid>.</para> </listitem> <listitem> @@ -1157,14 +1106,12 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,M <para>it would indicate the card has not been configured.</para> - <para>The card must be configured as - <username>root</username>. The <acronym>NIC</acronym> - configuration can be performed from the command line with - &man.ifconfig.8; but will not persist after a reboot unless - the configuration is also added to - <filename>/etc/rc.conf</filename>. Add a - line for each <acronym>NIC</acronym> present on the system, - as seen in + <para>The card must be configured as <username>root</username>. + The <acronym>NIC</acronym> configuration can be performed + from the command line with &man.ifconfig.8; but will not + persist after a reboot unless the configuration is also added + to <filename>/etc/rc.conf</filename>. Add a line for each + <acronym>NIC</acronym> present on the system, as seen in this example:</para> <programlisting>ifconfig_dc0="inet 192.168.1.3 netmask 255.255.255.0" @@ -1172,31 +1119,27 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255. <para>Replace <devicename>dc0</devicename> and <devicename>dc1</devicename> and the <acronym>IP</acronym> - address information - with the correct values for the system. *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305121854.r4CIsT9K030455>