DocBook police: open and close tags for <programlisting> should cuddle
up to the contents within. Approved by: nik
This commit is contained in:
parent
cb3edc9691
commit
caa6994914
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9149
78 changed files with 1286 additions and 2506 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.404 2001/04/07 01:58:20 will Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.405 2001/04/08 10:47:59 dinoex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="contrib">
|
<chapter id="contrib">
|
||||||
|
|
@ -592,8 +592,7 @@
|
||||||
wish to protect, replacing the text between the <literal>%%</literal>
|
wish to protect, replacing the text between the <literal>%%</literal>
|
||||||
with the appropriate information.</para>
|
with the appropriate information.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Copyright (c) %%proper_years_here%%
|
||||||
Copyright (c) %%proper_years_here%%
|
|
||||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/fonts/article.sgml,v 1.9 2000/07/26 18:24:28 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/fonts/article.sgml,v 1.10 2001/03/11 07:48:57 hrs Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||||
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
||||||
|
|
@ -230,8 +230,7 @@
|
||||||
your locale):</para>
|
your locale):</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).
|
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).</programlisting>
|
||||||
</programlisting>
|
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>The command to actually switch the mode is
|
<para>The command to actually switch the mode is
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/new-users/article.sgml,v 1.15 2000/10/30 00:58:45 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/new-users/article.sgml,v 1.16 2000/11/21 13:46:23 ben Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
|
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||||
|
|
@ -899,8 +899,7 @@
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls
|
setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
||||||
</programlisting>
|
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>This assumes that the file <filename>XKeysymDB</filename> and the
|
<para>This assumes that the file <filename>XKeysymDB</filename> and the
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/programming-tools/article.sgml,v 1.12 2000/07/26 18:24:50 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/programming-tools/article.sgml,v 1.13 2000/08/22 20:03:31 marko Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
|
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||||
|
|
@ -1069,8 +1069,7 @@ free(foo);
|
||||||
<para>Here's a very simple make file:</para>
|
<para>Here's a very simple make file:</para>
|
||||||
|
|
||||||
<programlisting>foo: foo.c
|
<programlisting>foo: foo.c
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>It consists of two lines, a dependency line and a creation
|
<para>It consists of two lines, a dependency line and a creation
|
||||||
line.</para>
|
line.</para>
|
||||||
|
|
@ -1114,8 +1113,7 @@ free(foo);
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp foo /home/me
|
cp foo /home/me</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>We can tell make which target we want to make by
|
<para>We can tell make which target we want to make by
|
||||||
typing:</para>
|
typing:</para>
|
||||||
|
|
@ -1168,8 +1166,7 @@ install:
|
||||||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, if we go to the directory for this port and type
|
<para>Now, if we go to the directory for this port and type
|
||||||
<userinput>make</userinput>, the following happens:</para>
|
<userinput>make</userinput>, the following happens:</para>
|
||||||
|
|
@ -1283,8 +1280,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
<filename>/usr/local/info</filename> directory to add an entry
|
<filename>/usr/local/info</filename> directory to add an entry
|
||||||
for it. This involves adding a line like</para>
|
for it. This involves adding a line like</para>
|
||||||
|
|
||||||
<programlisting> * Make: (make). The GNU Make utility.
|
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>to the file. Once you have done this, you can type
|
<para>to the file. Once you have done this, you can type
|
||||||
<userinput>info</userinput> and then select
|
<userinput>info</userinput> and then select
|
||||||
|
|
@ -1390,8 +1386,7 @@ main() {
|
||||||
int bazz(int anint) {
|
int bazz(int anint) {
|
||||||
printf("You gave me %d\n", anint);
|
printf("You gave me %d\n", anint);
|
||||||
return anint;
|
return anint;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This program sets <symbol>i</symbol> to be
|
<para>This program sets <symbol>i</symbol> to be
|
||||||
<literal>5</literal> and passes it to a function
|
<literal>5</literal> and passes it to a function
|
||||||
|
|
@ -1447,8 +1442,7 @@ main() {
|
||||||
|
|
||||||
i = 5;
|
i = 5;
|
||||||
printf("This is my program\n");
|
printf("This is my program\n");
|
||||||
<lineannotation>&hellip</>
|
<lineannotation>&hellip</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||||
|
|
@ -2170,8 +2164,7 @@ in font-lock-auto-mode-list"
|
||||||
("\\.lsp$" . lisp-mode)
|
("\\.lsp$" . lisp-mode)
|
||||||
("\\.wiz$" . whizbang-mode)
|
("\\.wiz$" . whizbang-mode)
|
||||||
("\\.scm$" . scheme-mode)
|
("\\.scm$" . scheme-mode)
|
||||||
<lineannotation>…</>
|
<lineannotation>…</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will automatically go into
|
<para>This means that Emacs will automatically go into
|
||||||
<function>whizbang-mode</function> when you edit a file ending
|
<function>whizbang-mode</function> when you edit a file ending
|
||||||
|
|
@ -2184,8 +2177,7 @@ in font-lock-auto-mode-list"
|
||||||
<programlisting>;; Auto font lock mode
|
<programlisting>;; Auto font lock mode
|
||||||
(defvar font-lock-auto-mode-list
|
(defvar font-lock-auto-mode-list
|
||||||
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
||||||
"List of modes to always start in font-lock-mode")
|
"List of modes to always start in font-lock-mode")</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will always enable
|
<para>This means that Emacs will always enable
|
||||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.2 2000/12/04 11:34:57 alex Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.3 2000/12/04 11:39:41 alex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="driverbasics">
|
<chapter id="driverbasics">
|
||||||
|
|
@ -60,8 +60,7 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>Skeleton Layout of a kernel module</para>
|
<para>Skeleton Layout of a kernel module</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* KLD Skeleton
|
* KLD Skeleton
|
||||||
* Inspired by Andrew Reiter's Daemonnews article
|
* Inspired by Andrew Reiter's Daemonnews article
|
||||||
*/
|
*/
|
||||||
|
|
@ -98,20 +97,17 @@ skel_loader(struct module *m, int what, void *arg)
|
||||||
|
|
||||||
/* Declare this module to the rest of the kernel */
|
/* Declare this module to the rest of the kernel */
|
||||||
|
|
||||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Makefile</title>
|
<title>Makefile</title>
|
||||||
<para>FreeBSD provides a makefile include that you can use
|
<para>FreeBSD provides a makefile include that you can use
|
||||||
to quickly compile your kernel addition.</para>
|
to quickly compile your kernel addition.</para>
|
||||||
<programlisting>
|
<programlisting>SRCS=skeleton.c
|
||||||
SRCS=skeleton.c
|
|
||||||
KMOD=skeleton
|
KMOD=skeleton
|
||||||
|
|
||||||
.include <bsd.kmod.mk>
|
.include <bsd.kmod.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<para>Simply running <command>make</command> with
|
<para>Simply running <command>make</command> with
|
||||||
|
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
||||||
<para>This simple example pseudo-device remembers whatever values you write
|
<para>This simple example pseudo-device remembers whatever values you write
|
||||||
to it and can then supply them back to you when you read from
|
to it and can then supply them back to you when you read from
|
||||||
it.</para>
|
it.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple `echo' pseudo-device KLD
|
* Simple `echo' pseudo-device KLD
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
||||||
return(err);
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEV_MODULE(echo,echo_loader,NULL);
|
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>To install this driver you will first need to make a node on
|
<para>To install this driver you will first need to make a node on
|
||||||
your filesystem with a command such as : </para>
|
your filesystem with a command such as : </para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/pci/chapter.sgml,v 1.1 2000/11/28 19:07:46 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="pci">
|
<chapter id="pci">
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
<para>Information here about how the PCI bus code iterates
|
<para>Information here about how the PCI bus code iterates
|
||||||
through the unattached devices and see if a newly loaded kld
|
through the unattached devices and see if a newly loaded kld
|
||||||
will attach to any of them.</para>
|
will attach to any of them.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple KLD to play with the PCI functions.
|
* Simple KLD to play with the PCI functions.
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
||||||
|
|
||||||
static devclass_t mypci_devclass;
|
static devclass_t mypci_devclass;
|
||||||
|
|
||||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Additional Resources
|
<para>Additional Resources
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/scsi/chapter.sgml,v 1.1 2001/03/29 06:14:42 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="scsi">
|
<chapter id="scsi">
|
||||||
|
|
@ -89,14 +89,12 @@
|
||||||
<para>A typical SIM driver needs to include the following
|
<para>A typical SIM driver needs to include the following
|
||||||
CAM-related header files:</para>
|
CAM-related header files:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#include <cam/cam.h>
|
||||||
#include <cam/cam.h>
|
|
||||||
#include <cam/cam_ccb.h>
|
#include <cam/cam_ccb.h>
|
||||||
#include <cam/cam_sim.h>
|
#include <cam/cam_sim.h>
|
||||||
#include <cam/cam_xpt_sim.h>
|
#include <cam/cam_xpt_sim.h>
|
||||||
#include <cam/cam_debug.h>
|
#include <cam/cam_debug.h>
|
||||||
#include <cam/scsi/scsi_all.h>
|
#include <cam/scsi/scsi_all.h></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The first thing each SIM driver must do is register itself
|
<para>The first thing each SIM driver must do is register itself
|
||||||
with the CAM subsystem. This is done during the driver's
|
with the CAM subsystem. This is done during the driver's
|
||||||
|
|
@ -109,35 +107,29 @@
|
||||||
<para>This is achieved in multiple steps: first it's necessary to
|
<para>This is achieved in multiple steps: first it's necessary to
|
||||||
allocate the queue of requests associated with this SIM:</para>
|
allocate the queue of requests associated with this SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_devq *devq;
|
||||||
struct cam_devq *devq;
|
|
||||||
|
|
||||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Here SIZE is the size of the queue to be allocated, maximal
|
<para>Here SIZE is the size of the queue to be allocated, maximal
|
||||||
number of requests it could contain. It's the number of requests
|
number of requests it could contain. It's the number of requests
|
||||||
that the SIM driver can handle in parallel on one SCSI
|
that the SIM driver can handle in parallel on one SCSI
|
||||||
card. Commonly it can be calculated as:</para>
|
card. Commonly it can be calculated as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Next we create a descriptor of our SIM:</para>
|
<para>Next we create a descriptor of our SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_sim *sim;
|
||||||
struct cam_sim *sim;
|
|
||||||
|
|
||||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||||
softc, unit, max_dev_transactions,
|
softc, unit, max_dev_transactions,
|
||||||
max_tagged_dev_transactions, devq) )==NULL) {
|
max_tagged_dev_transactions, devq) )==NULL) {
|
||||||
cam_simq_free(devq);
|
cam_simq_free(devq);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Note that if we are not able to create a SIM descriptor we
|
<para>Note that if we are not able to create a SIM descriptor we
|
||||||
free the <structname>devq</structname> also because we can do
|
free the <structname>devq</structname> also because we can do
|
||||||
|
|
@ -218,12 +210,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>Finally we register the SCSI buses associated with our SCSI
|
<para>Finally we register the SCSI buses associated with our SCSI
|
||||||
adapter:</para>
|
adapter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
|
||||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If there is one <structName>devq</structName> structure per
|
<para>If there is one <structName>devq</structName> structure per
|
||||||
SCSI bus (i.e. we consider a card with multiple buses as
|
SCSI bus (i.e. we consider a card with multiple buses as
|
||||||
|
|
@ -260,8 +250,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
can create the path for the future bus reset events in advance
|
can create the path for the future bus reset events in advance
|
||||||
and avoid problems with the future memory shortage:</para>
|
and avoid problems with the future memory shortage:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_path *path;
|
||||||
struct cam_path *path;
|
|
||||||
|
|
||||||
if(xpt_create_path(&path, /*periph*/NULL,
|
if(xpt_create_path(&path, /*periph*/NULL,
|
||||||
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
||||||
|
|
@ -272,8 +261,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
softc->wpath = path;
|
softc->wpath = path;
|
||||||
softc->sim = sim;
|
softc->sim = sim;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As you can see the path includes:</para>
|
<para>As you can see the path includes:</para>
|
||||||
|
|
||||||
|
|
@ -310,16 +298,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request is passed to CAM by requesting CAM action on a CAM
|
request is passed to CAM by requesting CAM action on a CAM
|
||||||
control block for this type of request:</para>
|
control block for this type of request:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_setasync csa;
|
||||||
struct ccb_setasync csa;
|
|
||||||
|
|
||||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||||
csa.event_enable = AC_LOST_DEVICE;
|
csa.event_enable = AC_LOST_DEVICE;
|
||||||
csa.callback = xxx_async;
|
csa.callback = xxx_async;
|
||||||
csa.callback_arg = sim;
|
csa.callback_arg = sim;
|
||||||
xpt_action((union ccb *)&csa);
|
xpt_action((union ccb *)&csa);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we take a look at the <function>xxx_action()</function>
|
<para>Now we take a look at the <function>xxx_action()</function>
|
||||||
and <function>xxx_poll()</function> driver entry points.</para>
|
and <function>xxx_poll()</function> driver entry points.</para>
|
||||||
|
|
@ -377,8 +363,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<function>xxx_action()</function> consists of a big
|
<function>xxx_action()</function> consists of a big
|
||||||
switch:</para>
|
switch:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
|
||||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||||
int unit = cam_sim_unit(sim);
|
int unit = cam_sim_unit(sim);
|
||||||
int bus = cam_sim_bus(sim);
|
int bus = cam_sim_bus(sim);
|
||||||
|
|
@ -390,8 +375,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_REQ_INVALID;
|
ccb_h->status = CAM_REQ_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As can be seen from the default case (if an unknown command
|
<para>As can be seen from the default case (if an unknown command
|
||||||
was received) the return code of the command is set into
|
was received) the return code of the command is set into
|
||||||
|
|
@ -505,10 +489,8 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
is to define some meaningful names for them and use these
|
is to define some meaningful names for them and use these
|
||||||
meaningful names in the driver, like:</para>
|
meaningful names in the driver, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The most common initiator mode requests are:</para>
|
<para>The most common initiator mode requests are:</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
@ -581,20 +563,17 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
make sure that the command did not get aborted when it was
|
make sure that the command did not get aborted when it was
|
||||||
sitting in the queue:</para>
|
sitting in the queue:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||||
struct ccb_scsiio *csio = &ccb->csio;
|
|
||||||
|
|
||||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Also we check that the device is supported at all by our
|
<para>Also we check that the device is supported at all by our
|
||||||
controller:</para>
|
controller:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
|
||||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||||
ccb_h->status = CAM_TID_INVALID;
|
ccb_h->status = CAM_TID_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
|
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_LUN_INVALID;
|
ccb_h->status = CAM_LUN_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then allocate whatever data structures (such as
|
<para>Then allocate whatever data structures (such as
|
||||||
card-dependent hardware control block) we need to process this
|
card-dependent hardware control block) we need to process this
|
||||||
|
|
@ -617,8 +595,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
well, link the CCB with the hardware control block (HCB) and
|
well, link the CCB with the hardware control block (HCB) and
|
||||||
mark it as queued.</para>
|
mark it as queued.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
|
||||||
|
|
||||||
if(hcb == NULL) {
|
if(hcb == NULL) {
|
||||||
softc->flags |= RESOURCE_SHORTAGE;
|
softc->flags |= RESOURCE_SHORTAGE;
|
||||||
|
|
@ -629,8 +606,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
||||||
ccb_h->status |= CAM_SIM_QUEUED;
|
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Extract the target data from CCB into the hardware control
|
<para>Extract the target data from CCB into the hardware control
|
||||||
block. Check if we are asked to assign a tag and if yes then
|
block. Check if we are asked to assign a tag and if yes then
|
||||||
|
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
devices to set the maximal mutually supported bus width,
|
devices to set the maximal mutually supported bus width,
|
||||||
synchronous rate and offset.</para>
|
synchronous rate and offset.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
|
||||||
generate_identify_message(hcb);
|
generate_identify_message(hcb);
|
||||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||||
if( !target_negotiated(hcb) )
|
if( !target_negotiated(hcb) )
|
||||||
generate_negotiation_messages(hcb);
|
generate_negotiation_messages(hcb);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then set up the SCSI command. The command storage may be
|
<para>Then set up the SCSI command. The command storage may be
|
||||||
specified in the CCB in many interesting ways, specified by
|
specified in the CCB in many interesting ways, specified by
|
||||||
|
|
@ -671,8 +645,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
back to a virtual address but with big pain, so we don't do
|
back to a virtual address but with big pain, so we don't do
|
||||||
that.</para>
|
that.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
|
||||||
/* CDB is a pointer */
|
/* CDB is a pointer */
|
||||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||||
/* CDB pointer is virtual */
|
/* CDB pointer is virtual */
|
||||||
|
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
/* CDB is in the ccb (buffer) */
|
/* CDB is in the ccb (buffer) */
|
||||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||||
}
|
}
|
||||||
hcb->cmdlen = csio->cdb_len;
|
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now it's time to set up the data. Again, the data storage
|
<para>Now it's time to set up the data. Again, the data storage
|
||||||
may be specified in the CCB in many interesting ways,
|
may be specified in the CCB in many interesting ways,
|
||||||
|
|
@ -698,12 +670,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
data transfer. The simplest case is if there is no data to
|
data transfer. The simplest case is if there is no data to
|
||||||
transfer:</para>
|
transfer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
|
||||||
|
|
||||||
if (dir == CAM_DIR_NONE)
|
if (dir == CAM_DIR_NONE)
|
||||||
goto end_data;
|
goto end_data;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the data is in one chunk or in a
|
<para>Then we check if the data is in one chunk or in a
|
||||||
scatter-gather list, and the addresses are physical or
|
scatter-gather list, and the addresses are physical or
|
||||||
|
|
@ -722,8 +692,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
the case for a single non-scattered virtual buffer must be
|
the case for a single non-scattered virtual buffer must be
|
||||||
implemented, it's actively used by CAM.</para>
|
implemented, it's actively used by CAM.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int rv;
|
||||||
int rv;
|
|
||||||
|
|
||||||
initialize_hcb_for_data(hcb);
|
initialize_hcb_for_data(hcb);
|
||||||
|
|
||||||
|
|
@ -770,16 +739,13 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
free_hcb_and_ccb_done(hcb, ccb, rv);
|
free_hcb_and_ccb_done(hcb, ccb, rv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
end_data:
|
end_data:</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If disconnection is disabled for this CCB we pass this
|
<para>If disconnection is disabled for this CCB we pass this
|
||||||
information to the hcb:</para>
|
information to the hcb:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
hcb_disable_disconnect(hcb);</programlisting>
|
||||||
hcb_disable_disconnect(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the controller is able to run REQUEST SENSE command all
|
<para>If the controller is able to run REQUEST SENSE command all
|
||||||
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
||||||
|
|
@ -790,18 +756,15 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
to the hardware and return, the rest will be done by the
|
to the hardware and return, the rest will be done by the
|
||||||
interrupt handler (or timeout handler).</para>
|
interrupt handler (or timeout handler).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
|
||||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||||
put_hcb_into_hardware_queue(hcb);
|
put_hcb_into_hardware_queue(hcb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>And here is a possible implementation of the function
|
<para>And here is a possible implementation of the function
|
||||||
returning CCB:</para>
|
returning CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||||
{
|
{
|
||||||
struct xxx_softc *softc = hcb->softc;
|
struct xxx_softc *softc = hcb->softc;
|
||||||
|
|
@ -819,8 +782,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb->ccb_h.status = status |
|
ccb->ccb_h.status = status |
|
||||||
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
||||||
|
|
@ -859,8 +821,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and those being disconnected, as done with the status
|
and those being disconnected, as done with the status
|
||||||
CAM_SCSI_BUS_RESET. Like:</para>
|
CAM_SCSI_BUS_RESET. Like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int targ, lun;
|
||||||
int targ, lun;
|
|
||||||
struct xxx_hcb *h, *hh;
|
struct xxx_hcb *h, *hh;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Implementing the SCSI bus reset as a function may be a good
|
<para>Implementing the SCSI bus reset as a function may be a good
|
||||||
idea because it would be re-used by the timeout function as a
|
idea because it would be re-used by the timeout function as a
|
||||||
|
|
@ -931,23 +891,20 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>The hard way is to implement this request honestly. First
|
<para>The hard way is to implement this request honestly. First
|
||||||
check that abort applies to a SCSI transaction:</para>
|
check that abort applies to a SCSI transaction:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb *abort_ccb;
|
||||||
struct ccb *abort_ccb;
|
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then it's necessary to find this CCB in our queue. This can
|
<para>Then it's necessary to find this CCB in our queue. This can
|
||||||
be done by walking the list of all our hardware control blocks
|
be done by walking the list of all our hardware control blocks
|
||||||
in search for one associated with this CCB:</para>
|
in search for one associated with this CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h;
|
||||||
struct xxx_hcb *hcb, *h;
|
|
||||||
|
|
||||||
hcb = NULL;
|
hcb = NULL;
|
||||||
|
|
||||||
|
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb=found_hcb;
|
hcb=found_hcb;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we look at the current processing status of the HCB. It
|
<para>Now we look at the current processing status of the HCB. It
|
||||||
may be either sitting in the queue waiting to be sent to the
|
may be either sitting in the queue waiting to be sent to the
|
||||||
|
|
@ -982,8 +938,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
SCSI bus the SCSI controller will see this flag and skip
|
SCSI bus the SCSI controller will see this flag and skip
|
||||||
it.</para>
|
it.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int hstatus;
|
||||||
int hstatus;
|
|
||||||
|
|
||||||
/* shown as a function, in case special action is needed to make
|
/* shown as a function, in case special action is needed to make
|
||||||
* this flag visible to hardware
|
* this flag visible to hardware
|
||||||
|
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
case HCB_COMPLETED:
|
case HCB_COMPLETED:
|
||||||
/* this is an easy case */
|
/* this is an easy case */
|
||||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is being transferred right now we would like to
|
<para>If the CCB is being transferred right now we would like to
|
||||||
signal to the SCSI controller in some hardware-dependent way
|
signal to the SCSI controller in some hardware-dependent way
|
||||||
|
|
@ -1016,8 +970,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and mark the aborted CCB as aborted (but not mark it as done
|
and mark the aborted CCB as aborted (but not mark it as done
|
||||||
yet).</para>
|
yet).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||||
case HCB_BEING_TRANSFERRED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1031,16 +984,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
goto abort_again;
|
goto abort_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is in the list of disconnected then set it up as
|
<para>If the CCB is in the list of disconnected then set it up as
|
||||||
an abort request and re-queue it at the front of hardware
|
an abort request and re-queue it at the front of hardware
|
||||||
queue. Reset the timeout and report the abort request to be
|
queue. Reset the timeout and report the abort request to be
|
||||||
completed.</para>
|
completed.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_DISCONNECTED:
|
||||||
case HCB_DISCONNECTED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1050,8 +1001,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>That's all for the ABORT request, although there is one more
|
<para>That's all for the ABORT request, although there is one more
|
||||||
issue. Because the ABORT message cleans all the ongoing
|
issue. Because the ABORT message cleans all the ongoing
|
||||||
|
|
@ -1066,8 +1016,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request. Then the case XPT_ABORT would be small, like
|
request. Then the case XPT_ABORT would be small, like
|
||||||
that:</para>
|
that:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case XPT_ABORT:
|
||||||
case XPT_ABORT:
|
|
||||||
struct ccb *abort_ccb;
|
struct ccb *abort_ccb;
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
|
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
else
|
else
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||||
|
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
||||||
|
|
||||||
<para>The code looks like:</para>
|
<para>The code looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_trans_settings *cts;
|
||||||
struct ccb_trans_settings *cts;
|
|
||||||
int targ, lun;
|
int targ, lun;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then when the next I/O request will be processed it will
|
<para>Then when the next I/O request will be processed it will
|
||||||
check if it has to re-negotiate, for example by calling the
|
check if it has to re-negotiate, for example by calling the
|
||||||
function target_negotiated(hcb). It can be implemented like
|
function target_negotiated(hcb). It can be implemented like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int
|
||||||
int
|
|
||||||
target_negotiated(struct xxx_hcb *hcb)
|
target_negotiated(struct xxx_hcb *hcb)
|
||||||
{
|
{
|
||||||
struct softc *softc = hcb->softc;
|
struct softc *softc = hcb->softc;
|
||||||
|
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
||||||
return 0; /* FALSE */
|
return 0; /* FALSE */
|
||||||
else
|
else
|
||||||
return 1; /* TRUE */
|
return 1; /* TRUE */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After the values are re-negotiated the resulting values must
|
<para>After the values are re-negotiated the resulting values must
|
||||||
be assigned to both current and goal parameters, so for future
|
be assigned to both current and goal parameters, so for future
|
||||||
|
|
@ -1300,8 +1244,7 @@ of the union ccb:</para>
|
||||||
typical calculation example taken from the aic7xxx driver
|
typical calculation example taken from the aic7xxx driver
|
||||||
is:</para>
|
is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_calc_geometry *ccg;
|
||||||
struct ccb_calc_geometry *ccg;
|
|
||||||
u_int32_t size_mb;
|
u_int32_t size_mb;
|
||||||
u_int32_t secs_per_cylinder;
|
u_int32_t secs_per_cylinder;
|
||||||
int extended;
|
int extended;
|
||||||
|
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
||||||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This gives the general idea, the exact calculation depends
|
<para>This gives the general idea, the exact calculation depends
|
||||||
on the quirks of the particular BIOS. If BIOS provides no way
|
on the quirks of the particular BIOS. If BIOS provides no way
|
||||||
|
|
@ -1331,10 +1273,8 @@ of the union ccb:</para>
|
||||||
normally be assumed equal to 1. Other popular geometries
|
normally be assumed equal to 1. Other popular geometries
|
||||||
are:</para>
|
are:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||||
128 heads, 63 sectors - Symbios controllers
|
16 heads, 63 sectors - old controllers</programlisting>
|
||||||
16 heads, 63 sectors - old controllers
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||||
with variable success, for example a combination of Symbios
|
with variable success, for example a combination of Symbios
|
||||||
|
|
@ -1447,9 +1387,7 @@ ccb_pathinq cpi" of the union ccb:</para>
|
||||||
<para>The recommended way of setting the string fields is using
|
<para>The recommended way of setting the string fields is using
|
||||||
strncpy, like:</para>
|
strncpy, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);</programlisting>
|
||||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
||||||
CCB as done.</para>
|
CCB as done.</para>
|
||||||
|
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
||||||
gets just the the device unit number. So the poll routine would
|
gets just the the device unit number. So the poll routine would
|
||||||
normally look as:</para>
|
normally look as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>or</para>
|
<para>or</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
||||||
<para>If an asynchronous event callback has been set up then the
|
<para>If an asynchronous event callback has been set up then the
|
||||||
callback function should be defined.</para>
|
callback function should be defined.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>callback_arg - the value supplied when registering the
|
<listitem><para>callback_arg - the value supplied when registering the
|
||||||
|
|
@ -1532,8 +1464,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
||||||
looks like:</para>
|
looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc;
|
||||||
struct xxx_softc *softc;
|
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
int targ;
|
int targ;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
|
|
@ -1555,8 +1486,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1580,8 +1510,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
section. To make sure that the interrupt level will be always
|
section. To make sure that the interrupt level will be always
|
||||||
restored a wrapper function can be defined, like:</para>
|
restored a wrapper function can be defined, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
@ -1594,8 +1523,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
... process the request ...
|
... process the request ...
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This approach is simple and robust but the problem with it
|
<para>This approach is simple and robust but the problem with it
|
||||||
is that interrupts may get blocked for a relatively long time
|
is that interrupts may get blocked for a relatively long time
|
||||||
|
|
@ -1619,8 +1547,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
probably need also sending RESET signal to the SCSI bus to reset
|
probably need also sending RESET signal to the SCSI bus to reset
|
||||||
the status of the connections with the SCSI devices.</para>
|
the status of the connections with the SCSI devices.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int fatal=0;
|
||||||
int fatal=0;
|
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
||||||
|
|
@ -1678,8 +1605,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If interrupt is not caused by a controller-wide condition
|
<para>If interrupt is not caused by a controller-wide condition
|
||||||
then probably something has happened to the current hardware
|
then probably something has happened to the current hardware
|
||||||
|
|
@ -1687,8 +1613,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
non-HCB-related events, we just do not consider them here. Then
|
non-HCB-related events, we just do not consider them here. Then
|
||||||
we analyze what happened to this HCB:</para>
|
we analyze what happened to this HCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||||
struct xxx_hcb *hcb, *h, *hh;
|
|
||||||
int hcb_status, scsi_status;
|
int hcb_status, scsi_status;
|
||||||
int ccb_status;
|
int ccb_status;
|
||||||
int targ;
|
int targ;
|
||||||
|
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
targ = hcb->target;
|
targ = hcb->target;
|
||||||
hcb_status = get_status_of_current_hcb(softc);
|
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>First we check if the HCB has completed and if so we check
|
<para>First we check if the HCB has completed and if so we check
|
||||||
the returned SCSI status.</para>
|
the returned SCSI status.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb_status == COMPLETED) {
|
||||||
if(hcb_status == COMPLETED) {
|
scsi_status = get_completion_status(hcb);</programlisting>
|
||||||
scsi_status = get_completion_status(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then look if this status is related to the REQUEST SENSE
|
<para>Then look if this status is related to the REQUEST SENSE
|
||||||
command and if so handle it in a simple way.</para>
|
command and if so handle it in a simple way.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||||
if(hcb->flags & DOING_AUTOSENSE) {
|
|
||||||
if(scsi_status == GOOD) { /* autosense was successful */
|
if(scsi_status == GOOD) { /* autosense was successful */
|
||||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
|
|
@ -1729,16 +1650,14 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Else the command itself has completed, pay more attention to
|
<para>Else the command itself has completed, pay more attention to
|
||||||
details. If auto-sense is not disabled for this CCB and the
|
details. If auto-sense is not disabled for this CCB and the
|
||||||
command has failed with sense data then run REQUEST SENSE
|
command has failed with sense data then run REQUEST SENSE
|
||||||
command to receive that data.</para>
|
command to receive that data.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||||
hcb->ccb->csio.scsi_status = scsi_status;
|
|
||||||
calculate_residue(hcb);
|
calculate_residue(hcb);
|
||||||
|
|
||||||
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
||||||
|
|
@ -1756,8 +1675,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>One typical thing would be negotiation events: negotiation
|
<para>One typical thing would be negotiation events: negotiation
|
||||||
messages received from a SCSI target (in answer to our
|
messages received from a SCSI target (in answer to our
|
||||||
|
|
@ -1765,8 +1683,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
unable to negotiate (rejects our negotiation messages or does
|
unable to negotiate (rejects our negotiation messages or does
|
||||||
not answer them).</para>
|
not answer them).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> switch(hcb_status) {
|
||||||
switch(hcb_status) {
|
|
||||||
case TARGET_REJECTED_WIDE_NEG:
|
case TARGET_REJECTED_WIDE_NEG:
|
||||||
/* revert to 8-bit bus */
|
/* revert to 8-bit bus */
|
||||||
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
||||||
|
|
@ -1816,26 +1733,22 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
continue_current_hcb(softc);
|
continue_current_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we handle any errors that could have happened during
|
<para>Then we handle any errors that could have happened during
|
||||||
auto-sense in the same simple-minded way as before. Otherwise we
|
auto-sense in the same simple-minded way as before. Otherwise we
|
||||||
look closer at the details again.</para>
|
look closer at the details again.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||||
if(hcb->flags & DOING_AUTOSENSE)
|
|
||||||
goto autosense_failed;
|
goto autosense_failed;
|
||||||
|
|
||||||
switch(hcb_status) {
|
switch(hcb_status) {</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The next event we consider is unexpected disconnect. Which
|
<para>The next event we consider is unexpected disconnect. Which
|
||||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||||
and abnormal in other cases.</para>
|
and abnormal in other cases.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||||
case UNEXPECTED_DISCONNECT:
|
|
||||||
if(requested_abort(hcb)) {
|
if(requested_abort(hcb)) {
|
||||||
/* abort affects all commands on that target+LUN, so
|
/* abort affects all commands on that target+LUN, so
|
||||||
* mark all disconnected HCBs on that target+LUN as aborted too
|
* mark all disconnected HCBs on that target+LUN as aborted too
|
||||||
|
|
@ -1872,14 +1785,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
}
|
}
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the target refuses to accept tags we notify CAM about
|
<para>If the target refuses to accept tags we notify CAM about
|
||||||
that and return back all commands for this LUN:</para>
|
that and return back all commands for this LUN:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case TAGS_REJECTED:
|
||||||
case TAGS_REJECTED:
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||||
neg.valid = CCB_TRANS_TQ_VALID;
|
neg.valid = CCB_TRANS_TQ_VALID;
|
||||||
|
|
@ -1889,14 +1800,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check a number of other conditions, with processing
|
<para>Then we check a number of other conditions, with processing
|
||||||
basically limited to setting the CCB status:</para>
|
basically limited to setting the CCB status:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case SELECTION_TIMEOUT:
|
||||||
case SELECTION_TIMEOUT:
|
|
||||||
ccb_status = CAM_SEL_TIMEOUT;
|
ccb_status = CAM_SEL_TIMEOUT;
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
|
|
@ -1916,14 +1825,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the error was serious enough to freeze the
|
<para>Then we check if the error was serious enough to freeze the
|
||||||
input queue until it gets proceeded and do so if it is:</para>
|
input queue until it gets proceeded and do so if it is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
|
||||||
/* freeze the queue */
|
/* freeze the queue */
|
||||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||||
|
|
||||||
|
|
@ -1939,8 +1846,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This concludes the generic interrupt handling although
|
<para>This concludes the generic interrupt handling although
|
||||||
specific controllers may require some additions.</para>
|
specific controllers may require some additions.</para>
|
||||||
|
|
@ -2046,8 +1952,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
device reset request got stuck. So after all the timeout
|
device reset request got stuck. So after all the timeout
|
||||||
function would look like:</para>
|
function would look like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_timeout(void *arg)
|
xxx_timeout(void *arg)
|
||||||
{
|
{
|
||||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||||
|
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
||||||
} else {
|
} else {
|
||||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>When we abort a request all the other disconnected requests
|
<para>When we abort a request all the other disconnected requests
|
||||||
to the same target/LUN get aborted too. So there appears a
|
to the same target/LUN get aborted too. So there appears a
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.2 2000/12/04 11:34:57 alex Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.3 2000/12/04 11:39:41 alex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="driverbasics">
|
<chapter id="driverbasics">
|
||||||
|
|
@ -60,8 +60,7 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>Skeleton Layout of a kernel module</para>
|
<para>Skeleton Layout of a kernel module</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* KLD Skeleton
|
* KLD Skeleton
|
||||||
* Inspired by Andrew Reiter's Daemonnews article
|
* Inspired by Andrew Reiter's Daemonnews article
|
||||||
*/
|
*/
|
||||||
|
|
@ -98,20 +97,17 @@ skel_loader(struct module *m, int what, void *arg)
|
||||||
|
|
||||||
/* Declare this module to the rest of the kernel */
|
/* Declare this module to the rest of the kernel */
|
||||||
|
|
||||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Makefile</title>
|
<title>Makefile</title>
|
||||||
<para>FreeBSD provides a makefile include that you can use
|
<para>FreeBSD provides a makefile include that you can use
|
||||||
to quickly compile your kernel addition.</para>
|
to quickly compile your kernel addition.</para>
|
||||||
<programlisting>
|
<programlisting>SRCS=skeleton.c
|
||||||
SRCS=skeleton.c
|
|
||||||
KMOD=skeleton
|
KMOD=skeleton
|
||||||
|
|
||||||
.include <bsd.kmod.mk>
|
.include <bsd.kmod.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<para>Simply running <command>make</command> with
|
<para>Simply running <command>make</command> with
|
||||||
|
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
||||||
<para>This simple example pseudo-device remembers whatever values you write
|
<para>This simple example pseudo-device remembers whatever values you write
|
||||||
to it and can then supply them back to you when you read from
|
to it and can then supply them back to you when you read from
|
||||||
it.</para>
|
it.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple `echo' pseudo-device KLD
|
* Simple `echo' pseudo-device KLD
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
||||||
return(err);
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEV_MODULE(echo,echo_loader,NULL);
|
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>To install this driver you will first need to make a node on
|
<para>To install this driver you will first need to make a node on
|
||||||
your filesystem with a command such as : </para>
|
your filesystem with a command such as : </para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.28 2000/11/15 12:42:07 des Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.29 2001/01/23 12:25:31 des Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kerneldebug">
|
<chapter id="kerneldebug">
|
||||||
|
|
@ -272,8 +272,7 @@
|
||||||
and edit your configuration file. Uncomment (or add, if it does not
|
and edit your configuration file. Uncomment (or add, if it does not
|
||||||
exist) the following line</para>
|
exist) the following line</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
|
||||||
|
|
||||||
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
||||||
there will be some other object files rebuild, for example
|
there will be some other object files rebuild, for example
|
||||||
|
|
@ -312,8 +311,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
|
||||||
|
|
||||||
<para>To configure your kernel to include DDB, add the option line
|
<para>To configure your kernel to include DDB, add the option line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options DDB</programlisting>
|
||||||
options DDB</programlisting>
|
|
||||||
|
|
||||||
to your config file, and rebuild. (See <link
|
to your config file, and rebuild. (See <link
|
||||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/pci/chapter.sgml,v 1.1 2000/11/28 19:07:46 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="pci">
|
<chapter id="pci">
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
<para>Information here about how the PCI bus code iterates
|
<para>Information here about how the PCI bus code iterates
|
||||||
through the unattached devices and see if a newly loaded kld
|
through the unattached devices and see if a newly loaded kld
|
||||||
will attach to any of them.</para>
|
will attach to any of them.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple KLD to play with the PCI functions.
|
* Simple KLD to play with the PCI functions.
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
||||||
|
|
||||||
static devclass_t mypci_devclass;
|
static devclass_t mypci_devclass;
|
||||||
|
|
||||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Additional Resources
|
<para>Additional Resources
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.17 2000/06/14 20:30:36 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.18 2000/08/20 17:18:43 chris Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="policies">
|
<chapter id="policies">
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
maintained by a person or group of persons, they can communicate this
|
maintained by a person or group of persons, they can communicate this
|
||||||
fact to the world by adding a
|
fact to the world by adding a
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||||
MAINTAINER= email-addresses</programlisting>
|
|
||||||
|
|
||||||
line to the <filename>Makefile</filename>s covering this portion of the
|
line to the <filename>Makefile</filename>s covering this portion of the
|
||||||
source tree.</para>
|
source tree.</para>
|
||||||
|
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
||||||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>This directory contains virgin sources of the original distribution files
|
||||||
This directory contains virgin sources of the original distribution files
|
|
||||||
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
||||||
the files in this directory via patches and a cvs commit. New versions or
|
the files in this directory via patches and a cvs commit. New versions or
|
||||||
official-patch versions must be imported. Please remember to import with
|
official-patch versions must be imported. Please remember to import with
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/scsi/chapter.sgml,v 1.1 2001/03/29 06:14:42 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="scsi">
|
<chapter id="scsi">
|
||||||
|
|
@ -89,14 +89,12 @@
|
||||||
<para>A typical SIM driver needs to include the following
|
<para>A typical SIM driver needs to include the following
|
||||||
CAM-related header files:</para>
|
CAM-related header files:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#include <cam/cam.h>
|
||||||
#include <cam/cam.h>
|
|
||||||
#include <cam/cam_ccb.h>
|
#include <cam/cam_ccb.h>
|
||||||
#include <cam/cam_sim.h>
|
#include <cam/cam_sim.h>
|
||||||
#include <cam/cam_xpt_sim.h>
|
#include <cam/cam_xpt_sim.h>
|
||||||
#include <cam/cam_debug.h>
|
#include <cam/cam_debug.h>
|
||||||
#include <cam/scsi/scsi_all.h>
|
#include <cam/scsi/scsi_all.h></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The first thing each SIM driver must do is register itself
|
<para>The first thing each SIM driver must do is register itself
|
||||||
with the CAM subsystem. This is done during the driver's
|
with the CAM subsystem. This is done during the driver's
|
||||||
|
|
@ -109,35 +107,29 @@
|
||||||
<para>This is achieved in multiple steps: first it's necessary to
|
<para>This is achieved in multiple steps: first it's necessary to
|
||||||
allocate the queue of requests associated with this SIM:</para>
|
allocate the queue of requests associated with this SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_devq *devq;
|
||||||
struct cam_devq *devq;
|
|
||||||
|
|
||||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Here SIZE is the size of the queue to be allocated, maximal
|
<para>Here SIZE is the size of the queue to be allocated, maximal
|
||||||
number of requests it could contain. It's the number of requests
|
number of requests it could contain. It's the number of requests
|
||||||
that the SIM driver can handle in parallel on one SCSI
|
that the SIM driver can handle in parallel on one SCSI
|
||||||
card. Commonly it can be calculated as:</para>
|
card. Commonly it can be calculated as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Next we create a descriptor of our SIM:</para>
|
<para>Next we create a descriptor of our SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_sim *sim;
|
||||||
struct cam_sim *sim;
|
|
||||||
|
|
||||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||||
softc, unit, max_dev_transactions,
|
softc, unit, max_dev_transactions,
|
||||||
max_tagged_dev_transactions, devq) )==NULL) {
|
max_tagged_dev_transactions, devq) )==NULL) {
|
||||||
cam_simq_free(devq);
|
cam_simq_free(devq);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Note that if we are not able to create a SIM descriptor we
|
<para>Note that if we are not able to create a SIM descriptor we
|
||||||
free the <structname>devq</structname> also because we can do
|
free the <structname>devq</structname> also because we can do
|
||||||
|
|
@ -218,12 +210,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>Finally we register the SCSI buses associated with our SCSI
|
<para>Finally we register the SCSI buses associated with our SCSI
|
||||||
adapter:</para>
|
adapter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
|
||||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If there is one <structName>devq</structName> structure per
|
<para>If there is one <structName>devq</structName> structure per
|
||||||
SCSI bus (i.e. we consider a card with multiple buses as
|
SCSI bus (i.e. we consider a card with multiple buses as
|
||||||
|
|
@ -260,8 +250,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
can create the path for the future bus reset events in advance
|
can create the path for the future bus reset events in advance
|
||||||
and avoid problems with the future memory shortage:</para>
|
and avoid problems with the future memory shortage:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_path *path;
|
||||||
struct cam_path *path;
|
|
||||||
|
|
||||||
if(xpt_create_path(&path, /*periph*/NULL,
|
if(xpt_create_path(&path, /*periph*/NULL,
|
||||||
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
||||||
|
|
@ -272,8 +261,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
softc->wpath = path;
|
softc->wpath = path;
|
||||||
softc->sim = sim;
|
softc->sim = sim;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As you can see the path includes:</para>
|
<para>As you can see the path includes:</para>
|
||||||
|
|
||||||
|
|
@ -310,16 +298,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request is passed to CAM by requesting CAM action on a CAM
|
request is passed to CAM by requesting CAM action on a CAM
|
||||||
control block for this type of request:</para>
|
control block for this type of request:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_setasync csa;
|
||||||
struct ccb_setasync csa;
|
|
||||||
|
|
||||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||||
csa.event_enable = AC_LOST_DEVICE;
|
csa.event_enable = AC_LOST_DEVICE;
|
||||||
csa.callback = xxx_async;
|
csa.callback = xxx_async;
|
||||||
csa.callback_arg = sim;
|
csa.callback_arg = sim;
|
||||||
xpt_action((union ccb *)&csa);
|
xpt_action((union ccb *)&csa);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we take a look at the <function>xxx_action()</function>
|
<para>Now we take a look at the <function>xxx_action()</function>
|
||||||
and <function>xxx_poll()</function> driver entry points.</para>
|
and <function>xxx_poll()</function> driver entry points.</para>
|
||||||
|
|
@ -377,8 +363,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<function>xxx_action()</function> consists of a big
|
<function>xxx_action()</function> consists of a big
|
||||||
switch:</para>
|
switch:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
|
||||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||||
int unit = cam_sim_unit(sim);
|
int unit = cam_sim_unit(sim);
|
||||||
int bus = cam_sim_bus(sim);
|
int bus = cam_sim_bus(sim);
|
||||||
|
|
@ -390,8 +375,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_REQ_INVALID;
|
ccb_h->status = CAM_REQ_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As can be seen from the default case (if an unknown command
|
<para>As can be seen from the default case (if an unknown command
|
||||||
was received) the return code of the command is set into
|
was received) the return code of the command is set into
|
||||||
|
|
@ -505,10 +489,8 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
is to define some meaningful names for them and use these
|
is to define some meaningful names for them and use these
|
||||||
meaningful names in the driver, like:</para>
|
meaningful names in the driver, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The most common initiator mode requests are:</para>
|
<para>The most common initiator mode requests are:</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
@ -581,20 +563,17 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
make sure that the command did not get aborted when it was
|
make sure that the command did not get aborted when it was
|
||||||
sitting in the queue:</para>
|
sitting in the queue:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||||
struct ccb_scsiio *csio = &ccb->csio;
|
|
||||||
|
|
||||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Also we check that the device is supported at all by our
|
<para>Also we check that the device is supported at all by our
|
||||||
controller:</para>
|
controller:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
|
||||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||||
ccb_h->status = CAM_TID_INVALID;
|
ccb_h->status = CAM_TID_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
|
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_LUN_INVALID;
|
ccb_h->status = CAM_LUN_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then allocate whatever data structures (such as
|
<para>Then allocate whatever data structures (such as
|
||||||
card-dependent hardware control block) we need to process this
|
card-dependent hardware control block) we need to process this
|
||||||
|
|
@ -617,8 +595,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
well, link the CCB with the hardware control block (HCB) and
|
well, link the CCB with the hardware control block (HCB) and
|
||||||
mark it as queued.</para>
|
mark it as queued.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
|
||||||
|
|
||||||
if(hcb == NULL) {
|
if(hcb == NULL) {
|
||||||
softc->flags |= RESOURCE_SHORTAGE;
|
softc->flags |= RESOURCE_SHORTAGE;
|
||||||
|
|
@ -629,8 +606,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
||||||
ccb_h->status |= CAM_SIM_QUEUED;
|
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Extract the target data from CCB into the hardware control
|
<para>Extract the target data from CCB into the hardware control
|
||||||
block. Check if we are asked to assign a tag and if yes then
|
block. Check if we are asked to assign a tag and if yes then
|
||||||
|
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
devices to set the maximal mutually supported bus width,
|
devices to set the maximal mutually supported bus width,
|
||||||
synchronous rate and offset.</para>
|
synchronous rate and offset.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
|
||||||
generate_identify_message(hcb);
|
generate_identify_message(hcb);
|
||||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||||
if( !target_negotiated(hcb) )
|
if( !target_negotiated(hcb) )
|
||||||
generate_negotiation_messages(hcb);
|
generate_negotiation_messages(hcb);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then set up the SCSI command. The command storage may be
|
<para>Then set up the SCSI command. The command storage may be
|
||||||
specified in the CCB in many interesting ways, specified by
|
specified in the CCB in many interesting ways, specified by
|
||||||
|
|
@ -671,8 +645,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
back to a virtual address but with big pain, so we don't do
|
back to a virtual address but with big pain, so we don't do
|
||||||
that.</para>
|
that.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
|
||||||
/* CDB is a pointer */
|
/* CDB is a pointer */
|
||||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||||
/* CDB pointer is virtual */
|
/* CDB pointer is virtual */
|
||||||
|
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
/* CDB is in the ccb (buffer) */
|
/* CDB is in the ccb (buffer) */
|
||||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||||
}
|
}
|
||||||
hcb->cmdlen = csio->cdb_len;
|
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now it's time to set up the data. Again, the data storage
|
<para>Now it's time to set up the data. Again, the data storage
|
||||||
may be specified in the CCB in many interesting ways,
|
may be specified in the CCB in many interesting ways,
|
||||||
|
|
@ -698,12 +670,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
data transfer. The simplest case is if there is no data to
|
data transfer. The simplest case is if there is no data to
|
||||||
transfer:</para>
|
transfer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
|
||||||
|
|
||||||
if (dir == CAM_DIR_NONE)
|
if (dir == CAM_DIR_NONE)
|
||||||
goto end_data;
|
goto end_data;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the data is in one chunk or in a
|
<para>Then we check if the data is in one chunk or in a
|
||||||
scatter-gather list, and the addresses are physical or
|
scatter-gather list, and the addresses are physical or
|
||||||
|
|
@ -722,8 +692,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
the case for a single non-scattered virtual buffer must be
|
the case for a single non-scattered virtual buffer must be
|
||||||
implemented, it's actively used by CAM.</para>
|
implemented, it's actively used by CAM.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int rv;
|
||||||
int rv;
|
|
||||||
|
|
||||||
initialize_hcb_for_data(hcb);
|
initialize_hcb_for_data(hcb);
|
||||||
|
|
||||||
|
|
@ -770,16 +739,13 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
free_hcb_and_ccb_done(hcb, ccb, rv);
|
free_hcb_and_ccb_done(hcb, ccb, rv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
end_data:
|
end_data:</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If disconnection is disabled for this CCB we pass this
|
<para>If disconnection is disabled for this CCB we pass this
|
||||||
information to the hcb:</para>
|
information to the hcb:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
hcb_disable_disconnect(hcb);</programlisting>
|
||||||
hcb_disable_disconnect(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the controller is able to run REQUEST SENSE command all
|
<para>If the controller is able to run REQUEST SENSE command all
|
||||||
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
||||||
|
|
@ -790,18 +756,15 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
to the hardware and return, the rest will be done by the
|
to the hardware and return, the rest will be done by the
|
||||||
interrupt handler (or timeout handler).</para>
|
interrupt handler (or timeout handler).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
|
||||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||||
put_hcb_into_hardware_queue(hcb);
|
put_hcb_into_hardware_queue(hcb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>And here is a possible implementation of the function
|
<para>And here is a possible implementation of the function
|
||||||
returning CCB:</para>
|
returning CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||||
{
|
{
|
||||||
struct xxx_softc *softc = hcb->softc;
|
struct xxx_softc *softc = hcb->softc;
|
||||||
|
|
@ -819,8 +782,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb->ccb_h.status = status |
|
ccb->ccb_h.status = status |
|
||||||
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
||||||
|
|
@ -859,8 +821,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and those being disconnected, as done with the status
|
and those being disconnected, as done with the status
|
||||||
CAM_SCSI_BUS_RESET. Like:</para>
|
CAM_SCSI_BUS_RESET. Like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int targ, lun;
|
||||||
int targ, lun;
|
|
||||||
struct xxx_hcb *h, *hh;
|
struct xxx_hcb *h, *hh;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Implementing the SCSI bus reset as a function may be a good
|
<para>Implementing the SCSI bus reset as a function may be a good
|
||||||
idea because it would be re-used by the timeout function as a
|
idea because it would be re-used by the timeout function as a
|
||||||
|
|
@ -931,23 +891,20 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>The hard way is to implement this request honestly. First
|
<para>The hard way is to implement this request honestly. First
|
||||||
check that abort applies to a SCSI transaction:</para>
|
check that abort applies to a SCSI transaction:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb *abort_ccb;
|
||||||
struct ccb *abort_ccb;
|
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then it's necessary to find this CCB in our queue. This can
|
<para>Then it's necessary to find this CCB in our queue. This can
|
||||||
be done by walking the list of all our hardware control blocks
|
be done by walking the list of all our hardware control blocks
|
||||||
in search for one associated with this CCB:</para>
|
in search for one associated with this CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h;
|
||||||
struct xxx_hcb *hcb, *h;
|
|
||||||
|
|
||||||
hcb = NULL;
|
hcb = NULL;
|
||||||
|
|
||||||
|
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb=found_hcb;
|
hcb=found_hcb;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we look at the current processing status of the HCB. It
|
<para>Now we look at the current processing status of the HCB. It
|
||||||
may be either sitting in the queue waiting to be sent to the
|
may be either sitting in the queue waiting to be sent to the
|
||||||
|
|
@ -982,8 +938,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
SCSI bus the SCSI controller will see this flag and skip
|
SCSI bus the SCSI controller will see this flag and skip
|
||||||
it.</para>
|
it.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int hstatus;
|
||||||
int hstatus;
|
|
||||||
|
|
||||||
/* shown as a function, in case special action is needed to make
|
/* shown as a function, in case special action is needed to make
|
||||||
* this flag visible to hardware
|
* this flag visible to hardware
|
||||||
|
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
case HCB_COMPLETED:
|
case HCB_COMPLETED:
|
||||||
/* this is an easy case */
|
/* this is an easy case */
|
||||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is being transferred right now we would like to
|
<para>If the CCB is being transferred right now we would like to
|
||||||
signal to the SCSI controller in some hardware-dependent way
|
signal to the SCSI controller in some hardware-dependent way
|
||||||
|
|
@ -1016,8 +970,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and mark the aborted CCB as aborted (but not mark it as done
|
and mark the aborted CCB as aborted (but not mark it as done
|
||||||
yet).</para>
|
yet).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||||
case HCB_BEING_TRANSFERRED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1031,16 +984,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
goto abort_again;
|
goto abort_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is in the list of disconnected then set it up as
|
<para>If the CCB is in the list of disconnected then set it up as
|
||||||
an abort request and re-queue it at the front of hardware
|
an abort request and re-queue it at the front of hardware
|
||||||
queue. Reset the timeout and report the abort request to be
|
queue. Reset the timeout and report the abort request to be
|
||||||
completed.</para>
|
completed.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_DISCONNECTED:
|
||||||
case HCB_DISCONNECTED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1050,8 +1001,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>That's all for the ABORT request, although there is one more
|
<para>That's all for the ABORT request, although there is one more
|
||||||
issue. Because the ABORT message cleans all the ongoing
|
issue. Because the ABORT message cleans all the ongoing
|
||||||
|
|
@ -1066,8 +1016,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request. Then the case XPT_ABORT would be small, like
|
request. Then the case XPT_ABORT would be small, like
|
||||||
that:</para>
|
that:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case XPT_ABORT:
|
||||||
case XPT_ABORT:
|
|
||||||
struct ccb *abort_ccb;
|
struct ccb *abort_ccb;
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
|
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
else
|
else
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||||
|
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
||||||
|
|
||||||
<para>The code looks like:</para>
|
<para>The code looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_trans_settings *cts;
|
||||||
struct ccb_trans_settings *cts;
|
|
||||||
int targ, lun;
|
int targ, lun;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then when the next I/O request will be processed it will
|
<para>Then when the next I/O request will be processed it will
|
||||||
check if it has to re-negotiate, for example by calling the
|
check if it has to re-negotiate, for example by calling the
|
||||||
function target_negotiated(hcb). It can be implemented like
|
function target_negotiated(hcb). It can be implemented like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int
|
||||||
int
|
|
||||||
target_negotiated(struct xxx_hcb *hcb)
|
target_negotiated(struct xxx_hcb *hcb)
|
||||||
{
|
{
|
||||||
struct softc *softc = hcb->softc;
|
struct softc *softc = hcb->softc;
|
||||||
|
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
||||||
return 0; /* FALSE */
|
return 0; /* FALSE */
|
||||||
else
|
else
|
||||||
return 1; /* TRUE */
|
return 1; /* TRUE */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After the values are re-negotiated the resulting values must
|
<para>After the values are re-negotiated the resulting values must
|
||||||
be assigned to both current and goal parameters, so for future
|
be assigned to both current and goal parameters, so for future
|
||||||
|
|
@ -1300,8 +1244,7 @@ of the union ccb:</para>
|
||||||
typical calculation example taken from the aic7xxx driver
|
typical calculation example taken from the aic7xxx driver
|
||||||
is:</para>
|
is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_calc_geometry *ccg;
|
||||||
struct ccb_calc_geometry *ccg;
|
|
||||||
u_int32_t size_mb;
|
u_int32_t size_mb;
|
||||||
u_int32_t secs_per_cylinder;
|
u_int32_t secs_per_cylinder;
|
||||||
int extended;
|
int extended;
|
||||||
|
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
||||||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This gives the general idea, the exact calculation depends
|
<para>This gives the general idea, the exact calculation depends
|
||||||
on the quirks of the particular BIOS. If BIOS provides no way
|
on the quirks of the particular BIOS. If BIOS provides no way
|
||||||
|
|
@ -1331,10 +1273,8 @@ of the union ccb:</para>
|
||||||
normally be assumed equal to 1. Other popular geometries
|
normally be assumed equal to 1. Other popular geometries
|
||||||
are:</para>
|
are:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||||
128 heads, 63 sectors - Symbios controllers
|
16 heads, 63 sectors - old controllers</programlisting>
|
||||||
16 heads, 63 sectors - old controllers
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||||
with variable success, for example a combination of Symbios
|
with variable success, for example a combination of Symbios
|
||||||
|
|
@ -1447,9 +1387,7 @@ ccb_pathinq cpi" of the union ccb:</para>
|
||||||
<para>The recommended way of setting the string fields is using
|
<para>The recommended way of setting the string fields is using
|
||||||
strncpy, like:</para>
|
strncpy, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);</programlisting>
|
||||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
||||||
CCB as done.</para>
|
CCB as done.</para>
|
||||||
|
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
||||||
gets just the the device unit number. So the poll routine would
|
gets just the the device unit number. So the poll routine would
|
||||||
normally look as:</para>
|
normally look as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>or</para>
|
<para>or</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
||||||
<para>If an asynchronous event callback has been set up then the
|
<para>If an asynchronous event callback has been set up then the
|
||||||
callback function should be defined.</para>
|
callback function should be defined.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>callback_arg - the value supplied when registering the
|
<listitem><para>callback_arg - the value supplied when registering the
|
||||||
|
|
@ -1532,8 +1464,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
||||||
looks like:</para>
|
looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc;
|
||||||
struct xxx_softc *softc;
|
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
int targ;
|
int targ;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
|
|
@ -1555,8 +1486,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1580,8 +1510,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
section. To make sure that the interrupt level will be always
|
section. To make sure that the interrupt level will be always
|
||||||
restored a wrapper function can be defined, like:</para>
|
restored a wrapper function can be defined, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
@ -1594,8 +1523,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
... process the request ...
|
... process the request ...
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This approach is simple and robust but the problem with it
|
<para>This approach is simple and robust but the problem with it
|
||||||
is that interrupts may get blocked for a relatively long time
|
is that interrupts may get blocked for a relatively long time
|
||||||
|
|
@ -1619,8 +1547,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
probably need also sending RESET signal to the SCSI bus to reset
|
probably need also sending RESET signal to the SCSI bus to reset
|
||||||
the status of the connections with the SCSI devices.</para>
|
the status of the connections with the SCSI devices.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int fatal=0;
|
||||||
int fatal=0;
|
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
||||||
|
|
@ -1678,8 +1605,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If interrupt is not caused by a controller-wide condition
|
<para>If interrupt is not caused by a controller-wide condition
|
||||||
then probably something has happened to the current hardware
|
then probably something has happened to the current hardware
|
||||||
|
|
@ -1687,8 +1613,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
non-HCB-related events, we just do not consider them here. Then
|
non-HCB-related events, we just do not consider them here. Then
|
||||||
we analyze what happened to this HCB:</para>
|
we analyze what happened to this HCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||||
struct xxx_hcb *hcb, *h, *hh;
|
|
||||||
int hcb_status, scsi_status;
|
int hcb_status, scsi_status;
|
||||||
int ccb_status;
|
int ccb_status;
|
||||||
int targ;
|
int targ;
|
||||||
|
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
targ = hcb->target;
|
targ = hcb->target;
|
||||||
hcb_status = get_status_of_current_hcb(softc);
|
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>First we check if the HCB has completed and if so we check
|
<para>First we check if the HCB has completed and if so we check
|
||||||
the returned SCSI status.</para>
|
the returned SCSI status.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb_status == COMPLETED) {
|
||||||
if(hcb_status == COMPLETED) {
|
scsi_status = get_completion_status(hcb);</programlisting>
|
||||||
scsi_status = get_completion_status(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then look if this status is related to the REQUEST SENSE
|
<para>Then look if this status is related to the REQUEST SENSE
|
||||||
command and if so handle it in a simple way.</para>
|
command and if so handle it in a simple way.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||||
if(hcb->flags & DOING_AUTOSENSE) {
|
|
||||||
if(scsi_status == GOOD) { /* autosense was successful */
|
if(scsi_status == GOOD) { /* autosense was successful */
|
||||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
|
|
@ -1729,16 +1650,14 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Else the command itself has completed, pay more attention to
|
<para>Else the command itself has completed, pay more attention to
|
||||||
details. If auto-sense is not disabled for this CCB and the
|
details. If auto-sense is not disabled for this CCB and the
|
||||||
command has failed with sense data then run REQUEST SENSE
|
command has failed with sense data then run REQUEST SENSE
|
||||||
command to receive that data.</para>
|
command to receive that data.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||||
hcb->ccb->csio.scsi_status = scsi_status;
|
|
||||||
calculate_residue(hcb);
|
calculate_residue(hcb);
|
||||||
|
|
||||||
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
||||||
|
|
@ -1756,8 +1675,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>One typical thing would be negotiation events: negotiation
|
<para>One typical thing would be negotiation events: negotiation
|
||||||
messages received from a SCSI target (in answer to our
|
messages received from a SCSI target (in answer to our
|
||||||
|
|
@ -1765,8 +1683,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
unable to negotiate (rejects our negotiation messages or does
|
unable to negotiate (rejects our negotiation messages or does
|
||||||
not answer them).</para>
|
not answer them).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> switch(hcb_status) {
|
||||||
switch(hcb_status) {
|
|
||||||
case TARGET_REJECTED_WIDE_NEG:
|
case TARGET_REJECTED_WIDE_NEG:
|
||||||
/* revert to 8-bit bus */
|
/* revert to 8-bit bus */
|
||||||
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
||||||
|
|
@ -1816,26 +1733,22 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
continue_current_hcb(softc);
|
continue_current_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we handle any errors that could have happened during
|
<para>Then we handle any errors that could have happened during
|
||||||
auto-sense in the same simple-minded way as before. Otherwise we
|
auto-sense in the same simple-minded way as before. Otherwise we
|
||||||
look closer at the details again.</para>
|
look closer at the details again.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||||
if(hcb->flags & DOING_AUTOSENSE)
|
|
||||||
goto autosense_failed;
|
goto autosense_failed;
|
||||||
|
|
||||||
switch(hcb_status) {
|
switch(hcb_status) {</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The next event we consider is unexpected disconnect. Which
|
<para>The next event we consider is unexpected disconnect. Which
|
||||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||||
and abnormal in other cases.</para>
|
and abnormal in other cases.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||||
case UNEXPECTED_DISCONNECT:
|
|
||||||
if(requested_abort(hcb)) {
|
if(requested_abort(hcb)) {
|
||||||
/* abort affects all commands on that target+LUN, so
|
/* abort affects all commands on that target+LUN, so
|
||||||
* mark all disconnected HCBs on that target+LUN as aborted too
|
* mark all disconnected HCBs on that target+LUN as aborted too
|
||||||
|
|
@ -1872,14 +1785,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
}
|
}
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the target refuses to accept tags we notify CAM about
|
<para>If the target refuses to accept tags we notify CAM about
|
||||||
that and return back all commands for this LUN:</para>
|
that and return back all commands for this LUN:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case TAGS_REJECTED:
|
||||||
case TAGS_REJECTED:
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||||
neg.valid = CCB_TRANS_TQ_VALID;
|
neg.valid = CCB_TRANS_TQ_VALID;
|
||||||
|
|
@ -1889,14 +1800,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check a number of other conditions, with processing
|
<para>Then we check a number of other conditions, with processing
|
||||||
basically limited to setting the CCB status:</para>
|
basically limited to setting the CCB status:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case SELECTION_TIMEOUT:
|
||||||
case SELECTION_TIMEOUT:
|
|
||||||
ccb_status = CAM_SEL_TIMEOUT;
|
ccb_status = CAM_SEL_TIMEOUT;
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
|
|
@ -1916,14 +1825,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the error was serious enough to freeze the
|
<para>Then we check if the error was serious enough to freeze the
|
||||||
input queue until it gets proceeded and do so if it is:</para>
|
input queue until it gets proceeded and do so if it is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
|
||||||
/* freeze the queue */
|
/* freeze the queue */
|
||||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||||
|
|
||||||
|
|
@ -1939,8 +1846,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This concludes the generic interrupt handling although
|
<para>This concludes the generic interrupt handling although
|
||||||
specific controllers may require some additions.</para>
|
specific controllers may require some additions.</para>
|
||||||
|
|
@ -2046,8 +1952,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
device reset request got stuck. So after all the timeout
|
device reset request got stuck. So after all the timeout
|
||||||
function would look like:</para>
|
function would look like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_timeout(void *arg)
|
xxx_timeout(void *arg)
|
||||||
{
|
{
|
||||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||||
|
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
||||||
} else {
|
} else {
|
||||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>When we abort a request all the other disconnected requests
|
<para>When we abort a request all the other disconnected requests
|
||||||
to the same target/LUN get aborted too. So there appears a
|
to the same target/LUN get aborted too. So there appears a
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/secure/chapter.sgml,v 1.1 2000/11/28 18:31:39 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="secure">
|
<chapter id="secure">
|
||||||
|
|
@ -121,8 +121,7 @@
|
||||||
instruction immediately following the function call. (Inspired
|
instruction immediately following the function call. (Inspired
|
||||||
by <xref linkend="Phrack">)</para>
|
by <xref linkend="Phrack">)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#include <sgmltag>stdio.h</sgmltag>
|
||||||
#include <sgmltag>stdio.h</sgmltag>
|
|
||||||
|
|
||||||
void manipulate(char *buffer) {
|
void manipulate(char *buffer) {
|
||||||
char newbuffer[80];
|
char newbuffer[80];
|
||||||
|
|
@ -140,8 +139,7 @@ int main() {
|
||||||
i=2;
|
i=2;
|
||||||
printf("The value of i is : %d\n",i);
|
printf("The value of i is : %d\n",i);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Let us examine what the memory image of this process would
|
<para>Let us examine what the memory image of this process would
|
||||||
look like if we were to input 160 spaces into our little program
|
look like if we were to input 160 spaces into our little program
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/tools/chapter.sgml,v 1.1 2000/11/28 18:21:36 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="tools">
|
<chapter id="tools">
|
||||||
|
|
@ -1060,8 +1060,7 @@ free(foo);
|
||||||
<para>Here's a very simple make file:</para>
|
<para>Here's a very simple make file:</para>
|
||||||
|
|
||||||
<programlisting>foo: foo.c
|
<programlisting>foo: foo.c
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>It consists of two lines, a dependency line and a creation
|
<para>It consists of two lines, a dependency line and a creation
|
||||||
line.</para>
|
line.</para>
|
||||||
|
|
@ -1105,8 +1104,7 @@ free(foo);
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp foo /home/me
|
cp foo /home/me</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>We can tell make which target we want to make by
|
<para>We can tell make which target we want to make by
|
||||||
typing:</para>
|
typing:</para>
|
||||||
|
|
@ -1159,8 +1157,7 @@ install:
|
||||||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, if we go to the directory for this port and type
|
<para>Now, if we go to the directory for this port and type
|
||||||
<userinput>make</userinput>, the following happens:</para>
|
<userinput>make</userinput>, the following happens:</para>
|
||||||
|
|
@ -1274,8 +1271,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
<filename>/usr/local/info</filename> directory to add an entry
|
<filename>/usr/local/info</filename> directory to add an entry
|
||||||
for it. This involves adding a line like</para>
|
for it. This involves adding a line like</para>
|
||||||
|
|
||||||
<programlisting> * Make: (make). The GNU Make utility.
|
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>to the file. Once you have done this, you can type
|
<para>to the file. Once you have done this, you can type
|
||||||
<userinput>info</userinput> and then select
|
<userinput>info</userinput> and then select
|
||||||
|
|
@ -1381,8 +1377,7 @@ main() {
|
||||||
int bazz(int anint) {
|
int bazz(int anint) {
|
||||||
printf("You gave me %d\n", anint);
|
printf("You gave me %d\n", anint);
|
||||||
return anint;
|
return anint;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This program sets <symbol>i</symbol> to be
|
<para>This program sets <symbol>i</symbol> to be
|
||||||
<literal>5</literal> and passes it to a function
|
<literal>5</literal> and passes it to a function
|
||||||
|
|
@ -1438,8 +1433,7 @@ main() {
|
||||||
|
|
||||||
i = 5;
|
i = 5;
|
||||||
printf("This is my program\n");
|
printf("This is my program\n");
|
||||||
<lineannotation>&hellip</>
|
<lineannotation>&hellip</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||||
|
|
@ -2162,8 +2156,7 @@ in font-lock-auto-mode-list"
|
||||||
("\\.lsp$" . lisp-mode)
|
("\\.lsp$" . lisp-mode)
|
||||||
("\\.wiz$" . whizbang-mode)
|
("\\.wiz$" . whizbang-mode)
|
||||||
("\\.scm$" . scheme-mode)
|
("\\.scm$" . scheme-mode)
|
||||||
<lineannotation>…</>
|
<lineannotation>…</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will automatically go into
|
<para>This means that Emacs will automatically go into
|
||||||
<function>whizbang-mode</function> when you edit a file ending
|
<function>whizbang-mode</function> when you edit a file ending
|
||||||
|
|
@ -2176,8 +2169,7 @@ in font-lock-auto-mode-list"
|
||||||
<programlisting>;; Auto font lock mode
|
<programlisting>;; Auto font lock mode
|
||||||
(defvar font-lock-auto-mode-list
|
(defvar font-lock-auto-mode-list
|
||||||
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
||||||
"List of modes to always start in font-lock-mode")
|
"List of modes to always start in font-lock-mode")</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will always enable
|
<para>This means that Emacs will always enable
|
||||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<corpauthor>The FreeBSD Documentation Project</corpauthor>
|
<corpauthor>The FreeBSD Documentation Project</corpauthor>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.165 2001/04/03 02:07:13 dd Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.166 2001/04/08 18:51:50 dd Exp $</pubdate>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>1995</year>
|
<year>1995</year>
|
||||||
|
|
@ -2763,8 +2763,7 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on
|
||||||
<para>Add the following lines to your kernel configuration
|
<para>Add the following lines to your kernel configuration
|
||||||
file, and rebuild the kernel.</para>
|
file, and rebuild the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device uhci
|
||||||
device uhci
|
|
||||||
device ohci
|
device ohci
|
||||||
device usb
|
device usb
|
||||||
device ukbd
|
device ukbd
|
||||||
|
|
@ -2773,8 +2772,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
||||||
<para>In versions of FreeBSD before 4.0, use this
|
<para>In versions of FreeBSD before 4.0, use this
|
||||||
instead:</para>
|
instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>controller uhci0
|
||||||
controller uhci0
|
|
||||||
controller ohci0
|
controller ohci0
|
||||||
controller usb0
|
controller usb0
|
||||||
controller ukbd0
|
controller ukbd0
|
||||||
|
|
@ -2794,8 +2792,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
||||||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||||
following lines:</para>
|
following lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>usbd_enable="YES"
|
||||||
usbd_enable="YES"
|
|
||||||
usbd_flags=""</programlisting>
|
usbd_flags=""</programlisting>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
@ -3024,8 +3021,7 @@ moused_flags=""</programlisting>
|
||||||
<para>Add the following lines to your kernel configuration
|
<para>Add the following lines to your kernel configuration
|
||||||
file, and rebuild the kernel.</para>
|
file, and rebuild the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device uhci
|
||||||
device uhci
|
|
||||||
device ohci
|
device ohci
|
||||||
device usb
|
device usb
|
||||||
device ums</programlisting>
|
device ums</programlisting>
|
||||||
|
|
@ -3033,8 +3029,7 @@ device ums</programlisting>
|
||||||
<para>In versions of FreeBSD before 4.0, use this
|
<para>In versions of FreeBSD before 4.0, use this
|
||||||
instead:</para>
|
instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>controller uhci0
|
||||||
controller uhci0
|
|
||||||
controller ohci0
|
controller ohci0
|
||||||
controller usb0
|
controller usb0
|
||||||
device ums0</programlisting>
|
device ums0</programlisting>
|
||||||
|
|
@ -3052,8 +3047,7 @@ device ums0</programlisting>
|
||||||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||||
following lines:</para>
|
following lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>moused_enable="YES"
|
||||||
moused_enable="YES"
|
|
||||||
moused_type="auto"
|
moused_type="auto"
|
||||||
moused_port="/dev/ums0"
|
moused_port="/dev/ums0"
|
||||||
moused_flags=""
|
moused_flags=""
|
||||||
|
|
@ -3070,16 +3064,14 @@ usbd_flags=""</programlisting>
|
||||||
3.3.2 or later, be sure to have the following lines in the
|
3.3.2 or later, be sure to have the following lines in the
|
||||||
<emphasis>Pointer</emphasis> section:</para>
|
<emphasis>Pointer</emphasis> section:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Device "/dev/sysmouse"
|
||||||
Device "/dev/sysmouse"
|
|
||||||
Protocol "Auto"</programlisting>
|
Protocol "Auto"</programlisting>
|
||||||
|
|
||||||
<para>If you are using earlier versions of XFree86, be sure to
|
<para>If you are using earlier versions of XFree86, be sure to
|
||||||
have the following lines in the <emphasis>Pointer</emphasis>
|
have the following lines in the <emphasis>Pointer</emphasis>
|
||||||
section:</para>
|
section:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Device "/dev/sysmouse"
|
||||||
Device "/dev/sysmouse"
|
|
||||||
Protocol "SysMouse"</programlisting>
|
Protocol "SysMouse"</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
@ -3127,8 +3119,7 @@ Protocol "SysMouse"</programlisting>
|
||||||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||||
kernel.</para>
|
kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: psm.c
|
||||||
Index: psm.c
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||||
retrieving revision 1.60.2.1
|
retrieving revision 1.60.2.1
|
||||||
|
|
@ -4356,13 +4347,11 @@ IO range check 0x00 activate 0x01</screen>
|
||||||
will fit) or part of the <emphasis>Device Description</emphasis>
|
will fit) or part of the <emphasis>Device Description</emphasis>
|
||||||
from the output of &man.pnpinfo.8;:</para>
|
from the output of &man.pnpinfo.8;:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||||
{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
|
||||||
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
||||||
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
||||||
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
||||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
|
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Add the hexadecimal Vendor ID for your device in the
|
<para>Add the hexadecimal Vendor ID for your device in the
|
||||||
correct place, save the file, rebuild your kernel, and reboot.
|
correct place, save the file, rebuild your kernel, and reboot.
|
||||||
|
|
@ -7242,8 +7231,7 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
|
||||||
<para>Then edit <filename>/etc/XF86Config</filename> and make
|
<para>Then edit <filename>/etc/XF86Config</filename> and make
|
||||||
sure you have the following lines.</para>
|
sure you have the following lines.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Section Pointer
|
||||||
Section Pointer
|
|
||||||
Protocol "SysMouse"
|
Protocol "SysMouse"
|
||||||
Device "/dev/sysmouse"
|
Device "/dev/sysmouse"
|
||||||
.....</programlisting>
|
.....</programlisting>
|
||||||
|
|
@ -7328,8 +7316,7 @@ Device "/dev/sysmouse"
|
||||||
Protocol "SysMouse"
|
Protocol "SysMouse"
|
||||||
Device "/dev/sysmouse"
|
Device "/dev/sysmouse"
|
||||||
Buttons 5
|
Buttons 5
|
||||||
EndSection
|
EndSection</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
|
|
@ -7398,8 +7385,7 @@ EndSection</programlisting>
|
||||||
Protocol "IntelliMouse"
|
Protocol "IntelliMouse"
|
||||||
Device "/dev/psm0"
|
Device "/dev/psm0"
|
||||||
ZAxisMapping 4 5
|
ZAxisMapping 4 5
|
||||||
EndSection
|
EndSection</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
@ -7454,8 +7440,7 @@ EndSection
|
||||||
(scroll-up imwheel-scroll-interval))
|
(scroll-up imwheel-scroll-interval))
|
||||||
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||||
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||||
;;; end imwheel section
|
;;; end imwheel section</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>For <application>Xemacs</application>, add the
|
<para>For <application>Xemacs</application>, add the
|
||||||
|
|
@ -7476,8 +7461,7 @@ EndSection
|
||||||
(scroll-up imwheel-scroll-interval))
|
(scroll-up imwheel-scroll-interval))
|
||||||
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||||
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||||
;;; end imwheel section
|
;;; end imwheel section</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
@ -8478,8 +8462,7 @@ SMC EtherPower (Model 8432)
|
||||||
TopWare TE-3500P
|
TopWare TE-3500P
|
||||||
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
||||||
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
||||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)
|
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)</programlisting>
|
||||||
</programlisting>
|
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/sgml-primer/chapter.sgml,v 1.14 2000/10/31 19:36:16 nik Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/sgml-primer/chapter.sgml,v 1.15 2000/11/01 22:38:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sgml-primer">
|
<chapter id="sgml-primer">
|
||||||
|
|
@ -215,8 +215,7 @@
|
||||||
the element is a paragraph, called <literal>p</literal>. This
|
the element is a paragraph, called <literal>p</literal>. This
|
||||||
element has both start and end tags.</para>
|
element has both start and end tags.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
||||||
<![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
|
||||||
the 'p' element, and it will end with the end tag for the 'p'
|
the 'p' element, and it will end with the end tag for the 'p'
|
||||||
element.</p>
|
element.</p>
|
||||||
|
|
||||||
|
|
@ -235,8 +234,7 @@
|
||||||
<literal>hr</literal>. This element does not wrap content, so only
|
<literal>hr</literal>. This element does not wrap content, so only
|
||||||
has a start tag.</para>
|
has a start tag.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a paragraph.</p>
|
||||||
<![ CDATA [<p>This is a paragraph.</p>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
@ -252,8 +250,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||||
<![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
|
||||||
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
|
|
@ -303,8 +300,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Using an element with an attribute</title>
|
<title>Using an element with an attribute</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p align="left">The inclusion of the align attribute
|
||||||
<![ CDATA [<p align="left">The inclusion of the align attribute
|
|
||||||
on this paragraph was superfluous, since the default is left.</p>
|
on this paragraph was superfluous, since the default is left.</p>
|
||||||
|
|
||||||
<p align="center">This may appear in the center.</p>]]></programlisting>
|
<p align="center">This may appear in the center.</p>]]></programlisting>
|
||||||
|
|
@ -319,8 +315,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Single quotes around attributes</title>
|
<title>Single quotes around attributes</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||||
<![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>Sometimes you do not need to use quotes around attribute values at
|
<para>Sometimes you do not need to use quotes around attribute values at
|
||||||
|
|
@ -352,8 +347,7 @@
|
||||||
<title><filename>.profile</filename>, for &man.sh.1; and
|
<title><filename>.profile</filename>, for &man.sh.1; and
|
||||||
&man.bash.1; users</title>
|
&man.bash.1; users</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>SGML_ROOT=/usr/local/share/sgml
|
||||||
SGML_ROOT=/usr/local/share/sgml
|
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
SGML_CATALOG_FILES=${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
||||||
|
|
@ -365,8 +359,7 @@ export SGML_CATALOG_FILES</programlisting>
|
||||||
<title><filename>.login</filename>, for &man.csh.1; and
|
<title><filename>.login</filename>, for &man.csh.1; and
|
||||||
&man.tcsh.1; users</title>
|
&man.tcsh.1; users</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>setenv SGML_ROOT /usr/local/share/sgml
|
||||||
setenv SGML_ROOT /usr/local/share/sgml
|
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/jade/catalog
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/jade/catalog
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
||||||
|
|
@ -383,8 +376,7 @@ setenv SGML_CATALOG_FILES ${SGML_ROOT}/docbook/catalog:$SGML_CATALOG_FILES</prog
|
||||||
<para>Create <filename>example.sgml</filename>, and enter the
|
<para>Create <filename>example.sgml</filename>, and enter the
|
||||||
following text;</para>
|
following text;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
@ -532,8 +524,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
<para>A typical declaration for a document written to conform with version
|
<para>A typical declaration for a document written to conform with version
|
||||||
4.0 of the HTML DTD looks like this;</para>
|
4.0 of the HTML DTD looks like this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
|
||||||
|
|
||||||
<para>That line contains a number of different components.</para>
|
<para>That line contains a number of different components.</para>
|
||||||
|
|
||||||
|
|
@ -603,8 +594,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
<para>FPIs must follow a specific syntax. This syntax is as
|
<para>FPIs must follow a specific syntax. This syntax is as
|
||||||
follows;</para>
|
follows;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||||
"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|
@ -693,8 +683,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
map FPIs to filenames. For example, if the catalog file contained
|
map FPIs to filenames. For example, if the catalog file contained
|
||||||
the line;</para>
|
the line;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|
||||||
|
|
||||||
<para>The SGML processor would know to look up the DTD from
|
<para>The SGML processor would know to look up the DTD from
|
||||||
<filename>strict.dtd</filename> in the <filename>4.0</filename>
|
<filename>strict.dtd</filename> in the <filename>4.0</filename>
|
||||||
|
|
@ -754,8 +743,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>The syntax for this is slightly different:</para>
|
<para>The syntax for this is slightly different:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||||
<![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
|
||||||
|
|
||||||
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
||||||
processor should locate the DTD in a system specific fashion. This
|
processor should locate the DTD in a system specific fashion. This
|
||||||
|
|
@ -807,8 +795,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>SGML generic comment</title>
|
<title>SGML generic comment</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!-- test comment --></programlisting>
|
||||||
<!-- test comment --></programlisting>
|
|
||||||
|
|
||||||
<programlisting><![ CDATA [
|
<programlisting><![ CDATA [
|
||||||
<!-- This is inside the comment -->
|
<!-- This is inside the comment -->
|
||||||
|
|
@ -864,20 +851,17 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>The SGML parser will treat this as though it were actually;</para>
|
<para>The SGML parser will treat this as though it were actually;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||||
<!THIS IS OUTSIDE THE COMMENT></programlisting>
|
|
||||||
|
|
||||||
<para>This is not valid SGML, and may give confusing error
|
<para>This is not valid SGML, and may give confusing error
|
||||||
messages.</para>
|
messages.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||||
<![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
|
||||||
|
|
||||||
<para>As the example suggests, <emphasis>do not</emphasis> write
|
<para>As the example suggests, <emphasis>do not</emphasis> write
|
||||||
comments like that.</para>
|
comments like that.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!--===================================================-->]]></programlisting>
|
||||||
<![ CDATA [<!--===================================================-->]]></programlisting>
|
|
||||||
|
|
||||||
<para>That is a (slightly) better approach, but it still potentially
|
<para>That is a (slightly) better approach, but it still potentially
|
||||||
confusing to people new to SGML.</para>
|
confusing to people new to SGML.</para>
|
||||||
|
|
@ -933,8 +917,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<literal>current.version</literal> which expanded to the current
|
<literal>current.version</literal> which expanded to the current
|
||||||
version number of your product. You could write;</para>
|
version number of your product. You could write;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<para>The current version of our product is
|
||||||
<![ CDATA [<para>The current version of our product is
|
|
||||||
¤t.version;.</para>]]></programlisting>
|
¤t.version;.</para>]]></programlisting>
|
||||||
|
|
||||||
<para>When the version number changes you can simply change the
|
<para>When the version number changes you can simply change the
|
||||||
|
|
@ -958,8 +941,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Defining general entities</title>
|
<title>Defining general entities</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY current.version "3.0-RELEASE">
|
<!ENTITY current.version "3.0-RELEASE">
|
||||||
<!ENTITY last.version "2.2.7-RELEASE">
|
<!ENTITY last.version "2.2.7-RELEASE">
|
||||||
]>]]></programlisting>
|
]>]]></programlisting>
|
||||||
|
|
@ -998,8 +980,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Defining parameter entities</title>
|
<title>Defining parameter entities</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % param.some "some">
|
<!ENTITY % param.some "some">
|
||||||
<!ENTITY % param.text "text">
|
<!ENTITY % param.text "text">
|
||||||
<!ENTITY % param.new "%param.some more %param.text">
|
<!ENTITY % param.new "%param.some more %param.text">
|
||||||
|
|
@ -1019,8 +1000,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Add a general entity to
|
<para>Add a general entity to
|
||||||
<filename>example.sgml</filename>.</para>
|
<filename>example.sgml</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
|
||||||
<!ENTITY version "1.1">
|
<!ENTITY version "1.1">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
@ -1118,8 +1098,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Using general entities to include files</title>
|
<title>Using general entities to include files</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||||
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">
|
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">
|
||||||
|
|
@ -1173,8 +1152,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<filename>chapters.ent</filename>. This file contains the
|
<filename>chapters.ent</filename>. This file contains the
|
||||||
following;</para>
|
following;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||||
<![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
|
||||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||||
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">]]></programlisting>
|
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">]]></programlisting>
|
||||||
|
|
||||||
|
|
@ -1183,8 +1161,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
document, which will then make all the general entities available
|
document, which will then make all the general entities available
|
||||||
for use. Then use the general entities as before;</para>
|
for use. Then use the general entities as before;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!-- Define a parameter entity to load in the chapter general entities -->
|
<!-- Define a parameter entity to load in the chapter general entities -->
|
||||||
<!ENTITY % chapters SYSTEM "chapters.ent">
|
<!ENTITY % chapters SYSTEM "chapters.ent">
|
||||||
|
|
||||||
|
|
@ -1214,16 +1191,14 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>Put content similar to the following in each file;</para>
|
<para>Put content similar to the following in each file;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||||
<![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||||
this;</para>
|
this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY version "1.1">
|
<!ENTITY version "1.1">
|
||||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||||
|
|
@ -1273,8 +1248,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||||
this;</para>
|
this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % entities SYSTEM "entities.sgml"> %entities;
|
<!ENTITY % entities SYSTEM "entities.sgml"> %entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
@ -1297,8 +1271,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Create a new file, <filename>entities.sgml</filename>, with
|
<para>Create a new file, <filename>entities.sgml</filename>, with
|
||||||
this content:</para>
|
this content:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!ENTITY version "1.1">
|
||||||
<![ CDATA [<!ENTITY version "1.1">
|
|
||||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||||
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
||||||
|
|
@ -1332,8 +1305,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Structure of a marked section</title>
|
<title>Structure of a marked section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ <replaceable>KEYWORD</replaceable> [
|
||||||
<![ <replaceable>KEYWORD</replaceable> [
|
|
||||||
Contents of marked section
|
Contents of marked section
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
@ -1399,8 +1371,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Using a CDATA marked section</title>
|
<title>Using a CDATA marked section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><para>Here is an example of how you would include some text
|
||||||
<para>Here is an example of how you would include some text
|
|
||||||
that contained many &lt; and &amp; symbols. The sample
|
that contained many &lt; and &amp; symbols. The sample
|
||||||
text is a fragment of HTML. The surrounding text (<para> and
|
text is a fragment of HTML. The surrounding text (<para> and
|
||||||
<programlisting>) are from DocBook.</para>
|
<programlisting>) are from DocBook.</para>
|
||||||
|
|
@ -1441,8 +1412,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<title>Using <literal>INCLUDE</literal> and
|
<title>Using <literal>INCLUDE</literal> and
|
||||||
<literal>IGNORE</literal> in marked sections</title>
|
<literal>IGNORE</literal> in marked sections</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ INCLUDE [
|
||||||
<![ INCLUDE [
|
|
||||||
This text will be processed and included.
|
This text will be processed and included.
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
|
|
@ -1480,8 +1450,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<title>Using a parameter entity to control a marked
|
<title>Using a parameter entity to control a marked
|
||||||
section</title>
|
section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % electronic.copy "INCLUDE">
|
<!ENTITY % electronic.copy "INCLUDE">
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
|
|
@ -1495,8 +1464,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>When producing the hard-copy version, change the entity's
|
<para>When producing the hard-copy version, change the entity's
|
||||||
definition to;</para>
|
definition to;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||||
<!ENTITY % electronic.copy "IGNORE"></programlisting>
|
|
||||||
|
|
||||||
<para>On reprocessing the document, the marked sections that use
|
<para>On reprocessing the document, the marked sections that use
|
||||||
<literal>%electronic.copy</literal> as their keyword will be
|
<literal>%electronic.copy</literal> as their keyword will be
|
||||||
|
|
@ -1513,8 +1481,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Create a new file, <filename>section.sgml</filename>, that
|
<para>Create a new file, <filename>section.sgml</filename>, that
|
||||||
contains the following;</para>
|
contains the following;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % text.output "INCLUDE">
|
<!ENTITY % text.output "INCLUDE">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/writing-style/chapter.sgml,v 1.9 2000/08/08 23:39:14 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/writing-style/chapter.sgml,v 1.10 2001/04/05 01:47:13 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="writing-style">
|
<chapter id="writing-style">
|
||||||
|
|
@ -182,8 +182,7 @@
|
||||||
<para>For example, the source for this section looks something
|
<para>For example, the source for this section looks something
|
||||||
like:</para>
|
like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [+--- This is column 0
|
||||||
<![ CDATA [+--- This is column 0
|
|
||||||
V
|
V
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>...</title>
|
<title>...</title>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.34 2001/01/16 21:38:07 ben Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.35 2001/02/09 16:02:02 dannyboy Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="advanced-networking">
|
<chapter id="advanced-networking">
|
||||||
|
|
@ -574,8 +574,7 @@ Local1 (10.20.30.1, 10.9.9.30) --> T1-GW (10.9.9.1)
|
||||||
|
|
||||||
<para>On the NFS server make sure you have:</para>
|
<para>On the NFS server make sure you have:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>portmap_enable="YES"
|
||||||
portmap_enable="YES"
|
|
||||||
nfs_server_enable="YES"
|
nfs_server_enable="YES"
|
||||||
nfs_server_flags="-u -t -n 4"
|
nfs_server_flags="-u -t -n 4"
|
||||||
mountd_flags="-r"</programlisting>
|
mountd_flags="-r"</programlisting>
|
||||||
|
|
@ -588,8 +587,7 @@ mountd_flags="-r"</programlisting>
|
||||||
|
|
||||||
<para>On the client, make sure you have:</para>
|
<para>On the client, make sure you have:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>nfs_client_enable="YES"
|
||||||
nfs_client_enable="YES"
|
|
||||||
nfs_client_flags="-n 4"</programlisting>
|
nfs_client_flags="-n 4"</programlisting>
|
||||||
|
|
||||||
<para>Like <command>nfsd</command>, the <option>-n 4</option> tells
|
<para>Like <command>nfsd</command>, the <option>-n 4</option> tells
|
||||||
|
|
@ -764,8 +762,7 @@ nfs_client_flags="-n 4"</programlisting>
|
||||||
<para>Examples for the FreeBSD system (<hostid>freebox</hostid>) as
|
<para>Examples for the FreeBSD system (<hostid>freebox</hostid>) as
|
||||||
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||||
fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>As a manual mount command on <hostid>freebox</hostid>:</para>
|
<para>As a manual mount command on <hostid>freebox</hostid>:</para>
|
||||||
|
|
||||||
|
|
@ -774,8 +771,7 @@ fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||||
<para>Examples for the FreeBSD system as the server: in
|
<para>Examples for the FreeBSD system as the server: in
|
||||||
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||||
freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>As a manual mount command on <hostid>fastws</hostid>:</para>
|
<para>As a manual mount command on <hostid>fastws</hostid>:</para>
|
||||||
|
|
||||||
|
|
@ -856,8 +852,7 @@ freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||||
<para>Set up a bootp server to provide the client with IP, gateway,
|
<para>Set up a bootp server to provide the client with IP, gateway,
|
||||||
netmask.</para>
|
netmask.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>diskless:\
|
||||||
diskless:\
|
|
||||||
:ht=ether:\
|
:ht=ether:\
|
||||||
:ha=0000c01f848a:\
|
:ha=0000c01f848a:\
|
||||||
:sm=255.255.255.0:\
|
:sm=255.255.255.0:\
|
||||||
|
|
@ -960,16 +955,14 @@ diskless:\
|
||||||
|
|
||||||
<para>A typical completely diskless cfg file might contain:</para>
|
<para>A typical completely diskless cfg file might contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||||
rootfs 192.1.2.3:/rootfs/myclient
|
|
||||||
swapfs 192.1.2.3:/swapfs
|
swapfs 192.1.2.3:/swapfs
|
||||||
swapsize 20000
|
swapsize 20000
|
||||||
hostname myclient.mydomain</programlisting>
|
hostname myclient.mydomain</programlisting>
|
||||||
|
|
||||||
<para>A cfg file for a machine with local swap might contain:</para>
|
<para>A cfg file for a machine with local swap might contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||||
rootfs 192.1.2.3:/rootfs/myclient
|
|
||||||
hostname myclient.mydomain</programlisting>
|
hostname myclient.mydomain</programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
@ -980,14 +973,12 @@ hostname myclient.mydomain</programlisting>
|
||||||
<filename>/etc/exports</filename> file on FreeBSD might look
|
<filename>/etc/exports</filename> file on FreeBSD might look
|
||||||
like:</para>
|
like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||||
/rootfs/myclient -maproot=0:0 myclient.mydomain
|
|
||||||
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
||||||
|
|
||||||
<para>And on HP-UX:</para>
|
<para>And on HP-UX:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/rootfs/myclient -root=myclient.mydomain
|
||||||
/rootfs/myclient -root=myclient.mydomain
|
|
||||||
/swapfs -root=myclient.mydomain</programlisting>
|
/swapfs -root=myclient.mydomain</programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
@ -1139,8 +1130,7 @@ hostname myclient.mydomain</programlisting>
|
||||||
list, send mail to &a.majordomo; and
|
list, send mail to &a.majordomo; and
|
||||||
specify:</para>
|
specify:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-isdn</programlisting>
|
||||||
subscribe freebsd-isdn</programlisting>
|
|
||||||
|
|
||||||
<para>in the body of your message.</para>
|
<para>in the body of your message.</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
@ -1262,8 +1252,7 @@ subscribe freebsd-isdn</programlisting>
|
||||||
with AUI/10BT transceiver, if necessary.</para>
|
with AUI/10BT transceiver, if necessary.</para>
|
||||||
|
|
||||||
<!-- This should be a graphic -->
|
<!-- This should be a graphic -->
|
||||||
<programlisting>
|
<programlisting>---Sun workstation
|
||||||
---Sun workstation
|
|
||||||
|
|
|
|
||||||
---FreeBSD box
|
---FreeBSD box
|
||||||
|
|
|
|
||||||
|
|
@ -1284,8 +1273,7 @@ ISDN BRI line</programlisting>
|
||||||
<para>Network is Twisted Pair Ethernet.</para>
|
<para>Network is Twisted Pair Ethernet.</para>
|
||||||
|
|
||||||
<!-- This should be a graphic -->
|
<!-- This should be a graphic -->
|
||||||
<programlisting>
|
<programlisting> -------Novell Server
|
||||||
-------Novell Server
|
|
||||||
| H |
|
| H |
|
||||||
| ---Sun
|
| ---Sun
|
||||||
| |
|
| |
|
||||||
|
|
@ -1805,8 +1793,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
||||||
<filename>/etc/crontab</filename> entries on your slave
|
<filename>/etc/crontab</filename> entries on your slave
|
||||||
servers should do the job:</para>
|
servers should do the job:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||||
20 * * * * root /usr/libexec/ypxfr passwd.byname
|
|
||||||
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
||||||
|
|
||||||
<para>These two lines force the slave to sync its maps with
|
<para>These two lines force the slave to sync its maps with
|
||||||
|
|
@ -1863,8 +1850,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
||||||
and start <command>ypbind</command> upon network
|
and start <command>ypbind</command> upon network
|
||||||
startup:</para>
|
startup:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>nisdomainname="test-domain"
|
||||||
nisdomainname="test-domain"
|
|
||||||
nis_client_enable="YES"</programlisting>
|
nis_client_enable="YES"</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
@ -1923,8 +1909,7 @@ nis_client_enable="YES"</programlisting>
|
||||||
like this:</para>
|
like this:</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># allow connections from local host -- mandatory
|
||||||
# allow connections from local host -- mandatory
|
|
||||||
127.0.0.1 255.255.255.255
|
127.0.0.1 255.255.255.255
|
||||||
# allow connections from any host
|
# allow connections from any host
|
||||||
# on the 192.168.128.0 network
|
# on the 192.168.128.0 network
|
||||||
|
|
@ -2177,13 +2162,11 @@ ellington&prompt.root; <userinput>vi /var/yp/netgroup</userinput>
|
||||||
least four netgroups: IT employees, IT apprentices, normal
|
least four netgroups: IT employees, IT apprentices, normal
|
||||||
employees and interns.</para>
|
employees and interns.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
|
||||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||||
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
||||||
(,golf,test-domain)
|
(,golf,test-domain)
|
||||||
INTERNS (,able,test-domain) (,baker,test-domain)
|
INTERNS (,able,test-domain) (,baker,test-domain)</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
||||||
are the names of the netgroups. Each bracketed group adds
|
are the names of the netgroups. Each bracketed group adds
|
||||||
|
|
@ -2230,12 +2213,10 @@ INTERNS (,able,test-domain) (,baker,test-domain)
|
||||||
15 users or less and a real netgroup that consists of the
|
15 users or less and a real netgroup that consists of the
|
||||||
sub-netgroups:</para>
|
sub-netgroups:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||||
BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
|
||||||
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
||||||
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
||||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3
|
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>You can repeat this process if you need more than 225
|
<para>You can repeat this process if you need more than 225
|
||||||
users within a single netgroup.</para>
|
users within a single netgroup.</para>
|
||||||
|
|
@ -2271,15 +2252,11 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
<replaceable>war</replaceable>, you only have to start
|
<replaceable>war</replaceable>, you only have to start
|
||||||
&man.vipw.8; and replace the line</para>
|
&man.vipw.8; and replace the line</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+:::::::::</programlisting>
|
||||||
+:::::::::
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>with</para>
|
<para>with</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::</programlisting>
|
||||||
+@IT_EMP:::::::::
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, only the data for the users defined in the netgroup
|
<para>Now, only the data for the users defined in the netgroup
|
||||||
<replaceable>IT_EMP</replaceable> is imported into
|
<replaceable>IT_EMP</replaceable> is imported into
|
||||||
|
|
@ -2321,20 +2298,16 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
of <filename>/etc/master.passwd</filename> with something like
|
of <filename>/etc/master.passwd</filename> with something like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::
|
||||||
+@IT_EMP:::::::::
|
|
||||||
+@IT_APP:::::::::
|
+@IT_APP:::::::::
|
||||||
+:::::::::/sbin/nologin
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The corresponding lines for the normal workstations
|
<para>The corresponding lines for the normal workstations
|
||||||
could be:</para>
|
could be:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::
|
||||||
+@IT_EMP:::::::::
|
|
||||||
+@USERS:::::::::
|
+@USERS:::::::::
|
||||||
+:::::::::/sbin/nologin
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>And everything would be fine until there is a policy
|
<para>And everything would be fine until there is a policy
|
||||||
change a few weeks later: The IT department starts hiring
|
change a few weeks later: The IT department starts hiring
|
||||||
|
|
@ -2359,11 +2332,9 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
that are allowed to login onto these machines. The new
|
that are allowed to login onto these machines. The new
|
||||||
entries for your NIS map netgroup should look like this:</para>
|
entries for your NIS map netgroup should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BIGSRV IT_EMP IT_APP
|
||||||
BIGSRV IT_EMP IT_APP
|
|
||||||
SMALLSRV IT_EMP IT_APP ITINTERN
|
SMALLSRV IT_EMP IT_APP ITINTERN
|
||||||
USERBOX IT_EMP ITINTERN USERS
|
USERBOX IT_EMP ITINTERN USERS</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This method of defining login restrictions works
|
<para>This method of defining login restrictions works
|
||||||
reasonably well if you can define groups of machines with
|
reasonably well if you can define groups of machines with
|
||||||
|
|
@ -2382,10 +2353,8 @@ USERBOX IT_EMP ITINTERN USERS
|
||||||
name of the netgroup. In other words, the lines should look
|
name of the netgroup. In other words, the lines should look
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||||
+@<replaceable>BOXNAME</replaceable>:::::::::
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
+:::::::::/sbin/nologin
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Once you have completed this task for all your machines,
|
<para>Once you have completed this task for all your machines,
|
||||||
you will not have to modify the local versions of
|
you will not have to modify the local versions of
|
||||||
|
|
@ -2394,8 +2363,7 @@ USERBOX IT_EMP ITINTERN USERS
|
||||||
is an example of a possible netgroup map for this
|
is an example of a possible netgroup map for this
|
||||||
scenario with some additional goodies.</para>
|
scenario with some additional goodies.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Define groups of users first
|
||||||
# Define groups of users first
|
|
||||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||||
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
||||||
|
|
@ -2429,8 +2397,7 @@ ONE SECURITY
|
||||||
#
|
#
|
||||||
# Restrict a machine to a single user
|
# Restrict a machine to a single user
|
||||||
TWO (,hotel,test-domain)
|
TWO (,hotel,test-domain)
|
||||||
# [...more groups to follow]
|
# [...more groups to follow]</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If you are using some kind of database to manage your user
|
<para>If you are using some kind of database to manage your user
|
||||||
accounts, you should be able to create the first part of the
|
accounts, you should be able to create the first part of the
|
||||||
|
|
@ -2667,9 +2634,7 @@ lrwxr-xr-x 1 root wheel 14 Nov 8 14:27 /usr/lib/libscrypt.so@ -> libscryp
|
||||||
<para>Edit your <filename>/etc/rc.conf</filename> to
|
<para>Edit your <filename>/etc/rc.conf</filename> to
|
||||||
include the following:</para>
|
include the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ifconfig_fxp0="DHCP"</programlisting>
|
||||||
ifconfig_fxp0="DHCP"
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>Be sure to replace <literal>fxp0</literal> with the
|
<para>Be sure to replace <literal>fxp0</literal> with the
|
||||||
|
|
@ -2682,10 +2647,8 @@ ifconfig_fxp0="DHCP"
|
||||||
flags to <command>dhclient</command>, also include the
|
flags to <command>dhclient</command>, also include the
|
||||||
following (editing as necessary):</para>
|
following (editing as necessary):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>dhcp_program="/sbin/dhclient"
|
||||||
dhcp_program="/sbin/dhclient"
|
dhcp_flags=""</programlisting>
|
||||||
dhcp_flags=""
|
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/backups/chapter.sgml,v 1.26 2000/09/18 17:05:13 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/backups/chapter.sgml,v 1.27 2000/12/15 21:52:33 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="backups">
|
<chapter id="backups">
|
||||||
|
|
@ -419,8 +419,7 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
|
||||||
|
|
||||||
<para>An example script for creating a bootable floppy:</para>
|
<para>An example script for creating a bootable floppy:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [#!/bin/sh
|
||||||
<![ CDATA [#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# create a restore floppy
|
# create a restore floppy
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.404 2001/04/07 01:58:20 will Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.405 2001/04/08 10:47:59 dinoex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="contrib">
|
<chapter id="contrib">
|
||||||
|
|
@ -592,8 +592,7 @@
|
||||||
wish to protect, replacing the text between the <literal>%%</literal>
|
wish to protect, replacing the text between the <literal>%%</literal>
|
||||||
with the appropriate information.</para>
|
with the appropriate information.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Copyright (c) %%proper_years_here%%
|
||||||
Copyright (c) %%proper_years_here%%
|
|
||||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.59 2001/01/03 13:23:22 kevlo Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.60 2001/03/17 01:58:42 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="cutting-edge">
|
<chapter id="cutting-edge">
|
||||||
|
|
@ -139,8 +139,7 @@
|
||||||
<para>To join these lists, send mail to &a.majordomo; and
|
<para>To join these lists, send mail to &a.majordomo; and
|
||||||
specify the following in the body of your message:</para>
|
specify the following in the body of your message:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-current
|
||||||
subscribe freebsd-current
|
|
||||||
subscribe cvs-all</programlisting>
|
subscribe cvs-all</programlisting>
|
||||||
|
|
||||||
<para>Optionally, you can also say <literal>help</literal>
|
<para>Optionally, you can also say <literal>help</literal>
|
||||||
|
|
@ -304,8 +303,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CVSup/cvsupit.tgz</userinput></scr
|
||||||
<para>To join these lists, send mail to &a.majordomo; and
|
<para>To join these lists, send mail to &a.majordomo; and
|
||||||
specify the following in the body of your message:</para>
|
specify the following in the body of your message:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-stable
|
||||||
subscribe freebsd-stable
|
|
||||||
subscribe cvs-all</programlisting>
|
subscribe cvs-all</programlisting>
|
||||||
|
|
||||||
<para>Optionally, you can also say <literal>help</literal>
|
<para>Optionally, you can also say <literal>help</literal>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.24 2000/12/05 12:54:46 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.25 2000/12/15 21:52:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="disks">
|
<chapter id="disks">
|
||||||
|
|
@ -662,8 +662,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
|
||||||
adding the following line to your kernel configuration
|
adding the following line to your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options QUOTA</programlisting>
|
||||||
options QUOTA</programlisting>
|
|
||||||
|
|
||||||
<para>The stock <filename>GENERIC</filename> kernel does not have
|
<para>The stock <filename>GENERIC</filename> kernel does not have
|
||||||
this enabled by default, so you will have to configure, build and
|
this enabled by default, so you will have to configure, build and
|
||||||
|
|
@ -676,8 +675,7 @@ options QUOTA</programlisting>
|
||||||
<filename>/etc/rc.conf</filename>. This is done by adding the
|
<filename>/etc/rc.conf</filename>. This is done by adding the
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable_quotas=<quote>YES</quote></programlisting>
|
||||||
enable_quotas=<quote>YES</quote></programlisting>
|
|
||||||
|
|
||||||
<para>For finer control over your quota startup, there is an
|
<para>For finer control over your quota startup, there is an
|
||||||
additional configuration variable available. Normally on bootup,
|
additional configuration variable available. Normally on bootup,
|
||||||
|
|
@ -690,15 +688,13 @@ enable_quotas=<quote>YES</quote></programlisting>
|
||||||
skip this step, a variable is made available for the
|
skip this step, a variable is made available for the
|
||||||
purpose:</para>
|
purpose:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>check_quotas=<quote>NO</quote></programlisting>
|
||||||
check_quotas=<quote>NO</quote></programlisting>
|
|
||||||
|
|
||||||
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
||||||
configuration is simpler, and consists of only one variable. Set
|
configuration is simpler, and consists of only one variable. Set
|
||||||
the following in your <filename>/etc/rc.conf</filename>:</para>
|
the following in your <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>check_quotas=<quote>YES</quote></programlisting>
|
||||||
check_quotas=<quote>YES</quote></programlisting>
|
|
||||||
|
|
||||||
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
||||||
to enable disk quotas on a per-file system basis. This is where
|
to enable disk quotas on a per-file system basis. This is where
|
||||||
|
|
@ -710,16 +706,14 @@ check_quotas=<quote>YES</quote></programlisting>
|
||||||
<filename>/etc/fstab</filename> entry for the file system you want
|
<filename>/etc/fstab</filename> entry for the file system you want
|
||||||
to to enable quotas on. For example:</para>
|
to to enable quotas on. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||||
/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
|
||||||
|
|
||||||
<para>Similarly, to enable group quotas, use the
|
<para>Similarly, to enable group quotas, use the
|
||||||
<literal>groupquota</literal> option instead of the
|
<literal>groupquota</literal> option instead of the
|
||||||
<literal>userquota</literal> keyword. To enable both user and
|
<literal>userquota</literal> keyword. To enable both user and
|
||||||
group quotas, change the entry as follows:</para>
|
group quotas, change the entry as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||||
/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
|
||||||
|
|
||||||
<para>By default the quota files are stored in the root directory of
|
<para>By default the quota files are stored in the root directory of
|
||||||
the file system with the names <filename>quota.user</filename> and
|
the file system with the names <filename>quota.user</filename> and
|
||||||
|
|
@ -792,8 +786,7 @@ check_quotas=<quote>YES</quote></programlisting>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>edquota -u test</userinput></screen>
|
<screen>&prompt.root; <userinput>edquota -u test</userinput></screen>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Quotas for user test:
|
||||||
Quotas for user test:
|
|
||||||
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
||||||
inodes in use: 7, limits (soft = 50, hard = 60)
|
inodes in use: 7, limits (soft = 50, hard = 60)
|
||||||
/usr/var: blocks in use: 0, limits (soft = 50, hard = 75)
|
/usr/var: blocks in use: 0, limits (soft = 50, hard = 75)
|
||||||
|
|
@ -847,8 +840,7 @@ Quotas for user test:
|
||||||
<command>quota -v</command> command for a user that has quota
|
<command>quota -v</command> command for a user that has quota
|
||||||
limits on two file systems.</para>
|
limits on two file systems.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Disk quotas for user test (uid 1002):
|
||||||
Disk quotas for user test (uid 1002):
|
|
||||||
Filesystem blocks quota limit grace files quota limit grace
|
Filesystem blocks quota limit grace files quota limit grace
|
||||||
/usr 65* 50 75 5days 7 50 60
|
/usr 65* 50 75 5days 7 50 60
|
||||||
/usr/var 0 50 75 0 50 60</programlisting>
|
/usr/var 0 50 75 0 50 60</programlisting>
|
||||||
|
|
@ -879,8 +871,7 @@ Disk quotas for user test (uid 1002):
|
||||||
<para>Enable <command>rpc.rquotad</command> in
|
<para>Enable <command>rpc.rquotad</command> in
|
||||||
<filename>/etc/inetd.conf</filename> like so:</para>
|
<filename>/etc/inetd.conf</filename> like so:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||||
rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
|
||||||
|
|
||||||
<para>Now restart <command>inetd</command>:</para>
|
<para>Now restart <command>inetd</command>:</para>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/eresources/chapter.sgml,v 1.53 2001/01/15 13:16:46 joe Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/eresources/chapter.sgml,v 1.54 2001/04/01 01:17:24 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="eresources">
|
<appendix id="eresources">
|
||||||
|
|
@ -482,8 +482,7 @@
|
||||||
|
|
||||||
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe <listname> [<optional address>]</programlisting>
|
||||||
subscribe <listname> [<optional address>]</programlisting>
|
|
||||||
|
|
||||||
in the body of your message. For example, to subscribe yourself to
|
in the body of your message. For example, to subscribe yourself to
|
||||||
<literal>freebsd-announce</literal>, you'd do:</para>
|
<literal>freebsd-announce</literal>, you'd do:</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/hw/chapter.sgml,v 1.34 2000/07/13 21:03:21 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/hw/chapter.sgml,v 1.35 2000/07/24 09:37:46 alex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="hw">
|
<appendix id="hw">
|
||||||
|
|
@ -1364,8 +1364,7 @@
|
||||||
below.</para>
|
below.</para>
|
||||||
|
|
||||||
<!-- This should really be a graphic -->
|
<!-- This should really be a graphic -->
|
||||||
<programlisting>
|
<programlisting>INS8250 -> INS8250B
|
||||||
INS8250 -> INS8250B
|
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
\-> INS8250A -> INS82C50A
|
\-> INS8250A -> INS82C50A
|
||||||
|
|
@ -2609,8 +2608,7 @@ INS8250 -> INS8250B
|
||||||
<literal>options COM_MULTIPORT</literal> or it will not work very
|
<literal>options COM_MULTIPORT</literal> or it will not work very
|
||||||
well!</para>
|
well!</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio4 at isa? port 0x100 tty flags 0xb05
|
||||||
device sio4 at isa? port 0x100 tty flags 0xb05
|
|
||||||
device sio5 at isa? port 0x108 tty flags 0xb05
|
device sio5 at isa? port 0x108 tty flags 0xb05
|
||||||
device sio6 at isa? port 0x110 tty flags 0xb05
|
device sio6 at isa? port 0x110 tty flags 0xb05
|
||||||
device sio7 at isa? port 0x118 tty flags 0xb05
|
device sio7 at isa? port 0x118 tty flags 0xb05
|
||||||
|
|
@ -2667,8 +2665,7 @@ device sio11 at isa? port 0x138 tty flags 0xb05 irq 9 vector siointr<
|
||||||
<step>
|
<step>
|
||||||
<para>Add the line
|
<para>Add the line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options COM_MULTIPORT</programlisting>
|
||||||
options COM_MULTIPORT</programlisting>
|
|
||||||
|
|
||||||
to the config file.</para>
|
to the config file.</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -2684,8 +2681,7 @@ options COM_MULTIPORT</programlisting>
|
||||||
for Each port is +8 hexadecimal from the previous port, thus
|
for Each port is +8 hexadecimal from the previous port, thus
|
||||||
the 100h, 108h, 110h... addresses.</para>
|
the 100h, 108h, 110h... addresses.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio1 at isa? port 0x100 tty flags 0x1005
|
||||||
device sio1 at isa? port 0x100 tty flags 0x1005
|
|
||||||
device sio2 at isa? port 0x108 tty flags 0x1005
|
device sio2 at isa? port 0x108 tty flags 0x1005
|
||||||
device sio3 at isa? port 0x110 tty flags 0x1005
|
device sio3 at isa? port 0x110 tty flags 0x1005
|
||||||
device sio4 at isa? port 0x118 tty flags 0x1005
|
device sio4 at isa? port 0x118 tty flags 0x1005
|
||||||
|
|
@ -2918,8 +2914,7 @@ sio2: type 16550A (multiport master)</screen>
|
||||||
linkend="kernelconfig-config">kernel configuration</link>
|
linkend="kernelconfig-config">kernel configuration</link>
|
||||||
(note that your irq and iomem settings may differ).</para>
|
(note that your irq and iomem settings may differ).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||||
device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
|
|
@ -2943,8 +2938,7 @@ device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programl
|
||||||
using <literal>ttyc</literal> in place of
|
using <literal>ttyc</literal> in place of
|
||||||
<literal>ttyd</literal>. For example:</para>
|
<literal>ttyd</literal>. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
|
||||||
ttyc1 "/usr/libexec/getty std.38400" unknown on insecure
|
ttyc1 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
ttyc2 "/usr/libexec/getty std.38400" unknown on insecure
|
ttyc2 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
…
|
…
|
||||||
|
|
@ -3005,16 +2999,14 @@ ttyc7 "/usr/libexec/getty std.38400" unknown on insecure</programlisting>
|
||||||
<link linkend="kernelconfig-config">kernel configuration
|
<link linkend="kernelconfig-config">kernel configuration
|
||||||
file</link>, changing the numbers as appropriate:</para>
|
file</link>, changing the numbers as appropriate:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
||||||
device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
|
||||||
|
|
||||||
<para>Valid IRQ numbers are 9, 10, 11, 12 and 15 for SX ISA host cards
|
<para>Valid IRQ numbers are 9, 10, 11, 12 and 15 for SX ISA host cards
|
||||||
and 11, 12 and 15 for SI/XIO ISA host cards.</para>
|
and 11, 12 and 15 for SI/XIO ISA host cards.</para>
|
||||||
|
|
||||||
<para>To configure an EISA or PCI host card, use this line:</para>
|
<para>To configure an EISA or PCI host card, use this line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device si0</programlisting>
|
||||||
device si0</programlisting>
|
|
||||||
|
|
||||||
<para>After adding the configuration entry, <link
|
<para>After adding the configuration entry, <link
|
||||||
linkend="kernelconfig-building"> rebuild and install</link> your
|
linkend="kernelconfig-building"> rebuild and install</link> your
|
||||||
|
|
@ -3035,8 +3027,7 @@ device si0</programlisting>
|
||||||
need to add lines like this to <link
|
need to add lines like this to <link
|
||||||
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||||
ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>Change the terminal type as appropriate. For modems,
|
<para>Change the terminal type as appropriate. For modems,
|
||||||
|
|
@ -3552,8 +3543,7 @@ moused_port="/dev/ums0"</programlisting>
|
||||||
kernel config file. An example from the kernel config file (they
|
kernel config file. An example from the kernel config file (they
|
||||||
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># First WD compatible controller
|
||||||
# First WD compatible controller
|
|
||||||
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
||||||
disk wd0 at wdc0 drive 0
|
disk wd0 at wdc0 drive 0
|
||||||
disk wd1 at wdc0 drive 1
|
disk wd1 at wdc0 drive 1
|
||||||
|
|
@ -4253,8 +4243,7 @@ sd0(bt0:0:0): Direct-Access 1350MB (2766300 512 byte sectors)</screen>
|
||||||
config file <filename>LINT</filename> with some added comments
|
config file <filename>LINT</filename> with some added comments
|
||||||
(between []):</para>
|
(between []):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
|
||||||
#
|
#
|
||||||
# aha: Adaptec 154x
|
# aha: Adaptec 154x
|
||||||
# ahb: Adaptec 174x
|
# ahb: Adaptec 174x
|
||||||
|
|
@ -4335,8 +4324,7 @@ device cd0 at scbus? [the first ever CDROM found, no wiring]<
|
||||||
config file after upgrading from a pre-FreeBSD2.0.5.R system check
|
config file after upgrading from a pre-FreeBSD2.0.5.R system check
|
||||||
this out.</para>
|
this out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>[driver for Adaptec 174x]
|
||||||
[driver for Adaptec 174x]
|
|
||||||
controller ahb0 at isa? bio irq 11 vector ahbintr
|
controller ahb0 at isa? bio irq 11 vector ahbintr
|
||||||
|
|
||||||
[for Adaptec 154x]
|
[for Adaptec 154x]
|
||||||
|
|
@ -4381,8 +4369,7 @@ device cd0 #Only need one of these, the code dynamically grows</pro
|
||||||
SCSI bus reset. You can set this delay time in your kernel
|
SCSI bus reset. You can set this delay time in your kernel
|
||||||
configuration file using a line like:</para>
|
configuration file using a line like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
||||||
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
|
||||||
|
|
||||||
<para>This line sets the delay time to 15 seconds. On my own system
|
<para>This line sets the delay time to 15 seconds. On my own system
|
||||||
I had to use 3 seconds minimum to get my trusty old CDROM drive
|
I had to use 3 seconds minimum to get my trusty old CDROM drive
|
||||||
|
|
@ -4452,8 +4439,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
|
|
||||||
<para>Look for a struct that is initialized like below:</para>
|
<para>Look for a struct that is initialized like below:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{
|
||||||
{
|
|
||||||
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
||||||
"mx1", SC_ONE_LU
|
"mx1", SC_ONE_LU
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
@ -4462,8 +4448,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
as a SCSI disk and has firmware revision 123 you would add
|
as a SCSI disk and has firmware revision 123 you would add
|
||||||
something like:</para>
|
something like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{
|
||||||
{
|
|
||||||
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
||||||
"sd", SC_MORE_LUS
|
"sd", SC_MORE_LUS
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
@ -4525,8 +4510,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
the right, read: fastest feasible, transfer rate. This option is
|
the right, read: fastest feasible, transfer rate. This option is
|
||||||
disabled by default:</para>
|
disabled by default:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||||
options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
|
||||||
|
|
||||||
<para>Check the man pages for the host adapter that you use. Or
|
<para>Check the man pages for the host adapter that you use. Or
|
||||||
better still, use the ultimate documentation (read: driver
|
better still, use the ultimate documentation (read: driver
|
||||||
|
|
@ -5064,8 +5048,7 @@ options "TUNE_1542" #dynamic tune of bus DMA speed</programli
|
||||||
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
||||||
Build and install a new kernel.</para>
|
Build and install a new kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*** 4831,4835 ****
|
||||||
*** 4831,4835 ****
|
|
||||||
};
|
};
|
||||||
|
|
||||||
! if (np->latetime>4) {
|
! if (np->latetime>4) {
|
||||||
|
|
@ -5525,8 +5508,7 @@ options "TUNE_1542" #dynamic tune of bus DMA speed</programli
|
||||||
tapes at the end of a volume. This shell script can be used to
|
tapes at the end of a volume. This shell script can be used to
|
||||||
change tapes:</para>
|
change tapes:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/install/chapter.sgml,v 1.63 2000/11/29 14:41:04 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/install/chapter.sgml,v 1.64 2000/12/15 21:52:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="install">
|
<chapter id="install">
|
||||||
|
|
@ -253,8 +253,7 @@
|
||||||
need to add the following line to the password file (using the
|
need to add the following line to the password file (using the
|
||||||
<command>vipw</command> command):</para>
|
<command>vipw</command> command):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
|
||||||
|
|
||||||
<para>Anyone with network connectivity to your machine can now
|
<para>Anyone with network connectivity to your machine can now
|
||||||
chose a media type of FTP and type in
|
chose a media type of FTP and type in
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelconfig/chapter.sgml,v 1.37 2001/01/24 12:22:38 ben Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelconfig/chapter.sgml,v 1.38 2001/02/13 21:28:14 peter Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelconfig">
|
<chapter id="kernelconfig">
|
||||||
|
|
@ -253,8 +253,7 @@
|
||||||
closely. For details of all the possible kernel options, see
|
closely. For details of all the possible kernel options, see
|
||||||
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
||||||
#
|
#
|
||||||
# For more information on this file, please read the handbook section on
|
# For more information on this file, please read the handbook section on
|
||||||
|
|
@ -282,8 +281,7 @@
|
||||||
<literal>i386</literal>, <literal>alpha</literal>, or
|
<literal>i386</literal>, <literal>alpha</literal>, or
|
||||||
<literal>pc98</literal>.</para>
|
<literal>pc98</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cpu I386_CPU
|
||||||
cpu I386_CPU
|
|
||||||
cpu I486_CPU
|
cpu I486_CPU
|
||||||
cpu I586_CPU
|
cpu I586_CPU
|
||||||
cpu I686_CPU</programlisting>
|
cpu I686_CPU</programlisting>
|
||||||
|
|
@ -299,8 +297,7 @@ cpu I686_CPU</programlisting>
|
||||||
<para>The Alpha architecture has different values for
|
<para>The Alpha architecture has different values for
|
||||||
<literal>cpu_type</literal>. They include:</para>
|
<literal>cpu_type</literal>. They include:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cpu EV4
|
||||||
cpu EV4
|
|
||||||
cpu EV5</programlisting>
|
cpu EV5</programlisting>
|
||||||
|
|
||||||
<para>If you are using an Alpha machine, you should be using one of
|
<para>If you are using an Alpha machine, you should be using one of
|
||||||
|
|
@ -355,8 +352,7 @@ cpu EV5</programlisting>
|
||||||
<para>Everything that follows is more or less optional. See the notes
|
<para>Everything that follows is more or less optional. See the notes
|
||||||
underneath or next to each option for more information.</para>
|
underneath or next to each option for more information.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
|
||||||
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||||
|
|
||||||
<para>This line allows the kernel to simulate a math co-processor if
|
<para>This line allows the kernel to simulate a math co-processor if
|
||||||
|
|
@ -374,28 +370,24 @@ options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||||
which is not included by default for licensing reasons.</para>
|
which is not included by default for licensing reasons.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options INET #InterNETworking</programlisting>
|
||||||
options INET #InterNETworking</programlisting>
|
|
||||||
|
|
||||||
<para>Networking support. Leave this in, even if you do not plan to
|
<para>Networking support. Leave this in, even if you do not plan to
|
||||||
be connected to a network. Most programs require at least loopback
|
be connected to a network. Most programs require at least loopback
|
||||||
networking (i.e., making network connections within your PC), so
|
networking (i.e., making network connections within your PC), so
|
||||||
this is essentially mandatory.</para>
|
this is essentially mandatory.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options INET6 #IPv6 communications protocols</programlisting>
|
||||||
options INET6 #IPv6 communications protocols</programlisting>
|
|
||||||
|
|
||||||
<para>This enables the IPv6 communication protocols.</para>
|
<para>This enables the IPv6 communication protocols.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options FFS #Berkeley Fast Filesystem
|
||||||
options FFS #Berkeley Fast Filesystem
|
|
||||||
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
||||||
|
|
||||||
<para>This is the basic hard drive filesystem. Leave it in if you
|
<para>This is the basic hard drive filesystem. Leave it in if you
|
||||||
boot from the hard disk.</para>
|
boot from the hard disk.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options MFS #Memory Filesystem
|
||||||
options MFS #Memory Filesystem
|
|
||||||
options MD_ROOT #MD is a potential root device</programlisting>
|
options MD_ROOT #MD is a potential root device</programlisting>
|
||||||
|
|
||||||
<para>This is the memory-mapped filesystem. This is basically a RAM
|
<para>This is the memory-mapped filesystem. This is basically a RAM
|
||||||
|
|
@ -413,16 +405,14 @@ options MD_ROOT #MD is a potential root device</programlisting>
|
||||||
<para>Now you simply need to either reboot, or run the command
|
<para>Now you simply need to either reboot, or run the command
|
||||||
<command>mount /tmp</command>.</para>
|
<command>mount /tmp</command>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options NFS #Network Filesystem
|
||||||
options NFS #Network Filesystem
|
|
||||||
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
||||||
|
|
||||||
<para>The network filesystem. Unless you plan to mount partitions
|
<para>The network filesystem. Unless you plan to mount partitions
|
||||||
from a UNIX file server over TCP/IP, you can comment these
|
from a UNIX file server over TCP/IP, you can comment these
|
||||||
out.</para>
|
out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||||
options MSDOSFS #MSDOS Filesystem</programlisting>
|
|
||||||
|
|
||||||
<para>The MS-DOS filesystem. Unless you plan to mount a DOS formatted
|
<para>The MS-DOS filesystem. Unless you plan to mount a DOS formatted
|
||||||
hard drive partition at boot time, you can safely comment this out.
|
hard drive partition at boot time, you can safely comment this out.
|
||||||
|
|
@ -433,8 +423,7 @@ options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||||
unmount them (and does not require <literal>MSDOSFS</literal> at
|
unmount them (and does not require <literal>MSDOSFS</literal> at
|
||||||
all).</para>
|
all).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options CD9660 #ISO 9660 Filesystem
|
||||||
options CD9660 #ISO 9660 Filesystem
|
|
||||||
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
||||||
|
|
||||||
<para>The ISO 9660 filesystem for CDROMs. Comment it out if you do
|
<para>The ISO 9660 filesystem for CDROMs. Comment it out if you do
|
||||||
|
|
@ -442,22 +431,19 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
|
||||||
will be dynamically loaded the first time you mount a data CD).
|
will be dynamically loaded the first time you mount a data CD).
|
||||||
Audio CDs do not need this filesystem.</para>
|
Audio CDs do not need this filesystem.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options PROCFS #Process filesystem</programlisting>
|
||||||
options PROCFS #Process filesystem</programlisting>
|
|
||||||
|
|
||||||
<para>The process filesystem. This is a <quote>pretend</quote>
|
<para>The process filesystem. This is a <quote>pretend</quote>
|
||||||
filesystem mounted on <filename>/proc</filename> which allows
|
filesystem mounted on <filename>/proc</filename> which allows
|
||||||
programs like &man.ps.1; to give you more information on what
|
programs like &man.ps.1; to give you more information on what
|
||||||
processes are running.</para>
|
processes are running.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||||
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
|
||||||
|
|
||||||
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
||||||
act strangely if you comment this out.</para>
|
act strangely if you comment this out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||||
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
|
||||||
|
|
||||||
<para>This causes the kernel to pause for 15 seconds before probing
|
<para>This causes the kernel to pause for 15 seconds before probing
|
||||||
each SCSI device in your system. If you only have IDE hard drives,
|
each SCSI device in your system. If you only have IDE hard drives,
|
||||||
|
|
@ -466,8 +452,7 @@ options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</program
|
||||||
you do this, and FreeBSD has trouble recognizing your SCSI devices,
|
you do this, and FreeBSD has trouble recognizing your SCSI devices,
|
||||||
you will have to raise it back up.</para>
|
you will have to raise it back up.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options UCONSOLE #Allow users to grab the console</programlisting>
|
||||||
options UCONSOLE #Allow users to grab the console</programlisting>
|
|
||||||
|
|
||||||
<para>Allow users to grab the console, which is useful for X users.
|
<para>Allow users to grab the console, which is useful for X users.
|
||||||
For example, you can create a console xterm by typing <command>xterm
|
For example, you can create a console xterm by typing <command>xterm
|
||||||
|
|
@ -475,26 +460,22 @@ options UCONSOLE #Allow users to grab the console</programli
|
||||||
<command>talk</command>, and any other messages you receive, as well
|
<command>talk</command>, and any other messages you receive, as well
|
||||||
as any console messages sent by the kernel.</para>
|
as any console messages sent by the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options USERCONFIG #boot -c editor</programlisting>
|
||||||
options USERCONFIG #boot -c editor</programlisting>
|
|
||||||
|
|
||||||
<para>This option allows you to boot the configuration editor from the
|
<para>This option allows you to boot the configuration editor from the
|
||||||
boot menu.</para>
|
boot menu.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||||
options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
|
||||||
|
|
||||||
<para>This option allows you to boot the visual configuration editor
|
<para>This option allows you to boot the visual configuration editor
|
||||||
from the boot menu.</para>
|
from the boot menu.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options KTRACE #ktrace(1) support</programlisting>
|
||||||
options KTRACE #ktrace(1) support</programlisting>
|
|
||||||
|
|
||||||
<para>This enables kernel process tracing, which is useful in
|
<para>This enables kernel process tracing, which is useful in
|
||||||
debugging.</para>
|
debugging.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||||
options SYSVSHM #SYSV-style shared memory</programlisting>
|
|
||||||
|
|
||||||
<para>This option provides for System V shared memory. The most
|
<para>This option provides for System V shared memory. The most
|
||||||
common use of this is the XSHM extension in X, which many
|
common use of this is the XSHM extension in X, which many
|
||||||
|
|
@ -502,14 +483,12 @@ options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||||
extra speed. If you use X, you'll definitely want to include
|
extra speed. If you use X, you'll definitely want to include
|
||||||
this.</para>
|
this.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||||
options SYSVSEM #SYSV-style semaphores</programlisting>
|
|
||||||
|
|
||||||
<para>Support for System V semaphores. Less commonly used but only
|
<para>Support for System V semaphores. Less commonly used but only
|
||||||
adds a few hundred bytes to the kernel.</para>
|
adds a few hundred bytes to the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVMSG #SYSV-style message queues</programlisting>
|
||||||
options SYSVMSG #SYSV-style message queues</programlisting>
|
|
||||||
|
|
||||||
<para>Support for System V messages. Again, only adds a few hundred
|
<para>Support for System V messages. Again, only adds a few hundred
|
||||||
bytes to the kernel.</para>
|
bytes to the kernel.</para>
|
||||||
|
|
@ -519,30 +498,26 @@ options SYSVMSG #SYSV-style message queues</programlisting>
|
||||||
these System V facilities.</para>
|
these System V facilities.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options P1003_1B #Posix P1003_1B real-time extentions
|
||||||
options P1003_1B #Posix P1003_1B real-time extentions
|
|
||||||
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
||||||
|
|
||||||
<para>Real-time extensions added in the 1993 POSIX. Certain
|
<para>Real-time extensions added in the 1993 POSIX. Certain
|
||||||
applications in the ports collection use these (such as Star
|
applications in the ports collection use these (such as Star
|
||||||
Office).</para>
|
Office).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||||
options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
|
||||||
|
|
||||||
<para>This option enables ICMP error response bandwidth limiting. You
|
<para>This option enables ICMP error response bandwidth limiting. You
|
||||||
typically want this option as it will help protect the machine from
|
typically want this option as it will help protect the machine from
|
||||||
denial of service packet attacks.</para>
|
denial of service packet attacks.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># To make an SMP kernel, the next two are needed
|
||||||
# To make an SMP kernel, the next two are needed
|
|
||||||
#options SMP # Symmetric MultiProcessor Kernel
|
#options SMP # Symmetric MultiProcessor Kernel
|
||||||
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
||||||
|
|
||||||
<para>The above are both required for SMP support.</para>
|
<para>The above are both required for SMP support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Optionally these may need tweaked, (defaults shown):
|
||||||
# Optionally these may need tweaked, (defaults shown):
|
|
||||||
#options NCPU=2 # number of CPUs
|
#options NCPU=2 # number of CPUs
|
||||||
#options NBUS=4 # number of busses
|
#options NBUS=4 # number of busses
|
||||||
#options NAPIC=1 # number of IO APICs
|
#options NAPIC=1 # number of IO APICs
|
||||||
|
|
@ -568,8 +543,7 @@ options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||||
auto-detection of PCI cards and gatewaying from the PCI to ISA
|
auto-detection of PCI cards and gatewaying from the PCI to ISA
|
||||||
bus.</para>
|
bus.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Floppy drives
|
||||||
# Floppy drives
|
|
||||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||||
device fd0 at fdc0 drive 0
|
device fd0 at fdc0 drive 0
|
||||||
device fd1 at fdc0 drive 1</programlisting>
|
device fd1 at fdc0 drive 1</programlisting>
|
||||||
|
|
@ -585,8 +559,7 @@ device fd1 at fdc0 drive 1</programlisting>
|
||||||
one <literal>device ata</literal> line for the kernel to detect all
|
one <literal>device ata</literal> line for the kernel to detect all
|
||||||
PCI ATA/ATAPI devices on modern machines.</para>
|
PCI ATA/ATAPI devices on modern machines.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atadisk # ATA disk drives</programlisting>
|
||||||
device atadisk # ATA disk drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI disk drives.</para>
|
ATAPI disk drives.</para>
|
||||||
|
|
@ -597,40 +570,34 @@ device atapicd # ATAPI CDROM drives</programlisting>
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI CDROM drives.</para>
|
ATAPI CDROM drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atapifd # ATAPI floppy drives</programlisting>
|
||||||
device atapifd # ATAPI floppy drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI floppy drives.</para>
|
ATAPI floppy drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atapist # ATAPI tape drives</programlisting>
|
||||||
device atapist # ATAPI tape drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI tape drives.</para>
|
ATAPI tape drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||||
options ATA_STATIC_ID #Static device numbering</programlisting>
|
|
||||||
|
|
||||||
<para>This makes the controller number static (like the old driver) or
|
<para>This makes the controller number static (like the old driver) or
|
||||||
else the device numbers are dynamically allocated.</para>
|
else the device numbers are dynamically allocated.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||||
#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
|
||||||
|
|
||||||
<para>This enables DMA on the ATAPI device. Since many ATAPI devices
|
<para>This enables DMA on the ATAPI device. Since many ATAPI devices
|
||||||
claim to support DMA, but it does not actually work, this is turned
|
claim to support DMA, but it does not actually work, this is turned
|
||||||
off by default.</para>
|
off by default.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># ATA and ATAPI devices
|
||||||
# ATA and ATAPI devices
|
|
||||||
device ata0 at isa? port IO_WD1 irq 14
|
device ata0 at isa? port IO_WD1 irq 14
|
||||||
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
||||||
|
|
||||||
<para>Use the above for older, non-PCI systems.</para>
|
<para>Use the above for older, non-PCI systems.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI Controllers
|
||||||
# SCSI Controllers
|
|
||||||
device ahb # EISA AHA1742 family
|
device ahb # EISA AHA1742 family
|
||||||
device ahc # AHA2940 and onboard AIC7xxx devices
|
device ahc # AHA2940 and onboard AIC7xxx devices
|
||||||
device amd # AMD 53C974 (Teckram DC-390(T))
|
device amd # AMD 53C974 (Teckram DC-390(T))
|
||||||
|
|
@ -649,8 +616,7 @@ device aic0 at isa?</programlisting>
|
||||||
system. If you have an IDE only system, you can remove these
|
system. If you have an IDE only system, you can remove these
|
||||||
altogether.</para>
|
altogether.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI peripherals
|
||||||
# SCSI peripherals
|
|
||||||
device scbus # SCSI bus (required)
|
device scbus # SCSI bus (required)
|
||||||
device da # Direct Access (disks)
|
device da # Direct Access (disks)
|
||||||
device sa # Sequential Access (tape etc)
|
device sa # Sequential Access (tape etc)
|
||||||
|
|
@ -661,8 +627,7 @@ access)</programlisting>
|
||||||
<para>SCSI peripherals. Again, comment out any you do not have, or if
|
<para>SCSI peripherals. Again, comment out any you do not have, or if
|
||||||
you have only IDE hardware, you can remove them completely.</para>
|
you have only IDE hardware, you can remove them completely.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># RAID controllers
|
||||||
# RAID controllers
|
|
||||||
device ida # Compaq Smart RAID
|
device ida # Compaq Smart RAID
|
||||||
device amr # AMI MegaRAID
|
device amr # AMI MegaRAID
|
||||||
device mlx # Mylex DAC960 family</programlisting>
|
device mlx # Mylex DAC960 family</programlisting>
|
||||||
|
|
@ -670,8 +635,7 @@ device mlx # Mylex DAC960 family</programlisting>
|
||||||
<para>Supported RAID controllers. If you do not have any of these,
|
<para>Supported RAID controllers. If you do not have any of these,
|
||||||
you can comment them out or remove them.</para>
|
you can comment them out or remove them.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
|
||||||
device atkbdc0 at isa? port IO_KBD</programlisting>
|
device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||||
|
|
||||||
<para>The keyboard controller (<literal>atkbdc</literal>) provides I/O
|
<para>The keyboard controller (<literal>atkbdc</literal>) provides I/O
|
||||||
|
|
@ -680,16 +644,14 @@ device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||||
(<literal>atkbd</literal>) and the PS/2 pointing device driver
|
(<literal>atkbd</literal>) and the PS/2 pointing device driver
|
||||||
(<literal>psm</literal>).</para>
|
(<literal>psm</literal>).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atkbd0 at atkbdc? irq 1</programlisting>
|
||||||
device atkbd0 at atkbdc? irq 1</programlisting>
|
|
||||||
|
|
||||||
<para>The <literal>atkbd</literal> driver, together with
|
<para>The <literal>atkbd</literal> driver, together with
|
||||||
<literal>atkbdc</literal> controller, provides access to the AT 84
|
<literal>atkbdc</literal> controller, provides access to the AT 84
|
||||||
keyboard or the AT enhanced keyboard which is connected to the AT
|
keyboard or the AT enhanced keyboard which is connected to the AT
|
||||||
keyboard controller.</para>
|
keyboard controller.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device psm0 at atkbdc? irq 12</programlisting>
|
||||||
device psm0 at atkbdc? irq 12</programlisting>
|
|
||||||
|
|
||||||
<para>Use this device if your mouse plugs into the PS/2 mouse
|
<para>Use this device if your mouse plugs into the PS/2 mouse
|
||||||
port.</para>
|
port.</para>
|
||||||
|
|
@ -698,15 +660,13 @@ device psm0 at atkbdc? irq 12</programlisting>
|
||||||
|
|
||||||
<para>The video card driver.</para>
|
<para>The video card driver.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># splash screen/screen saver
|
||||||
# splash screen/screen saver
|
|
||||||
pseudo-device splash</programlisting>
|
pseudo-device splash</programlisting>
|
||||||
|
|
||||||
<para>Splash screen at start up! Screen savers require this
|
<para>Splash screen at start up! Screen savers require this
|
||||||
too.</para>
|
too.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># syscons is the default console driver, resembling an SCO console
|
||||||
# syscons is the default console driver, resembling an SCO console
|
|
||||||
device sc0 at isa?</programlisting>
|
device sc0 at isa?</programlisting>
|
||||||
|
|
||||||
<para><literal>sc0</literal> is the default console driver, which
|
<para><literal>sc0</literal> is the default console driver, which
|
||||||
|
|
@ -718,8 +678,7 @@ device sc0 at isa?</programlisting>
|
||||||
<envar>TERM</envar> variable to <literal>scoansi</literal> if
|
<envar>TERM</envar> variable to <literal>scoansi</literal> if
|
||||||
full-screen programs have trouble running under this console.</para>
|
full-screen programs have trouble running under this console.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||||
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
|
||||||
#device vt0 at isa?
|
#device vt0 at isa?
|
||||||
#options XSERVER # support for X server on a vt console
|
#options XSERVER # support for X server on a vt console
|
||||||
#options FAT_CURSOR # start with block cursor
|
#options FAT_CURSOR # start with block cursor
|
||||||
|
|
@ -737,8 +696,7 @@ device sc0 at isa?</programlisting>
|
||||||
device are often not available — <literal>vt100</literal>
|
device are often not available — <literal>vt100</literal>
|
||||||
should be available on virtually any platform.</para>
|
should be available on virtually any platform.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Floating point support - do not disable.
|
||||||
# Floating point support - do not disable.
|
|
||||||
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||||
|
|
||||||
<para><literal>npx0</literal> is the interface to the floating point
|
<para><literal>npx0</literal> is the interface to the floating point
|
||||||
|
|
@ -746,14 +704,12 @@ device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||||
the software math emulator. This is <emphasis>not</emphasis>
|
the software math emulator. This is <emphasis>not</emphasis>
|
||||||
optional.</para>
|
optional.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Power management support (see LINT for more options)
|
||||||
# Power management support (see LINT for more options)
|
|
||||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
||||||
|
|
||||||
<para>Advanced Power Management support. Useful for laptops.</para>
|
<para>Advanced Power Management support. Useful for laptops.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCCARD (PCMCIA) support
|
||||||
# PCCARD (PCMCIA) support
|
|
||||||
device card
|
device card
|
||||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||||
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</programlisting>
|
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</programlisting>
|
||||||
|
|
@ -761,8 +717,7 @@ device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</progra
|
||||||
<para>PCMCIA support. You need this if you are installing on a
|
<para>PCMCIA support. You need this if you are installing on a
|
||||||
laptop.</para>
|
laptop.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Serial (COM) ports
|
||||||
# Serial (COM) ports
|
|
||||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||||
device sio1 at isa? port IO_COM2 irq 3
|
device sio1 at isa? port IO_COM2 irq 3
|
||||||
device sio2 at isa? disable port IO_COM3 irq 5
|
device sio2 at isa? disable port IO_COM3 irq 5
|
||||||
|
|
@ -789,19 +744,16 @@ device sio3 at isa? disable port IO_COM4 irq 9</programlisting>
|
||||||
used.</para>
|
used.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Parallel port
|
||||||
# Parallel port
|
|
||||||
device ppc0 at isa? irq 7</programlisting>
|
device ppc0 at isa? irq 7</programlisting>
|
||||||
|
|
||||||
<para>This is the ISA-bus parallel port interface.</para>
|
<para>This is the ISA-bus parallel port interface.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device ppbus # Parallel port bus (required)</programlisting>
|
||||||
device ppbus # Parallel port bus (required)</programlisting>
|
|
||||||
|
|
||||||
<para>Provides support for the parallel port bus.</para>
|
<para>Provides support for the parallel port bus.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt # Printer</programlisting>
|
||||||
device lpt # Printer</programlisting>
|
|
||||||
|
|
||||||
<para>Support for parallel port printers.</para>
|
<para>Support for parallel port printers.</para>
|
||||||
|
|
||||||
|
|
@ -810,26 +762,22 @@ device lpt # Printer</programlisting>
|
||||||
support.</para>
|
support.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device plip # TCP/IP over parallel</programlisting>
|
||||||
device plip # TCP/IP over parallel</programlisting>
|
|
||||||
|
|
||||||
<para>This is the driver for the parallel network interface.</para>
|
<para>This is the driver for the parallel network interface.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device ppi # Parallel port interface device</programlisting>
|
||||||
device ppi # Parallel port interface device</programlisting>
|
|
||||||
|
|
||||||
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
||||||
I/O.</para>
|
I/O.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#device vpo # Requires scbus and da</programlisting>
|
||||||
#device vpo # Requires scbus and da</programlisting>
|
|
||||||
|
|
||||||
<para>This is for an Iomega Zip drive. It requires
|
<para>This is for an Iomega Zip drive. It requires
|
||||||
<literal>scbus</literal> and <literal>da</literal> support. Best
|
<literal>scbus</literal> and <literal>da</literal> support. Best
|
||||||
performance is achieved with ports in EPP 1.9 mode.</para>
|
performance is achieved with ports in EPP 1.9 mode.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCI Ethernet NICs.
|
||||||
# PCI Ethernet NICs.
|
|
||||||
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
||||||
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
||||||
device tx # SMC 9432TX (83c170 <quote>EPIC</quote>)
|
device tx # SMC 9432TX (83c170 <quote>EPIC</quote>)
|
||||||
|
|
@ -839,8 +787,7 @@ device wx # Intel Gigabit Ethernet Card (<quote>Wiseman</quote>
|
||||||
<para>Various PCI network card drivers. Comment out or remove any of
|
<para>Various PCI network card drivers. Comment out or remove any of
|
||||||
these not present in your system.</para>
|
these not present in your system.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCI Ethernet NICs that use the common MII bus controller code.
|
||||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
|
||||||
device miibus # MII bus support</programlisting>
|
device miibus # MII bus support</programlisting>
|
||||||
|
|
||||||
<para>MII bus support is required for some PCI 10/100 ethernet NICs,
|
<para>MII bus support is required for some PCI 10/100 ethernet NICs,
|
||||||
|
|
@ -851,8 +798,7 @@ device miibus # MII bus support</programlisting>
|
||||||
including a generic one for PHYs that are not specifically handled
|
including a generic one for PHYs that are not specifically handled
|
||||||
by an individual driver</para>
|
by an individual driver</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device dc # DEC/Intel 21143 and various workalikes
|
||||||
device dc # DEC/Intel 21143 and various workalikes
|
|
||||||
device rl # RealTek 8129/8139
|
device rl # RealTek 8129/8139
|
||||||
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
||||||
device sis # Silicon Integrated Systems SiS 900/SiS 7016
|
device sis # Silicon Integrated Systems SiS 900/SiS 7016
|
||||||
|
|
@ -864,8 +810,7 @@ device xl # 3Com 3c90x (<quote>Boomerang</quote>, <quote>Cyclon
|
||||||
|
|
||||||
<para>Drivers that use the MII bus controller code.</para>
|
<para>Drivers that use the MII bus controller code.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># ISA Ethernet NICs.
|
||||||
# ISA Ethernet NICs.
|
|
||||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||||
device ex
|
device ex
|
||||||
device ep
|
device ep
|
||||||
|
|
@ -893,8 +838,7 @@ device sn0 at isa? port 0x300 irq 10
|
||||||
<filename>/usr/src/sys/i386/conf/LINT</filename> for which cards are
|
<filename>/usr/src/sys/i386/conf/LINT</filename> for which cards are
|
||||||
supported by which driver.</para>
|
supported by which driver.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Pseudo devices - the number indicates how many units to allocated.
|
||||||
# Pseudo devices - the number indicates how many units to allocated.
|
|
||||||
pseudo-device loop # Network loopback</programlisting>
|
pseudo-device loop # Network loopback</programlisting>
|
||||||
|
|
||||||
<para>This is the generic loopback device for TCP/IP. If you telnet
|
<para>This is the generic loopback device for TCP/IP. If you telnet
|
||||||
|
|
@ -902,14 +846,12 @@ pseudo-device loop # Network loopback</programlisting>
|
||||||
role="ipaddr">127.0.0.1</hostid>) it will come back at you through
|
role="ipaddr">127.0.0.1</hostid>) it will come back at you through
|
||||||
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device ether # Ethernet support</programlisting>
|
||||||
pseudo-device ether # Ethernet support</programlisting>
|
|
||||||
|
|
||||||
<para><literal>ether</literal> is only needed if you have an Ethernet
|
<para><literal>ether</literal> is only needed if you have an Ethernet
|
||||||
card. It includes generic Ethernet protocol code.</para>
|
card. It includes generic Ethernet protocol code.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||||
pseudo-device sl 1 # Kernel SLIP</programlisting>
|
|
||||||
|
|
||||||
<para><literal>sl</literal> is for SLIP support. This has been almost
|
<para><literal>sl</literal> is for SLIP support. This has been almost
|
||||||
entirely supplanted by PPP, which is easier to set up, better suited
|
entirely supplanted by PPP, which is easier to set up, better suited
|
||||||
|
|
@ -917,8 +859,7 @@ pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||||
<replaceable>number</replaceable> after <literal>sl</literal>
|
<replaceable>number</replaceable> after <literal>sl</literal>
|
||||||
specifies how many simultaneous SLIP sessions to support.</para>
|
specifies how many simultaneous SLIP sessions to support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||||
pseudo-device ppp 1 # Kernel PPP</programlisting>
|
|
||||||
|
|
||||||
<para>This is for kernel PPP support for dial-up connections. There
|
<para>This is for kernel PPP support for dial-up connections. There
|
||||||
is also a version of PPP implemented as a userland application that
|
is also a version of PPP implemented as a userland application that
|
||||||
|
|
@ -927,8 +868,7 @@ pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||||
<literal>ppp</literal> specifies how many simultaneous PPP
|
<literal>ppp</literal> specifies how many simultaneous PPP
|
||||||
connections to support.</para>
|
connections to support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device tun # Packet tunnel.</programlisting>
|
||||||
pseudo-device tun # Packet tunnel.</programlisting>
|
|
||||||
|
|
||||||
<para>This is used by the userland PPP software. The
|
<para>This is used by the userland PPP software. The
|
||||||
<replaceable>number</replaceable> after <literal>tun</literal>
|
<replaceable>number</replaceable> after <literal>tun</literal>
|
||||||
|
|
@ -950,26 +890,22 @@ pseudo-device pty # Pseudo-ttys (telnet etc)</programlisting>
|
||||||
and/or remote logins, be sure to increase this number accordingly,
|
and/or remote logins, be sure to increase this number accordingly,
|
||||||
up to a maximum of 256.</para>
|
up to a maximum of 256.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||||
pseudo-device md # Memory <quote>disks</quote></programlisting>
|
|
||||||
|
|
||||||
<para>Memory disk pseudo-devices.</para>
|
<para>Memory disk pseudo-devices.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
|
||||||
|
|
||||||
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
||||||
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
||||||
tunneling.</para>
|
tunneling.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
|
||||||
|
|
||||||
<para>This pseudo-device captures packets that are sent to it and
|
<para>This pseudo-device captures packets that are sent to it and
|
||||||
diverts them to the IPv4/IPv6 translation daemon.</para>
|
diverts them to the IPv4/IPv6 translation daemon.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
|
||||||
# Be aware of the administrative consequences of enabling this!
|
# Be aware of the administrative consequences of enabling this!
|
||||||
pseudo-device bpf # Berkeley packet filter</programlisting>
|
pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
|
|
||||||
|
|
@ -979,8 +915,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
can be captured to disk and or examined with the &man.tcpdump.1;
|
can be captured to disk and or examined with the &man.tcpdump.1;
|
||||||
program.</para>
|
program.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># USB support
|
||||||
# USB support
|
|
||||||
#device uhci # UHCI PCI->USB interface
|
#device uhci # UHCI PCI->USB interface
|
||||||
#device ohci # OHCI PCI->USB interface
|
#device ohci # OHCI PCI->USB interface
|
||||||
#device usb # USB Bus (required)
|
#device usb # USB Bus (required)
|
||||||
|
|
@ -1020,8 +955,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
<para>Suppose you add the IDE CD-ROM support to the kernel. The line
|
<para>Suppose you add the IDE CD-ROM support to the kernel. The line
|
||||||
to add is:</para>
|
to add is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device acd0</programlisting>
|
||||||
device acd0</programlisting>
|
|
||||||
|
|
||||||
<para>This means that you should look for some entries that start with
|
<para>This means that you should look for some entries that start with
|
||||||
<filename>acd0</filename> in the <filename>/dev</filename>
|
<filename>acd0</filename> in the <filename>/dev</filename>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.28 2000/11/15 12:42:07 des Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.29 2001/01/23 12:25:31 des Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kerneldebug">
|
<chapter id="kerneldebug">
|
||||||
|
|
@ -272,8 +272,7 @@
|
||||||
and edit your configuration file. Uncomment (or add, if it does not
|
and edit your configuration file. Uncomment (or add, if it does not
|
||||||
exist) the following line</para>
|
exist) the following line</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
|
||||||
|
|
||||||
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
||||||
there will be some other object files rebuild, for example
|
there will be some other object files rebuild, for example
|
||||||
|
|
@ -312,8 +311,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
|
||||||
|
|
||||||
<para>To configure your kernel to include DDB, add the option line
|
<para>To configure your kernel to include DDB, add the option line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options DDB</programlisting>
|
||||||
options DDB</programlisting>
|
|
||||||
|
|
||||||
to your config file, and rebuild. (See <link
|
to your config file, and rebuild. (See <link
|
||||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.15 2000/06/08 01:56:11 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.16 2000/06/14 00:47:36 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelopts">
|
<chapter id="kernelopts">
|
||||||
|
|
@ -37,8 +37,7 @@
|
||||||
concept in mind, i.e., the default can be overridden by the
|
concept in mind, i.e., the default can be overridden by the
|
||||||
config option. This is usually done with something like:</para>
|
config option. This is usually done with something like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifndef THIS_OPTION
|
||||||
#ifndef THIS_OPTION
|
|
||||||
#define THIS_OPTION (some_default_value)
|
#define THIS_OPTION (some_default_value)
|
||||||
#endif /* THIS_OPTION */</programlisting>
|
#endif /* THIS_OPTION */</programlisting>
|
||||||
|
|
||||||
|
|
@ -52,8 +51,7 @@
|
||||||
<para>It is also possible to create value-less options that simply enable
|
<para>It is also possible to create value-less options that simply enable
|
||||||
or disable a particular piece of code by embracing it in</para>
|
or disable a particular piece of code by embracing it in</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifdef THAT_OPTION
|
||||||
#ifdef THAT_OPTION
|
|
||||||
|
|
||||||
[your code here]
|
[your code here]
|
||||||
|
|
||||||
|
|
@ -68,8 +66,7 @@
|
||||||
is at least a single <literal>#ifdef</literal> referencing it...
|
is at least a single <literal>#ifdef</literal> referencing it...
|
||||||
However, it's unlikely that many people would put</para>
|
However, it's unlikely that many people would put</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options notyet,notdef</programlisting>
|
||||||
options notyet,notdef</programlisting>
|
|
||||||
|
|
||||||
<para>in their config file, and then wonder why the kernel compilation
|
<para>in their config file, and then wonder why the kernel compilation
|
||||||
falls over. <!-- smiley -->:-)</para>
|
falls over. <!-- smiley -->:-)</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/l10n/chapter.sgml,v 1.42 2000/12/13 04:56:07 kevlo Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/l10n/chapter.sgml,v 1.43 2001/03/09 16:57:48 keichii Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="l10n">
|
<chapter id="l10n">
|
||||||
|
|
@ -79,8 +79,7 @@
|
||||||
Language Code, Country Code, and Encoding. Locale names are
|
Language Code, Country Code, and Encoding. Locale names are
|
||||||
constructed from these parts as follows:</para>
|
constructed from these parts as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||||
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Language and Country Codes</title>
|
<title>Language and Country Codes</title>
|
||||||
|
|
@ -231,8 +230,7 @@
|
||||||
directory which has both variables set for Latin-1
|
directory which has both variables set for Latin-1
|
||||||
encoding:</para>
|
encoding:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>german:German User:\
|
||||||
german:German User:\
|
|
||||||
:charset=ISO-8859-1:\
|
:charset=ISO-8859-1:\
|
||||||
:lang=de_DE.ISO_8859-1:</programlisting>
|
:lang=de_DE.ISO_8859-1:</programlisting>
|
||||||
|
|
||||||
|
|
@ -242,8 +240,7 @@ german:German User:\
|
||||||
more variables set because some software does not respect
|
more variables set because some software does not respect
|
||||||
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#Users who do not wish to use monetary units or time formats
|
||||||
#Users who do not wish to use monetary units or time formats
|
|
||||||
#of Taiwan can manually change each variable
|
#of Taiwan can manually change each variable
|
||||||
taiwan:Taiwanese User:\
|
taiwan:Taiwanese User:\
|
||||||
lang=zh_TW.Big5:\
|
lang=zh_TW.Big5:\
|
||||||
|
|
@ -268,8 +265,7 @@ taiwan:Taiwanese User:\
|
||||||
correct language user's class. Make sure these settings
|
correct language user's class. Make sure these settings
|
||||||
appear in <filename>/etc/login.conf</filename>:</para>
|
appear in <filename>/etc/login.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||||
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
|
||||||
:charset=<replaceable>MIME_charset</replaceable>:\
|
:charset=<replaceable>MIME_charset</replaceable>:\
|
||||||
:lang=<replaceable>locale_name</replaceable>:\
|
:lang=<replaceable>locale_name</replaceable>:\
|
||||||
:tc=default:</programlisting>
|
:tc=default:</programlisting>
|
||||||
|
|
@ -277,8 +273,7 @@ taiwan:Taiwanese User:\
|
||||||
<para>So sticking with our previous example using Latin-1, it
|
<para>So sticking with our previous example using Latin-1, it
|
||||||
would look like this:</para>
|
would look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>german:German Users Accounts:\
|
||||||
german:German Users Accounts:\
|
|
||||||
:charset=ISO-8859-1:\
|
:charset=ISO-8859-1:\
|
||||||
:lang=de_DE.ISO_8859-1:\
|
:lang=de_DE.ISO_8859-1:\
|
||||||
:tc=default:</programlisting>
|
:tc=default:</programlisting>
|
||||||
|
|
@ -288,8 +283,7 @@ german:German Users Accounts:\
|
||||||
<para>Use <command>vipw</command> to add new users, and make
|
<para>Use <command>vipw</command> to add new users, and make
|
||||||
the entry look like this:</para>
|
the entry look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
||||||
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
|
||||||
|
|
||||||
<para>Changing Login Classes with &man.adduser.8;</para>
|
<para>Changing Login Classes with &man.adduser.8;</para>
|
||||||
|
|
||||||
|
|
@ -348,14 +342,12 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
|
|
||||||
<para>In <filename>/etc/profile</filename>:</para>
|
<para>In <filename>/etc/profile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
|
||||||
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
||||||
|
|
||||||
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||||
<envar>setenv LANG de_DE.ISO_8859-1</envar>
|
|
||||||
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
||||||
|
|
||||||
<para>Alternatively, you can add the above instructions to
|
<para>Alternatively, you can add the above instructions to
|
||||||
|
|
@ -369,13 +361,11 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
|
|
||||||
<para>In <filename>$HOME/.xinitrc</filename>:</para>
|
<para>In <filename>$HOME/.xinitrc</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
|
||||||
|
|
||||||
<para>Or:</para>
|
<para>Or:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||||
<envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
|
||||||
|
|
||||||
<para>Depending on your shell (see above).</para>
|
<para>Depending on your shell (see above).</para>
|
||||||
</sect4>
|
</sect4>
|
||||||
|
|
@ -389,8 +379,7 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
console fonts in <filename>/etc/rc.conf</filename> for the
|
console fonts in <filename>/etc/rc.conf</filename> for the
|
||||||
language in question with:</para>
|
language in question with:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>font8x16=<replaceable>font_name</replaceable>
|
||||||
font8x16=<replaceable>font_name</replaceable>
|
|
||||||
font8x14=<replaceable>font_name</replaceable>
|
font8x14=<replaceable>font_name</replaceable>
|
||||||
font8x8=<replaceable>font_name</replaceable></programlisting>
|
font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||||
|
|
||||||
|
|
@ -405,8 +394,7 @@ font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||||
<literal>Console</literal>. Alternatively, you can add the
|
<literal>Console</literal>. Alternatively, you can add the
|
||||||
following to <filename>/etc/rc.conf</filename>:</para>
|
following to <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>scrnmap=<replaceable>screenmap_name</replaceable>
|
||||||
scrnmap=<replaceable>screenmap_name</replaceable>
|
|
||||||
keymap=<replaceable>keymap_name</replaceable>
|
keymap=<replaceable>keymap_name</replaceable>
|
||||||
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
||||||
|
|
||||||
|
|
@ -441,8 +429,7 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
||||||
mouse cursor the sc0 console driver. To enable the workaround,
|
mouse cursor the sc0 console driver. To enable the workaround,
|
||||||
insert the following line into the kernel config.</para>
|
insert the following line into the kernel config.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
|
||||||
|
|
||||||
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
||||||
the <filename>/usr/share/syscons/keymaps</filename> directory,
|
the <filename>/usr/share/syscons/keymaps</filename> directory,
|
||||||
|
|
@ -671,13 +658,11 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
|
|
||||||
<para>In <literal>sh</literal>-based shells:</para>
|
<para>In <literal>sh</literal>-based shells:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||||
<envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
|
|
||||||
<para>In <literal>C</literal>-based shells:</para>
|
<para>In <literal>C</literal>-based shells:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||||
<envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
</sect3>
|
</sect3>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
@ -701,8 +686,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
<para>Put the following lines into your
|
<para>Put the following lines into your
|
||||||
<filename>~/.login_conf</filename> file:</para>
|
<filename>~/.login_conf</filename> file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>me:My Account:\
|
||||||
me:My Account:\
|
|
||||||
:charset=KOI8-R:\
|
:charset=KOI8-R:\
|
||||||
:lang=ru_RU.KOI8-R:</programlisting>
|
:lang=ru_RU.KOI8-R:</programlisting>
|
||||||
|
|
||||||
|
|
@ -718,16 +702,14 @@ me:My Account:\
|
||||||
<para>Add the following to your kernel configuration
|
<para>Add the following to your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Use following settings in
|
<para>Use following settings in
|
||||||
<filename>/etc/rc.conf</filename>:</para>
|
<filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>keymap="ru.koi8-r"
|
||||||
keymap="ru.koi8-r"
|
|
||||||
scrnmap="koi8-r2cp866"
|
scrnmap="koi8-r2cp866"
|
||||||
font8x16="cp866b-8x16"
|
font8x16="cp866b-8x16"
|
||||||
font8x14="cp866-8x14"
|
font8x14="cp866-8x14"
|
||||||
|
|
@ -756,8 +738,7 @@ font8x8="cp866-8x8"</programlisting>
|
||||||
A Russian printer <filename>/etc/printcap</filename> entry
|
A Russian printer <filename>/etc/printcap</filename> entry
|
||||||
should look like:</para>
|
should look like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>lp|Russian local line printer:\
|
||||||
lp|Russian local line printer:\
|
|
||||||
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
||||||
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:</programlisting>
|
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:</programlisting>
|
||||||
|
|
||||||
|
|
@ -770,8 +751,7 @@ lp|Russian local line printer:\
|
||||||
<para>The following example &man.fstab.5; entry enables support
|
<para>The following example &man.fstab.5; entry enables support
|
||||||
for Russian filenames in mounted MS-DOS filesystems:</para>
|
for Russian filenames in mounted MS-DOS filesystems:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
||||||
/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>See &man.mount.msdos.8; for a detailed description of the
|
<para>See &man.mount.msdos.8; for a detailed description of the
|
||||||
<option>-W</option> and <option>-L</option> options.</para>
|
<option>-W</option> and <option>-L</option> options.</para>
|
||||||
|
|
@ -814,8 +794,7 @@ lp|Russian local line printer:\
|
||||||
lines must be added <emphasis>before</emphasis> any other
|
lines must be added <emphasis>before</emphasis> any other
|
||||||
<literal>FontPath</literal> entries:</para>
|
<literal>FontPath</literal> entries:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
||||||
|
|
||||||
|
|
@ -830,14 +809,12 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v3.*:</para>
|
<para>For XFree86 v3.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>XkbLayout "ru"
|
||||||
XkbLayout "ru"
|
|
||||||
XkbOptions "grp:caps_toggle"</programlisting>
|
XkbOptions "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v4.*:</para>
|
<para>For XFree86 v4.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Option "XkbLayout" "ru"
|
||||||
Option "XkbLayout" "ru"
|
|
||||||
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>Also make sure that <literal>XkbDisable</literal> is
|
<para>Also make sure that <literal>XkbDisable</literal> is
|
||||||
|
|
@ -855,13 +832,11 @@ Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v3.*:</para>
|
<para>For XFree86 v3.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>XkbVariant "winkeys"</programlisting>
|
||||||
XkbVariant "winkeys"</programlisting>
|
|
||||||
|
|
||||||
<para>For XFree86 v4.*:</para>
|
<para>For XFree86 v4.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Option "XkbVariant" "winkeys"</programlisting>
|
||||||
Option "XkbVariant" "winkeys"</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>The Russian XKB keyboard may not work with old XFree86
|
<para>The Russian XKB keyboard may not work with old XFree86
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.33 2001/03/16 23:51:03 murray Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.34 2001/03/29 07:40:19 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="linuxemu">
|
<chapter id="linuxemu">
|
||||||
|
|
@ -68,8 +68,7 @@
|
||||||
<para>This, in turn, triggers the following action in
|
<para>This, in turn, triggers the following action in
|
||||||
<filename>/etc/rc.i386</filename>:</para>
|
<filename>/etc/rc.i386</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Start the Linux binary compatibility if requested.
|
||||||
# Start the Linux binary compatibility if requested.
|
|
||||||
#
|
#
|
||||||
case ${linux_enable} in
|
case ${linux_enable} in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
|
|
@ -261,8 +260,7 @@ Abort</screen>
|
||||||
<filename>/compat/linux/etc/host.conf</filename> file
|
<filename>/compat/linux/etc/host.conf</filename> file
|
||||||
containing:</para>
|
containing:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>order hosts, bind
|
||||||
order hosts, bind
|
|
||||||
multi on</programlisting>
|
multi on</programlisting>
|
||||||
|
|
||||||
<para>The order here specifies that <filename>/etc/hosts</filename>
|
<para>The order here specifies that <filename>/etc/hosts</filename>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mail/chapter.sgml,v 1.19 2000/06/14 20:30:34 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mail/chapter.sgml,v 1.20 2000/07/26 05:08:14 hanai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="mail">
|
<chapter id="mail">
|
||||||
|
|
@ -172,13 +172,11 @@
|
||||||
|
|
||||||
<para>As a good workaround, you can place the line:
|
<para>As a good workaround, you can place the line:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>search foo.bar.edu bar.edu</programlisting>
|
||||||
search foo.bar.edu bar.edu</programlisting>
|
|
||||||
|
|
||||||
instead of the previous:
|
instead of the previous:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain foo.bar.edu</programlisting>
|
||||||
domain foo.bar.edu</programlisting>
|
|
||||||
|
|
||||||
into your <filename>/etc/resolv.conf</filename>. However, make
|
into your <filename>/etc/resolv.conf</filename>. However, make
|
||||||
sure that the search order does not go beyond the
|
sure that the search order does not go beyond the
|
||||||
|
|
@ -196,8 +194,7 @@ domain foo.bar.edu</programlisting>
|
||||||
<answer>
|
<answer>
|
||||||
<para>This is answered in the sendmail FAQ as follows:</para>
|
<para>This is answered in the sendmail FAQ as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||||
* I am getting <quote>Local configuration error</quote> messages, such as:
|
|
||||||
|
|
||||||
553 relay.domain.net config error: mail loops back to myself
|
553 relay.domain.net config error: mail loops back to myself
|
||||||
554 <user@domain.net>... Local configuration error
|
554 <user@domain.net>... Local configuration error
|
||||||
|
|
@ -235,8 +232,7 @@ to /etc/sendmail.cf.</programlisting>
|
||||||
<para>The key is to get a Internet site to provide secondary MX
|
<para>The key is to get a Internet site to provide secondary MX
|
||||||
service for your domain. For example:</para>
|
service for your domain. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bigco.com. MX 10 bigco.com.
|
||||||
bigco.com. MX 10 bigco.com.
|
|
||||||
MX 20 smalliap.com.</programlisting>
|
MX 20 smalliap.com.</programlisting>
|
||||||
|
|
||||||
<para>Only one host should be specified as the final recipient
|
<para>Only one host should be specified as the final recipient
|
||||||
|
|
@ -256,8 +252,7 @@ bigco.com. MX 10 bigco.com.
|
||||||
<para>You might want to use something like this as a login
|
<para>You might want to use something like this as a login
|
||||||
script.</para>
|
script.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
# Put me in /usr/local/bin/pppbigco
|
# Put me in /usr/local/bin/pppbigco
|
||||||
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
||||||
/usr/sbin/ppp -direct pppbigco</programlisting>
|
/usr/sbin/ppp -direct pppbigco</programlisting>
|
||||||
|
|
@ -271,8 +266,7 @@ bigco.com. MX 10 bigco.com.
|
||||||
|
|
||||||
<para>Message stolen from the &a.isp;.</para>
|
<para>Message stolen from the &a.isp;.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>> we provide the secondary MX for a customer. The customer connects to
|
||||||
> we provide the secondary MX for a customer. The customer connects to
|
|
||||||
> our services several times a day automatically to get the mails to
|
> our services several times a day automatically to get the mails to
|
||||||
> his primary MX (We do not call his site when a mail for his domains
|
> his primary MX (We do not call his site when a mail for his domains
|
||||||
> arrived). Our sendmail sends the mailqueue every 30 minutes. At the
|
> arrived). Our sendmail sends the mailqueue every 30 minutes. At the
|
||||||
|
|
@ -388,8 +382,7 @@ example.FreeBSD.org mail is handled (pri=10) by hub.FreeBSD.org</screen>
|
||||||
role="fqdn">freefall.FreeBSD.org</hostid> at one time looked like
|
role="fqdn">freefall.FreeBSD.org</hostid> at one time looked like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>freefall MX 30 mail.crl.net
|
||||||
freefall MX 30 mail.crl.net
|
|
||||||
freefall MX 40 agora.rdrop.com
|
freefall MX 40 agora.rdrop.com
|
||||||
freefall MX 10 freefall.FreeBSD.org
|
freefall MX 10 freefall.FreeBSD.org
|
||||||
freefall MX 20 who.cdrom.com</programlisting>
|
freefall MX 20 who.cdrom.com</programlisting>
|
||||||
|
|
@ -424,8 +417,7 @@ freefall MX 20 who.cdrom.com</programlisting>
|
||||||
exchange for each workstation on the network. This is done in
|
exchange for each workstation on the network. This is done in
|
||||||
your DNS configuration like so:</para>
|
your DNS configuration like so:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||||
example.FreeBSD.org A 204.216.27.XX ; Workstation
|
|
||||||
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
||||||
|
|
||||||
<para>This will redirect mail for the workstation to the mailhost no
|
<para>This will redirect mail for the workstation to the mailhost no
|
||||||
|
|
@ -445,8 +437,7 @@ example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||||
role="fqdn">mail.myhost.com</hostid>. The entry in your DNS
|
role="fqdn">mail.myhost.com</hostid>. The entry in your DNS
|
||||||
should look like this:</para>
|
should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>customer1.org MX 10 mail.myhost.com</programlisting>
|
||||||
customer1.org MX 10 mail.myhost.com</programlisting>
|
|
||||||
|
|
||||||
<para>You do <emphasis>not</emphasis> need an A record if you only
|
<para>You do <emphasis>not</emphasis> need an A record if you only
|
||||||
want to handle email for the domain.</para>
|
want to handle email for the domain.</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mirrors/chapter.sgml,v 1.109 2001/03/18 19:27:12 jdp Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mirrors/chapter.sgml,v 1.110 2001/04/05 04:53:24 jdp Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="mirrors">
|
<appendix id="mirrors">
|
||||||
|
|
@ -1778,8 +1778,7 @@
|
||||||
simply list the collections, one per line (in this case,
|
simply list the collections, one per line (in this case,
|
||||||
only one line):</para>
|
only one line):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>src-all</programlisting>
|
||||||
src-all</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
@ -2016,8 +2015,7 @@ src-all</programlisting>
|
||||||
add this line at the beginning of our
|
add this line at the beginning of our
|
||||||
<filename>supfile</filename>:</para>
|
<filename>supfile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default tag=.</programlisting>
|
||||||
*default tag=.</programlisting>
|
|
||||||
|
|
||||||
<para>There is an important special case that comes into play
|
<para>There is an important special case that comes into play
|
||||||
if you specify neither a <literal>tag=</literal> field nor a
|
if you specify neither a <literal>tag=</literal> field nor a
|
||||||
|
|
@ -2044,8 +2042,7 @@ src-all</programlisting>
|
||||||
use a fictional FreeBSD distribution site,
|
use a fictional FreeBSD distribution site,
|
||||||
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default host=cvsup666.FreeBSD.org</programlisting>
|
||||||
*default host=cvsup666.FreeBSD.org</programlisting>
|
|
||||||
|
|
||||||
<para>You will need to change the host to one that actually
|
<para>You will need to change the host to one that actually
|
||||||
exists before running CVSup. On any particular run of
|
exists before running CVSup. On any particular run of
|
||||||
|
|
@ -2066,8 +2063,7 @@ src-all</programlisting>
|
||||||
the collections we have chosen to receive, so this is the
|
the collections we have chosen to receive, so this is the
|
||||||
correct specification:</para>
|
correct specification:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default prefix=/usr</programlisting>
|
||||||
*default prefix=/usr</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
@ -2081,8 +2077,7 @@ src-all</programlisting>
|
||||||
already received. We will use the standard base directory,
|
already received. We will use the standard base directory,
|
||||||
<filename>/usr/local/etc/cvsup</filename>:</para>
|
<filename>/usr/local/etc/cvsup</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default base=/usr/local/etc/cvsup</programlisting>
|
||||||
*default base=/usr/local/etc/cvsup</programlisting>
|
|
||||||
|
|
||||||
<para>This setting is used by default if it is not specified
|
<para>This setting is used by default if it is not specified
|
||||||
in the <filename>supfile</filename>, so we actually do not
|
in the <filename>supfile</filename>, so we actually do not
|
||||||
|
|
@ -2102,8 +2097,7 @@ src-all</programlisting>
|
||||||
needs to be present in the
|
needs to be present in the
|
||||||
<filename>supfile</filename>:</para>
|
<filename>supfile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||||
*default release=cvs delete use-rel-suffix compress</programlisting>
|
|
||||||
|
|
||||||
<para><literal>release=cvs</literal> indicates that the server
|
<para><literal>release=cvs</literal> indicates that the server
|
||||||
should get its information out of the main FreeBSD CVS
|
should get its information out of the main FreeBSD CVS
|
||||||
|
|
@ -2138,8 +2132,7 @@ src-all</programlisting>
|
||||||
<para>Here is the entire <filename>supfile</filename> for our
|
<para>Here is the entire <filename>supfile</filename> for our
|
||||||
example:</para>
|
example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default tag=.
|
||||||
*default tag=.
|
|
||||||
*default host=cvsup666.FreeBSD.org
|
*default host=cvsup666.FreeBSD.org
|
||||||
*default prefix=/usr
|
*default prefix=/usr
|
||||||
*default base=/usr/local/etc/cvsup
|
*default base=/usr/local/etc/cvsup
|
||||||
|
|
@ -3755,8 +3748,7 @@ src-all</programlisting>
|
||||||
<para>The path to the files are:
|
<para>The path to the files are:
|
||||||
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||||
stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
|
||||||
130.237.234.43 #hot.stacken.kth.se
|
130.237.234.43 #hot.stacken.kth.se
|
||||||
130.237.237.230 #fishburger.stacken.kth.se
|
130.237.237.230 #fishburger.stacken.kth.se
|
||||||
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.3 2000/12/03 02:36:39 kuriyama Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.4 2000/12/06 21:27:12 dannyboy Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sound">
|
<chapter id="sound">
|
||||||
|
|
@ -101,8 +101,7 @@
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. Those are the default settings. You may
|
<para>to your kernel. Those are the default settings. You may
|
||||||
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
||||||
|
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. You may need to change the IRQ, etc. See
|
<para>to your kernel. You may need to change the IRQ, etc. See
|
||||||
the &man.gusc.4; man page for more information.</para>
|
the &man.gusc.4; man page for more information.</para>
|
||||||
|
|
@ -166,8 +164,7 @@ device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
sound card that does not have a bridge driver, you will need
|
sound card that does not have a bridge driver, you will need
|
||||||
to add</para>
|
to add</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel configuration. You may need to change the
|
<para>to your kernel configuration. You may need to change the
|
||||||
IRQ, etc., to match your hardware configuration.</para>
|
IRQ, etc., to match your hardware configuration.</para>
|
||||||
|
|
@ -190,8 +187,7 @@ device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
/dev/sndstat</command>. You should see output similar to the
|
/dev/sndstat</command>. You should see output similar to the
|
||||||
following:</para>
|
following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
|
||||||
Installed devices:
|
Installed devices:
|
||||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/pgpkeys/chapter.sgml,v 1.65 2001/03/29 00:00:09 murray Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/pgpkeys/chapter.sgml,v 1.66 2001/03/29 15:46:56 will Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="pgpkeys">
|
<appendix id="pgpkeys">
|
||||||
|
|
@ -1187,8 +1187,7 @@ F/U/FPM/mYbWNUELgSmN/YkSwWLGgfjcCObTwgd0FOW7XZuJ71R7ytBEn5kDt3bc
|
||||||
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
||||||
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
||||||
=L8Lf
|
=L8Lf
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1414,8 +1413,7 @@ gVMMZjZ7QiiO1LGl6IIiKRtJIXi45PcHtYgSZlXKflqPHhEIrOhFwpV+C7uL5jnv
|
||||||
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
||||||
0E4T
|
0E4T
|
||||||
=Qwmg
|
=Qwmg
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1476,8 +1474,7 @@ cJowZeBj8Ss1QZsVzeyfAAQLA/0ZwjK242AXkXjibtzEfZqK7l22D9xIT+ajc6zP
|
||||||
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
||||||
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
||||||
=rQiL
|
=rQiL
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.17 2000/06/14 20:30:36 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.18 2000/08/20 17:18:43 chris Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="policies">
|
<chapter id="policies">
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
maintained by a person or group of persons, they can communicate this
|
maintained by a person or group of persons, they can communicate this
|
||||||
fact to the world by adding a
|
fact to the world by adding a
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||||
MAINTAINER= email-addresses</programlisting>
|
|
||||||
|
|
||||||
line to the <filename>Makefile</filename>s covering this portion of the
|
line to the <filename>Makefile</filename>s covering this portion of the
|
||||||
source tree.</para>
|
source tree.</para>
|
||||||
|
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
||||||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>This directory contains virgin sources of the original distribution files
|
||||||
This directory contains virgin sources of the original distribution files
|
|
||||||
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
||||||
the files in this directory via patches and a cvs commit. New versions or
|
the files in this directory via patches and a cvs commit. New versions or
|
||||||
official-patch versions must be imported. Please remember to import with
|
official-patch versions must be imported. Please remember to import with
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.29 2000/10/13 21:07:01 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.30 2000/11/11 19:24:47 ben Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="ppp-and-slip">
|
<chapter id="ppp-and-slip">
|
||||||
|
|
@ -133,8 +133,7 @@
|
||||||
configuration file. It should have the following line somewhere
|
configuration file. It should have the following line somewhere
|
||||||
in it:</para>
|
in it:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device tun 1</programlisting>
|
||||||
pseudo-device tun 1</programlisting>
|
|
||||||
|
|
||||||
<para>If this line is not present, you will need to add it to the
|
<para>If this line is not present, you will need to add it to the
|
||||||
configuration file and recompile your kernel. The stock
|
configuration file and recompile your kernel. The stock
|
||||||
|
|
@ -250,8 +249,7 @@ tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500</screen>
|
||||||
<para>This file should contain the following two lines (in this
|
<para>This file should contain the following two lines (in this
|
||||||
order):</para>
|
order):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hosts
|
||||||
hosts
|
|
||||||
bind</programlisting>
|
bind</programlisting>
|
||||||
|
|
||||||
<para>These instruct the resolver to first look in the file
|
<para>These instruct the resolver to first look in the file
|
||||||
|
|
@ -270,8 +268,7 @@ bind</programlisting>
|
||||||
role="ipaddr">10.0.0.1</hostid>,
|
role="ipaddr">10.0.0.1</hostid>,
|
||||||
<filename>/etc/hosts</filename> should contain:</para>
|
<filename>/etc/hosts</filename> should contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>127.0.0.1 localhost.bar.com localhost
|
||||||
127.0.0.1 localhost.bar.com localhost
|
|
||||||
127.0.0.1 localhost.bar.com.
|
127.0.0.1 localhost.bar.com.
|
||||||
10.0.0.1 foo.bar.com foo
|
10.0.0.1 foo.bar.com foo
|
||||||
10.0.0.1 foo.bar.com.</programlisting>
|
10.0.0.1 foo.bar.com.</programlisting>
|
||||||
|
|
@ -298,8 +295,7 @@ bind</programlisting>
|
||||||
may leave this file empty. Normally, you will need to enter
|
may leave this file empty. Normally, you will need to enter
|
||||||
the following line(s):</para>
|
the following line(s):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain <replaceable>bar.com</replaceable>
|
||||||
domain <replaceable>bar.com</replaceable>
|
|
||||||
nameserver <replaceable>x.x.x.x</replaceable>
|
nameserver <replaceable>x.x.x.x</replaceable>
|
||||||
nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
||||||
|
|
||||||
|
|
@ -351,8 +347,7 @@ nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
||||||
using spaces or tabs.</para>
|
using spaces or tabs.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 default:
|
||||||
1 default:
|
|
||||||
2 set device /dev/cuaa0
|
2 set device /dev/cuaa0
|
||||||
3 set speed 115200
|
3 set speed 115200
|
||||||
4 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\TTIMEOUT 40 CONNECT"
|
4 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\TTIMEOUT 40 CONNECT"
|
||||||
|
|
@ -545,8 +540,7 @@ protocol: ppp</screen>
|
||||||
<link linkend="userppp-staticIP">PPP and Static IP
|
<link linkend="userppp-staticIP">PPP and Static IP
|
||||||
Addresses</link>, with the following change:</para>
|
Addresses</link>, with the following change:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
||||||
9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
|
||||||
|
|
||||||
<para>Again, do not include the line numbers, they are just for
|
<para>Again, do not include the line numbers, they are just for
|
||||||
reference. Indentation of at least one space is
|
reference. Indentation of at least one space is
|
||||||
|
|
@ -583,8 +577,7 @@ protocol: ppp</screen>
|
||||||
used. The following entry will delete the existing bogus
|
used. The following entry will delete the existing bogus
|
||||||
routes, and create correct ones:</para>
|
routes, and create correct ones:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 provider:
|
||||||
1 provider:
|
|
||||||
2 delete ALL
|
2 delete ALL
|
||||||
3 add 0 0 HISADDR</programlisting>
|
3 add 0 0 HISADDR</programlisting>
|
||||||
|
|
||||||
|
|
@ -655,8 +648,7 @@ protocol: ppp</screen>
|
||||||
also confirm that the <filename>/etc/rc.conf</filename> file
|
also confirm that the <filename>/etc/rc.conf</filename> file
|
||||||
contains the following:</para>
|
contains the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>gateway="YES"</programlisting>
|
||||||
gateway="YES"</programlisting>
|
|
||||||
|
|
||||||
<sect5>
|
<sect5>
|
||||||
<title>Which getty?</title>
|
<title>Which getty?</title>
|
||||||
|
|
@ -702,8 +694,7 @@ gateway="YES"</programlisting>
|
||||||
sections of the configuration file using the
|
sections of the configuration file using the
|
||||||
<command>allow</command> command:</para>
|
<command>allow</command> command:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>allow users fred mary</programlisting>
|
||||||
allow users fred mary</programlisting>
|
|
||||||
|
|
||||||
<para>If this command is used in the <literal>default</literal>
|
<para>If this command is used in the <literal>default</literal>
|
||||||
section, it gives the specified users access to
|
section, it gives the specified users access to
|
||||||
|
|
@ -717,8 +708,7 @@ allow users fred mary</programlisting>
|
||||||
<filename>/etc/ppp/ppp-shell</filename> containing the
|
<filename>/etc/ppp/ppp-shell</filename> containing the
|
||||||
following:</para>
|
following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
||||||
CALLEDAS="$IDENT"
|
CALLEDAS="$IDENT"
|
||||||
TTY=`tty`
|
TTY=`tty`
|
||||||
|
|
@ -745,8 +735,7 @@ exec /usr/sbin/ppp -direct $IDENT</programlisting>
|
||||||
<username>pchilds</username> (remember don't directly edit
|
<username>pchilds</username> (remember don't directly edit
|
||||||
the password file, use <command>vipw</command>).</para>
|
the password file, use <command>vipw</command>).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||||
pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
|
||||||
|
|
||||||
<para>Create a <filename>/home/ppp</filename> directory that
|
<para>Create a <filename>/home/ppp</filename> directory that
|
||||||
is world readable containing the following 0 byte
|
is world readable containing the following 0 byte
|
||||||
|
|
@ -787,8 +776,7 @@ pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlistin
|
||||||
<para>The <filename>/etc/ppp/ppp.conf</filename> file should
|
<para>The <filename>/etc/ppp/ppp.conf</filename> file should
|
||||||
contain something along the lines of:</para>
|
contain something along the lines of:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>default:
|
||||||
default:
|
|
||||||
set debug phase lcp chat
|
set debug phase lcp chat
|
||||||
set timeout 0
|
set timeout 0
|
||||||
|
|
||||||
|
|
@ -823,8 +811,7 @@ ttyd1:
|
||||||
<username>sam</username>, and <username>mary</username>
|
<username>sam</username>, and <username>mary</username>
|
||||||
example.</para>
|
example.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fred:
|
||||||
fred:
|
|
||||||
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
||||||
|
|
||||||
sam:
|
sam:
|
||||||
|
|
@ -839,8 +826,7 @@ mary:
|
||||||
role="ipaddr">203.14.101.0</hostid> class C via the
|
role="ipaddr">203.14.101.0</hostid> class C via the
|
||||||
client's ppp link.</para>
|
client's ppp link.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fred:
|
||||||
fred:
|
|
||||||
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
||||||
|
|
||||||
sam:
|
sam:
|
||||||
|
|
@ -876,8 +862,7 @@ mary:
|
||||||
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
||||||
file has the following in it:</para>
|
file has the following in it:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||||
/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
|
||||||
|
|
||||||
<para>This will tell <command>mgetty</command> to run the
|
<para>This will tell <command>mgetty</command> to run the
|
||||||
<filename>ppp-pap-dialup</filename> script for detected PPP
|
<filename>ppp-pap-dialup</filename> script for detected PPP
|
||||||
|
|
@ -887,8 +872,7 @@ mary:
|
||||||
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
||||||
following (the file should be executable):</para>
|
following (the file should be executable):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||||
|
|
||||||
<para>For each dialup line enabled in
|
<para>For each dialup line enabled in
|
||||||
|
|
@ -897,8 +881,7 @@ exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||||
happily co-exist with the definitions we created
|
happily co-exist with the definitions we created
|
||||||
above.</para>
|
above.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pap:
|
||||||
pap:
|
|
||||||
enable pap
|
enable pap
|
||||||
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
||||||
enable proxy</programlisting>
|
enable proxy</programlisting>
|
||||||
|
|
@ -909,8 +892,7 @@ pap:
|
||||||
alternatively add the following option to authenticate users
|
alternatively add the following option to authenticate users
|
||||||
via PAP from <filename>/etc/password</filename> file.</para>
|
via PAP from <filename>/etc/password</filename> file.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable passwdauth</programlisting>
|
||||||
enable passwdauth</programlisting>
|
|
||||||
|
|
||||||
<para>If you wish to assign some users a static IP number, you
|
<para>If you wish to assign some users a static IP number, you
|
||||||
can specify the number as the third argument in
|
can specify the number as the third argument in
|
||||||
|
|
@ -929,15 +911,13 @@ enable passwdauth</programlisting>
|
||||||
following lines might be added to the relevant section of
|
following lines might be added to the relevant section of
|
||||||
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable msext
|
||||||
enable msext
|
|
||||||
set ns 203.14.100.1 203.14.100.2
|
set ns 203.14.100.1 203.14.100.2
|
||||||
set nbns 203.14.100.5</programlisting>
|
set nbns 203.14.100.5</programlisting>
|
||||||
|
|
||||||
<para>And for PPP version 2 and above:</para>
|
<para>And for PPP version 2 and above:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>accept dns
|
||||||
accept dns
|
|
||||||
set dns 203.14.100.1 203.14.100.2
|
set dns 203.14.100.1 203.14.100.2
|
||||||
set nbns 203.14.100.5</programlisting>
|
set nbns 203.14.100.5</programlisting>
|
||||||
|
|
||||||
|
|
@ -970,8 +950,7 @@ set nbns 203.14.100.5</programlisting>
|
||||||
linkend="userppp-dynamicIP">PPP and Dynamic IP addresses</link>
|
linkend="userppp-dynamicIP">PPP and Dynamic IP addresses</link>
|
||||||
sections, the following alterations must be made:</para>
|
sections, the following alterations must be made:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>7 set login
|
||||||
7 set login
|
|
||||||
…
|
…
|
||||||
12 set authname <replaceable>MyUserName</replaceable>
|
12 set authname <replaceable>MyUserName</replaceable>
|
||||||
13 set authkey <replaceable>MyPassword</replaceable></programlisting>
|
13 set authkey <replaceable>MyPassword</replaceable></programlisting>
|
||||||
|
|
@ -1011,13 +990,11 @@ set nbns 203.14.100.5</programlisting>
|
||||||
<replaceable>MyPassword</replaceable>. You may want to
|
<replaceable>MyPassword</replaceable>. You may want to
|
||||||
add an additional line, such as:</para>
|
add an additional line, such as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>15 accept PAP</programlisting>
|
||||||
15 accept PAP</programlisting>
|
|
||||||
|
|
||||||
<para>or</para>
|
<para>or</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>15 accept CHAP</programlisting>
|
||||||
15 accept CHAP</programlisting>
|
|
||||||
|
|
||||||
<para>to make it obvious that this is the intention, but
|
<para>to make it obvious that this is the intention, but
|
||||||
PAP and CHAP are both accepted by default.</para>
|
PAP and CHAP are both accepted by default.</para>
|
||||||
|
|
@ -1035,8 +1012,7 @@ set nbns 203.14.100.5</programlisting>
|
||||||
suitable diagnostic port has been set up. To do this, add the
|
suitable diagnostic port has been set up. To do this, add the
|
||||||
following line to your configuration:</para>
|
following line to your configuration:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||||
set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
|
||||||
|
|
||||||
<para>This will tell PPP to listen to the specified unix-domain
|
<para>This will tell PPP to listen to the specified unix-domain
|
||||||
socket, asking clients for the specified password before
|
socket, asking clients for the specified password before
|
||||||
|
|
@ -1061,8 +1037,7 @@ set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||||
<para>Working from the top down in this file, make sure the
|
<para>Working from the top down in this file, make sure the
|
||||||
<literal>hostname=</literal> line is set, e.g.:</para>
|
<literal>hostname=</literal> line is set, e.g.:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hostname="foo.bar.com"</programlisting>
|
||||||
hostname="foo.bar.com"</programlisting>
|
|
||||||
|
|
||||||
<para>If your ISP has supplied you with a static IP address and
|
<para>If your ISP has supplied you with a static IP address and
|
||||||
name, it's probably best that you use this name as your host
|
name, it's probably best that you use this name as your host
|
||||||
|
|
@ -1073,8 +1048,7 @@ hostname="foo.bar.com"</programlisting>
|
||||||
make sure the <devicename>tun0</devicename> device is added to
|
make sure the <devicename>tun0</devicename> device is added to
|
||||||
the list, otherwise remove it.</para>
|
the list, otherwise remove it.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||||
network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>The <literal>ifconfig_tun0</literal> variable should be
|
<para>The <literal>ifconfig_tun0</literal> variable should be
|
||||||
|
|
@ -1082,8 +1056,7 @@ network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||||
<filename>/etc/start_if.tun0</filename> should be created.
|
<filename>/etc/start_if.tun0</filename> should be created.
|
||||||
This file should contain the line:</para>
|
This file should contain the line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ppp -auto mysystem</programlisting>
|
||||||
ppp -auto mysystem</programlisting>
|
|
||||||
|
|
||||||
<para>This script is executed at network configuration time,
|
<para>This script is executed at network configuration time,
|
||||||
starting your ppp daemon in automatic mode. If you have a LAN
|
starting your ppp daemon in automatic mode. If you have a LAN
|
||||||
|
|
@ -1095,8 +1068,7 @@ ppp -auto mysystem</programlisting>
|
||||||
<para>Set the router program to <literal>NO</literal> with
|
<para>Set the router program to <literal>NO</literal> with
|
||||||
following line in your <filename>/etc/rc.conf</filename>:</para>
|
following line in your <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>router_enable="NO"</programlisting>
|
||||||
router_enable="NO"</programlisting>
|
|
||||||
|
|
||||||
<para>It is important that the <command>routed</command> daemon is
|
<para>It is important that the <command>routed</command> daemon is
|
||||||
not started (it is started by default), as it
|
not started (it is started by default), as it
|
||||||
|
|
@ -1110,8 +1082,7 @@ router_enable="NO"</programlisting>
|
||||||
every now and then, possibly causing your machine to dial out.
|
every now and then, possibly causing your machine to dial out.
|
||||||
You may try:</para>
|
You may try:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>sendmail_flags="-bd"</programlisting>
|
||||||
sendmail_flags="-bd"</programlisting>
|
|
||||||
|
|
||||||
<para>The downside of this is that you must force
|
<para>The downside of this is that you must force
|
||||||
<command>sendmail</command> to re-examine the mail queue
|
<command>sendmail</command> to re-examine the mail queue
|
||||||
|
|
@ -1122,8 +1093,7 @@ sendmail_flags="-bd"</programlisting>
|
||||||
<para>You may wish to use the <command>!bg</command> command in
|
<para>You may wish to use the <command>!bg</command> command in
|
||||||
<filename>ppp.linkup</filename> to do this automatically:</para>
|
<filename>ppp.linkup</filename> to do this automatically:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 provider:
|
||||||
1 provider:
|
|
||||||
2 delete ALL
|
2 delete ALL
|
||||||
3 add 0 0 HISADDR
|
3 add 0 0 HISADDR
|
||||||
4 !bg sendmail -bd -q30m</programlisting>
|
4 !bg sendmail -bd -q30m</programlisting>
|
||||||
|
|
@ -1285,8 +1255,7 @@ sendmail_flags="-bd"</programlisting>
|
||||||
<para>I used the following <filename>/etc/ppp/options</filename> to
|
<para>I used the following <filename>/etc/ppp/options</filename> to
|
||||||
connect to CISCO terminal server PPP line.</para>
|
connect to CISCO terminal server PPP line.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>crtscts # enable hardware flow control
|
||||||
crtscts # enable hardware flow control
|
|
||||||
modem # modem control line
|
modem # modem control line
|
||||||
noipdefault # remote PPP server must supply your IP address.
|
noipdefault # remote PPP server must supply your IP address.
|
||||||
# if the remote host doesn't send your IP during IPCP
|
# if the remote host doesn't send your IP during IPCP
|
||||||
|
|
@ -1332,8 +1301,7 @@ defaultroute # put this if you want that PPP server will be your
|
||||||
<para>Following <filename>/etc/ppp/pppup</filename> script will make
|
<para>Following <filename>/etc/ppp/pppup</filename> script will make
|
||||||
all 3 stages automatically:</para>
|
all 3 stages automatically:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1361,8 +1329,7 @@ pppd /dev/tty01 19200</programlisting>
|
||||||
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
||||||
to disconnect the PPP line:</para>
|
to disconnect the PPP line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ X${pid} != "X" ] ; then
|
if [ X${pid} != "X" ] ; then
|
||||||
echo 'killing pppd, PID=' ${pid}
|
echo 'killing pppd, PID=' ${pid}
|
||||||
|
|
@ -1385,8 +1352,7 @@ kermit -y /etc/ppp/kermit.hup
|
||||||
<filename>/usr/etc/ppp/ppptest</filename>, which should look like
|
<filename>/usr/etc/ppp/ppptest</filename>, which should look like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ X${pid} != "X" ] ; then
|
if [ X${pid} != "X" ] ; then
|
||||||
echo 'pppd running: PID=' ${pid-NONE}
|
echo 'pppd running: PID=' ${pid-NONE}
|
||||||
|
|
@ -1401,8 +1367,7 @@ ifconfig ppp0</programlisting>
|
||||||
<filename>/etc/ppp/kermit.hup</filename>, which should
|
<filename>/etc/ppp/kermit.hup</filename>, which should
|
||||||
contain:</para>
|
contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set line /dev/tty01 ; put your modem device here
|
||||||
set line /dev/tty01 ; put your modem device here
|
|
||||||
set speed 19200
|
set speed 19200
|
||||||
set file type binary
|
set file type binary
|
||||||
set file names literal
|
set file names literal
|
||||||
|
|
@ -1429,8 +1394,7 @@ exit</programlisting>
|
||||||
|
|
||||||
<para><filename>/etc/ppp/options</filename>:</para>
|
<para><filename>/etc/ppp/options</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/cuaa1 115200
|
||||||
/dev/cuaa1 115200
|
|
||||||
|
|
||||||
crtscts # enable hardware flow control
|
crtscts # enable hardware flow control
|
||||||
modem # modem control line
|
modem # modem control line
|
||||||
|
|
@ -1455,8 +1419,7 @@ defaultroute # put this if you want that PPP server will be
|
||||||
<para>The following should go on a single line.</para>
|
<para>The following should go on a single line.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||||
ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
|
||||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||||
TIMEOUT 5 sword: <password></programlisting>
|
TIMEOUT 5 sword: <password></programlisting>
|
||||||
|
|
||||||
|
|
@ -1476,8 +1439,7 @@ ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||||
<para><filename>/etc/ppp/options</filename> should contain something
|
<para><filename>/etc/ppp/options</filename> should contain something
|
||||||
similar to the following:</para>
|
similar to the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>crtscts # Hardware flow control
|
||||||
crtscts # Hardware flow control
|
|
||||||
netmask 255.255.255.0 # netmask ( not required )
|
netmask 255.255.255.0 # netmask ( not required )
|
||||||
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
||||||
# local ip must be different from one
|
# local ip must be different from one
|
||||||
|
|
@ -1493,8 +1455,7 @@ modem # modem line</programlisting>
|
||||||
will enable tell <application>pppd</application> to behave as a
|
will enable tell <application>pppd</application> to behave as a
|
||||||
server:</para>
|
server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1521,8 +1482,7 @@ pppd /dev/tty01 19200</programlisting>
|
||||||
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
||||||
stop the server:</para>
|
stop the server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1544,8 +1504,7 @@ kermit -y /etc/ppp/kermit.noans</programlisting>
|
||||||
(<filename>/etc/ppp/kermit.ans</filename>) will enable/disable
|
(<filename>/etc/ppp/kermit.ans</filename>) will enable/disable
|
||||||
autoanswer mode on your modem. It should look like this:</para>
|
autoanswer mode on your modem. It should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set line /dev/tty01
|
||||||
set line /dev/tty01
|
|
||||||
set speed 19200
|
set speed 19200
|
||||||
set file type binary
|
set file type binary
|
||||||
set file names literal
|
set file names literal
|
||||||
|
|
@ -1575,8 +1534,7 @@ exit</programlisting>
|
||||||
in this script; you will also need to change the input statement
|
in this script; you will also need to change the input statement
|
||||||
depending on responses from your modem and remote host.</para>
|
depending on responses from your modem and remote host.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>;
|
||||||
;
|
|
||||||
; put the com line attached to the modem here:
|
; put the com line attached to the modem here:
|
||||||
;
|
;
|
||||||
set line /dev/tty01
|
set line /dev/tty01
|
||||||
|
|
@ -1756,8 +1714,7 @@ exit 1
|
||||||
<para>Here is an example of a working
|
<para>Here is an example of a working
|
||||||
<filename>ppp.conf</filename>:</para>
|
<filename>ppp.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>default: # or name_of_service_provider
|
||||||
default: # or name_of_service_provider
|
|
||||||
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
||||||
set mru 1492
|
set mru 1492
|
||||||
set mtu 1492
|
set mtu 1492
|
||||||
|
|
@ -1797,8 +1754,7 @@ papchap:
|
||||||
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ppp_enable="YES"
|
||||||
ppp_enable="YES"
|
|
||||||
ppp_mode="ddial"
|
ppp_mode="ddial"
|
||||||
ppp_nat="YES"
|
ppp_nat="YES"
|
||||||
ppp_profile="default" # or your provider</programlisting>
|
ppp_profile="default" # or your provider</programlisting>
|
||||||
|
|
@ -1836,8 +1792,7 @@ ppp_profile="default" # or your provider</programlisting>
|
||||||
<para>Make sure you have the following in your kernel configuration
|
<para>Make sure you have the following in your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 1</programlisting>
|
||||||
pseudo-device sl 1</programlisting>
|
|
||||||
|
|
||||||
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
||||||
this should not be a problem unless you have deleted it.</para>
|
this should not be a problem unless you have deleted it.</para>
|
||||||
|
|
@ -1851,8 +1806,7 @@ pseudo-device sl 1</programlisting>
|
||||||
your <filename>/etc/hosts</filename> file. Mine looks like
|
your <filename>/etc/hosts</filename> file. Mine looks like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>127.0.0.1 localhost loghost
|
||||||
127.0.0.1 localhost loghost
|
|
||||||
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
||||||
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
||||||
128.32.136.9 ns1.Berkeley.edu ns1
|
128.32.136.9 ns1.Berkeley.edu ns1
|
||||||
|
|
@ -1874,8 +1828,7 @@ pseudo-device sl 1</programlisting>
|
||||||
<para>Set your hostname by editing the line that
|
<para>Set your hostname by editing the line that
|
||||||
says:</para>
|
says:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hostname=<quote>myname.my.domain</quote></programlisting>
|
||||||
hostname=<quote>myname.my.domain</quote></programlisting>
|
|
||||||
|
|
||||||
<para>You should give it your full Internet
|
<para>You should give it your full Internet
|
||||||
hostname.</para>
|
hostname.</para>
|
||||||
|
|
@ -1885,34 +1838,29 @@ hostname=<quote>myname.my.domain</quote></programlisting>
|
||||||
<para>Add sl0 to the list of network interfaces by
|
<para>Add sl0 to the list of network interfaces by
|
||||||
changing the line that says:</para>
|
changing the line that says:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces="lo0"</programlisting>
|
||||||
network_interfaces="lo0"</programlisting>
|
|
||||||
|
|
||||||
<para>to:</para>
|
<para>to:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||||
network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the startup flags of sl0 by adding a
|
<para>Set the startup flags of sl0 by adding a
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||||
ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Designate the default router by changing the
|
<para>Designate the default router by changing the
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>defaultrouter=<quote>NO</quote></programlisting>
|
||||||
defaultrouter=<quote>NO</quote></programlisting>
|
|
||||||
|
|
||||||
<para>to:</para>
|
<para>to:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||||
defaultrouter=<quote>slip-gateway</quote></programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -1921,8 +1869,7 @@ defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||||
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
||||||
contains:</para>
|
contains:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain HIP.Berkeley.EDU
|
||||||
domain HIP.Berkeley.EDU
|
|
||||||
nameserver 128.32.136.9
|
nameserver 128.32.136.9
|
||||||
nameserver 128.32.136.12</programlisting>
|
nameserver 128.32.136.12</programlisting>
|
||||||
|
|
||||||
|
|
@ -1956,8 +1903,7 @@ nameserver 128.32.136.12</programlisting>
|
||||||
to enter depends on your environment. I use kermit, with a
|
to enter depends on your environment. I use kermit, with a
|
||||||
script like this:</para>
|
script like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># kermit setup
|
||||||
# kermit setup
|
|
||||||
set modem hayes
|
set modem hayes
|
||||||
set line /dev/modem
|
set line /dev/modem
|
||||||
set speed 115200
|
set speed 115200
|
||||||
|
|
@ -2142,8 +2088,7 @@ silvia.HIP.Berke localhost.Berkeley UGH 34 47641234 lo0 - 0.438
|
||||||
something like this (except it would be all on one
|
something like this (except it would be all on one
|
||||||
line):</para>
|
line):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||||
Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
|
||||||
|
|
||||||
<para>When <username>Shelmerg</username> logs in,
|
<para>When <username>Shelmerg</username> logs in,
|
||||||
<command>sliplogin</command> will search
|
<command>sliplogin</command> will search
|
||||||
|
|
@ -2152,16 +2097,14 @@ Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/s
|
||||||
<filename>/etc/sliphome/slip.hosts</filename> that
|
<filename>/etc/sliphome/slip.hosts</filename> that
|
||||||
reads:</para>
|
reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||||
Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
|
||||||
|
|
||||||
<para><command>sliplogin</command> will find that matching line,
|
<para><command>sliplogin</command> will find that matching line,
|
||||||
hook the serial line into the next available SLIP interface,
|
hook the serial line into the next available SLIP interface,
|
||||||
and then execute <filename>/etc/sliphome/slip.login</filename>
|
and then execute <filename>/etc/sliphome/slip.login</filename>
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||||
/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
|
||||||
|
|
||||||
<para>If all goes well,
|
<para>If all goes well,
|
||||||
<filename>/etc/sliphome/slip.login</filename> will issue an
|
<filename>/etc/sliphome/slip.login</filename> will issue an
|
||||||
|
|
@ -2230,8 +2173,7 @@ sl1* 296 <Link> 0 0 0 0
|
||||||
configuration file (<filename>/sys/i386/conf/GENERIC</filename>)
|
configuration file (<filename>/sys/i386/conf/GENERIC</filename>)
|
||||||
is a line that reads:</para>
|
is a line that reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 2</programlisting>
|
||||||
pseudo-device sl 2</programlisting>
|
|
||||||
|
|
||||||
<para>This is the line that defines the number of SLIP devices
|
<para>This is the line that defines the number of SLIP devices
|
||||||
available in the kernel; the number at the end of the line is
|
available in the kernel; the number at the end of the line is
|
||||||
|
|
@ -2293,8 +2235,7 @@ pseudo-device sl 2</programlisting>
|
||||||
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# login local-addr remote-addr mask opt1 opt2
|
# login local-addr remote-addr mask opt1 opt2
|
||||||
# (normal,compress,noicmp)
|
# (normal,compress,noicmp)
|
||||||
#
|
#
|
||||||
|
|
@ -2371,8 +2312,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
||||||
file looks like this:</para>
|
file looks like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||||
|
|
||||||
|
|
@ -2394,8 +2334,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
clients), your <filename>/etc/sliphome/slip.login</filename>
|
clients), your <filename>/etc/sliphome/slip.login</filename>
|
||||||
file will need to look something like this:</para>
|
file will need to look something like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||||
|
|
||||||
|
|
@ -2457,8 +2396,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
example of a basic
|
example of a basic
|
||||||
<filename>slip.logout</filename> script:</para>
|
<filename>slip.logout</filename> script:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# slip.logout
|
# slip.logout
|
||||||
|
|
||||||
|
|
@ -2474,8 +2412,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
||||||
ARP entry for the SLIP client:</para>
|
ARP entry for the SLIP client:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.logout
|
# @(#)slip.logout
|
||||||
|
|
||||||
|
|
@ -2550,8 +2487,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
gated; here is a sample, similar to what the author used on a
|
gated; here is a sample, similar to what the author used on a
|
||||||
FreeBSD SLIP server:</para>
|
FreeBSD SLIP server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# gated configuration file for dc.dsu.edu; for gated version 3.5alpha5
|
# gated configuration file for dc.dsu.edu; for gated version 3.5alpha5
|
||||||
# Only broadcast RIP information for xxx.xxx.yy out the ed Ethernet interface
|
# Only broadcast RIP information for xxx.xxx.yy out the ed Ethernet interface
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/printing/chapter.sgml,v 1.29 2000/06/13 01:01:17 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/printing/chapter.sgml,v 1.30 2000/06/19 13:43:42 nik Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="printing">
|
<chapter id="printing">
|
||||||
|
|
@ -482,8 +482,7 @@ sio2: type 16550A</screen>
|
||||||
<para>If you want interrupt-driven mode, add the
|
<para>If you want interrupt-driven mode, add the
|
||||||
<literal>irq</literal> specifier:</para>
|
<literal>irq</literal> specifier:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||||
device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
|
||||||
|
|
||||||
<para>Where <replaceable>N</replaceable> is the IRQ
|
<para>Where <replaceable>N</replaceable> is the IRQ
|
||||||
number for your computer's parallel port.</para>
|
number for your computer's parallel port.</para>
|
||||||
|
|
@ -493,8 +492,7 @@ device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</p
|
||||||
<para>If you want polled mode, do not add the
|
<para>If you want polled mode, do not add the
|
||||||
<literal>irq</literal> specifier:</para>
|
<literal>irq</literal> specifier:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||||
device lpt0 at isa? port? tty vector lptintr</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -553,8 +551,7 @@ device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||||
will need a more sophisticated test. A small PostScript
|
will need a more sophisticated test. A small PostScript
|
||||||
program, such as the following, will suffice:</para>
|
program, such as the following, will suffice:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>%!PS
|
||||||
%!PS
|
|
||||||
100 100 moveto 300 300 lineto stroke
|
100 100 moveto 300 300 lineto stroke
|
||||||
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
||||||
(Is this thing working?) show
|
(Is this thing working?) show
|
||||||
|
|
@ -650,8 +647,7 @@ showpage</programlisting>
|
||||||
<para>Edit the file <filename>/etc/remote</filename>. Add
|
<para>Edit the file <filename>/etc/remote</filename>. Add
|
||||||
the following entry:</para>
|
the following entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
||||||
printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
|
||||||
|
|
||||||
<para>Where <replaceable>port</replaceable> is the device
|
<para>Where <replaceable>port</replaceable> is the device
|
||||||
entry for the serial port (<literal>ttyd0</literal>,
|
entry for the serial port (<literal>ttyd0</literal>,
|
||||||
|
|
@ -667,8 +663,7 @@ printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replac
|
||||||
a serial line to the third serial port at 19200 bps with
|
a serial line to the third serial port at 19200 bps with
|
||||||
no parity:</para>
|
no parity:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||||
printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
|
|
@ -856,8 +851,7 @@ printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||||
(a Diablo 630 line printer and a Panasonic KX-P4455 PostScript
|
(a Diablo 630 line printer and a Panasonic KX-P4455 PostScript
|
||||||
laser printer):</para>
|
laser printer):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose
|
# /etc/printcap for host rose
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:
|
rattan|line|diablo|lp|Diablo 630 Line Printer:
|
||||||
|
|
@ -893,8 +887,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:</programlisting>
|
||||||
<filename>/etc/printcap</filename> with <literal>sh</literal>
|
<filename>/etc/printcap</filename> with <literal>sh</literal>
|
||||||
added:</para>
|
added:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - no header pages anywhere
|
# /etc/printcap for host rose - no header pages anywhere
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -959,8 +952,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
specify the pathname of the spooling directory with the
|
specify the pathname of the spooling directory with the
|
||||||
<literal>sd</literal> capability:</para>
|
<literal>sd</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added spooling directories
|
# /etc/printcap for host rose - added spooling directories
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1000,8 +992,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<hostid>bamboo</hostid> is on a sixth serial port; here are
|
<hostid>bamboo</hostid> is on a sixth serial port; here are
|
||||||
the additions to <filename>/etc/printcap</filename>:</para>
|
the additions to <filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - identified what devices to use
|
# /etc/printcap for host rose - identified what devices to use
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1129,8 +1120,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<literal>LITOUT</literal> and <literal>PASS8</literal>
|
<literal>LITOUT</literal> and <literal>PASS8</literal>
|
||||||
flags:</para>
|
flags:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|
||||||
:sh:sd=/var/spool/lpd/bamboo:\
|
:sh:sd=/var/spool/lpd/bamboo:\
|
||||||
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
||||||
</sect4>
|
</sect4>
|
||||||
|
|
@ -1169,8 +1159,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
text filter. Put the following text into that file with your
|
text filter. Put the following text into that file with your
|
||||||
favorite text editor:</para>
|
favorite text editor:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# if-simple - Simple text input filter for lpd
|
# if-simple - Simple text input filter for lpd
|
||||||
# Installed in /usr/local/libexec/if-simple
|
# Installed in /usr/local/libexec/if-simple
|
||||||
|
|
@ -1190,8 +1179,7 @@ exit 2</programlisting>
|
||||||
printers we have so far in the example
|
printers we have so far in the example
|
||||||
<filename>/etc/printcap</filename>:</para>
|
<filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added text filter
|
# /etc/printcap for host rose - added text filter
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1255,8 +1243,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
the program. If you are using &man.lptest.1;, then your
|
the program. If you are using &man.lptest.1;, then your
|
||||||
results should look like the following:</para>
|
results should look like the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>!"#$%&'()*+,-./01234
|
||||||
!"#$%&'()*+,-./01234
|
|
||||||
"#$%&'()*+,-./012345
|
"#$%&'()*+,-./012345
|
||||||
#$%&'()*+,-./0123456
|
#$%&'()*+,-./0123456
|
||||||
$%&'()*+,-./01234567
|
$%&'()*+,-./01234567
|
||||||
|
|
@ -1636,8 +1623,7 @@ $%&'()*+,-./01234567
|
||||||
PostScript printer's entry in
|
PostScript printer's entry in
|
||||||
<filename>/etc/printcap</filename>:</para>
|
<filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:if=/usr/local/libexec/psif:</programlisting>
|
||||||
:if=/usr/local/libexec/psif:</programlisting>
|
|
||||||
|
|
||||||
<para>You should also specify the <literal>rw</literal> capability;
|
<para>You should also specify the <literal>rw</literal> capability;
|
||||||
that tells LPD to open the printer in read-write mode.</para>
|
that tells LPD to open the printer in read-write mode.</para>
|
||||||
|
|
@ -1647,8 +1633,7 @@ $%&'()*+,-./01234567
|
||||||
<command>lprps</command> needs), you can use the following shell
|
<command>lprps</command> needs), you can use the following shell
|
||||||
script as the text filter:</para>
|
script as the text filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# psif - Print PostScript or plain text on a PostScript printer
|
# psif - Print PostScript or plain text on a PostScript printer
|
||||||
# Script version; NOT the version that comes with lprps
|
# Script version; NOT the version that comes with lprps
|
||||||
|
|
@ -1711,8 +1696,7 @@ fi</programlisting>
|
||||||
-h</command> to get a list of devices the current installation of
|
-h</command> to get a list of devices the current installation of
|
||||||
Ghostscript supports.)</para>
|
Ghostscript supports.)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
||||||
# Installed in /usr/local/libexec/hpif
|
# Installed in /usr/local/libexec/hpif
|
||||||
|
|
@ -1761,8 +1745,7 @@ exit 2</programlisting>
|
||||||
<para>Finally, you need to notify LPD of the filter via the
|
<para>Finally, you need to notify LPD of the filter via the
|
||||||
<literal>if</literal> capability:</para>
|
<literal>if</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:if=/usr/local/libexec/hpif:</programlisting>
|
||||||
:if=/usr/local/libexec/hpif:</programlisting>
|
|
||||||
|
|
||||||
<para>That is it. You can type <command>lpr plain.text</command> and
|
<para>That is it. You can type <command>lpr plain.text</command> and
|
||||||
<filename>lpr whatever.ps</filename> and both should print
|
<filename>lpr whatever.ps</filename> and both should print
|
||||||
|
|
@ -1924,8 +1907,7 @@ exit 2</programlisting>
|
||||||
the new <literal>df</literal> capability for the printer
|
the new <literal>df</literal> capability for the printer
|
||||||
<literal>bamboo</literal>.</para>
|
<literal>bamboo</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added df filter for bamboo
|
# /etc/printcap for host rose - added df filter for bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1943,8 +1925,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<filename>/usr/local/libexec/psdf</filename>. Here is that
|
<filename>/usr/local/libexec/psdf</filename>. Here is that
|
||||||
script:</para>
|
script:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!bin/sh
|
||||||
#!bin/sh
|
|
||||||
#
|
#
|
||||||
# psdf - DVI to PostScript printer filter
|
# psdf - DVI to PostScript printer filter
|
||||||
# Installed in /usr/local/libexec/psdf
|
# Installed in /usr/local/libexec/psdf
|
||||||
|
|
@ -1975,8 +1956,7 @@ exec /usr/local/bin/dvips -f | /usr/local/libexec/lprps "$@"</programlisting>
|
||||||
conversion filter for a Hewlett Packard LaserJet III-Si
|
conversion filter for a Hewlett Packard LaserJet III-Si
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpvf - Convert GIF files into HP/PCL, then print
|
# hpvf - Convert GIF files into HP/PCL, then print
|
||||||
# Installed in /usr/local/libexec/hpvf
|
# Installed in /usr/local/libexec/hpvf
|
||||||
|
|
@ -1994,8 +1974,7 @@ giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \
|
||||||
<para>Here is the <filename>/etc/printcap</filename> file with an
|
<para>Here is the <filename>/etc/printcap</filename> file with an
|
||||||
entry for a printer using the above filter:</para>
|
entry for a printer using the above filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -2007,8 +1986,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
from the groff typesetting system for the PostScript printer named
|
from the groff typesetting system for the PostScript printer named
|
||||||
<literal>bamboo</literal>:</para>
|
<literal>bamboo</literal>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# pstf - Convert groff's troff data into PS, then print.
|
# pstf - Convert groff's troff data into PS, then print.
|
||||||
# Installed in /usr/local/libexec/pstf
|
# Installed in /usr/local/libexec/pstf
|
||||||
|
|
@ -2019,8 +1997,7 @@ exec grops | /usr/local/libexec/lprps "$@"</programlisting>
|
||||||
to handle the communication with the printer. If the printer were
|
to handle the communication with the printer. If the printer were
|
||||||
on a parallel port, we would use this script instead:</para>
|
on a parallel port, we would use this script instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# pstf - Convert groff's troff data into PS, then print.
|
# pstf - Convert groff's troff data into PS, then print.
|
||||||
# Installed in /usr/local/libexec/pstf
|
# Installed in /usr/local/libexec/pstf
|
||||||
|
|
@ -2030,16 +2007,14 @@ exec grops</programlisting>
|
||||||
<para>That is it. Here is the entry we need to add to
|
<para>That is it. Here is the entry we need to add to
|
||||||
<filename>/etc/printcap</filename> to enable the filter:</para>
|
<filename>/etc/printcap</filename> to enable the filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:tf=/usr/local/libexec/pstf:</programlisting>
|
||||||
:tf=/usr/local/libexec/pstf:</programlisting>
|
|
||||||
|
|
||||||
<para>Here is an example that might make old hands at FORTRAN blush.
|
<para>Here is an example that might make old hands at FORTRAN blush.
|
||||||
It is a FORTRAN-text filter for any printer that can directly
|
It is a FORTRAN-text filter for any printer that can directly
|
||||||
print plain text. We will install it for the printer
|
print plain text. We will install it for the printer
|
||||||
<literal>teak</literal>:</para>
|
<literal>teak</literal>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hprf - FORTRAN text filter for LaserJet 3si:
|
# hprf - FORTRAN text filter for LaserJet 3si:
|
||||||
# Installed in /usr/local/libexec/hprf
|
# Installed in /usr/local/libexec/hprf
|
||||||
|
|
@ -2053,8 +2028,7 @@ exit 2</programlisting>
|
||||||
<filename>/etc/printcap</filename> for the printer
|
<filename>/etc/printcap</filename> for the printer
|
||||||
<literal>teak</literal> to enable this filter:</para>
|
<literal>teak</literal> to enable this filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:rf=/usr/local/libexec/hprf:</programlisting>
|
||||||
:rf=/usr/local/libexec/hprf:</programlisting>
|
|
||||||
|
|
||||||
<para>Here is one final, somewhat complex example. We will add a
|
<para>Here is one final, somewhat complex example. We will add a
|
||||||
DVI filter to the LaserJet printer <literal>teak</literal>
|
DVI filter to the LaserJet printer <literal>teak</literal>
|
||||||
|
|
@ -2062,8 +2036,7 @@ exit 2</programlisting>
|
||||||
<filename>/etc/printcap</filename> with the location of the DVI
|
<filename>/etc/printcap</filename> with the location of the DVI
|
||||||
filter:</para>
|
filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:df=/usr/local/libexec/hpdf:</programlisting>
|
||||||
:df=/usr/local/libexec/hpdf:</programlisting>
|
|
||||||
|
|
||||||
<para>Now, for the hard part: making the filter. For that, we need
|
<para>Now, for the hard part: making the filter. For that, we need
|
||||||
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
||||||
|
|
@ -2103,8 +2076,7 @@ exit 2</programlisting>
|
||||||
|
|
||||||
<para>Here, finally, is the filter:</para>
|
<para>Here, finally, is the filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpdf - Print DVI data on HP/PCL printer
|
# hpdf - Print DVI data on HP/PCL printer
|
||||||
# Installed in /usr/local/libexec/hpdf
|
# Installed in /usr/local/libexec/hpdf
|
||||||
|
|
@ -2347,8 +2319,7 @@ exit 0</programlisting>
|
||||||
Here is an example output filter for Hewlett Packard PCL-compatible
|
Here is an example output filter for Hewlett Packard PCL-compatible
|
||||||
printers:</para>
|
printers:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
||||||
# Installed in /usr/local/libexec/hpof
|
# Installed in /usr/local/libexec/hpof
|
||||||
|
|
@ -2365,8 +2336,7 @@ exec /usr/libexec/lpr/lpf</programlisting>
|
||||||
the printer <literal>teak</literal> that we introduced earlier; we
|
the printer <literal>teak</literal> that we introduced earlier; we
|
||||||
enabled header pages and added the above output filter:</para>
|
enabled header pages and added the above output filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -2398,8 +2368,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
user, host, and job. Here is an example (kelly printed the job
|
user, host, and job. Here is an example (kelly printed the job
|
||||||
named outline from host rose):</para>
|
named outline from host rose):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> k ll ll
|
||||||
k ll ll
|
|
||||||
k l l
|
k l l
|
||||||
k l l
|
k l l
|
||||||
k k eeee l l y y
|
k k eeee l l y y
|
||||||
|
|
@ -2457,8 +2426,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
<filename>/etc/printcap</filename> file. The header page will look
|
<filename>/etc/printcap</filename> file. The header page will look
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||||
rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
|
||||||
|
|
||||||
<para>Also by default, LPD prints the header page first, then the job.
|
<para>Also by default, LPD prints the header page first, then the job.
|
||||||
To reverse that, specify <literal>hl</literal> (header last) in
|
To reverse that, specify <literal>hl</literal> (header last) in
|
||||||
|
|
@ -2553,8 +2521,7 @@ rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||||
arguments (user login name, host name, and job name) and makes a
|
arguments (user login name, host name, and job name) and makes a
|
||||||
simple PostScript header page:</para>
|
simple PostScript header page:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# make-ps-header - make a PostScript header page on stdout
|
# make-ps-header - make a PostScript header page on stdout
|
||||||
# Installed in /usr/local/libexec/make-ps-header
|
# Installed in /usr/local/libexec/make-ps-header
|
||||||
|
|
@ -2639,8 +2606,7 @@ EOF</programlisting>
|
||||||
user's job. Here is the DVI conversion filter from earlier in this
|
user's job. Here is the DVI conversion filter from earlier in this
|
||||||
document, modified to make a header page:</para>
|
document, modified to make a header page:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# psdf - DVI to PostScript printer filter
|
# psdf - DVI to PostScript printer filter
|
||||||
# Installed in /usr/local/libexec/psdf
|
# Installed in /usr/local/libexec/psdf
|
||||||
|
|
@ -2832,8 +2798,7 @@ done
|
||||||
<literal>teak</literal>; we have added entries for the two printers
|
<literal>teak</literal>; we have added entries for the two printers
|
||||||
on the host rose:</para>
|
on the host rose:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid - added (remote) printers on rose
|
# /etc/printcap for host orchid - added (remote) printers on rose
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -2911,8 +2876,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
want to take advantage of that (to get printer status, perform
|
want to take advantage of that (to get printer status, perform
|
||||||
accounting, etc.).</para>
|
accounting, etc.).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/usr/bin/perl
|
||||||
#!/usr/bin/perl
|
|
||||||
#
|
#
|
||||||
# netprint - Text filter for printer attached to network
|
# netprint - Text filter for printer attached to network
|
||||||
# Installed in /usr/local/libexec/netprint
|
# Installed in /usr/local/libexec/netprint
|
||||||
|
|
@ -2942,8 +2906,7 @@ exit 0;</programlisting>
|
||||||
printer is scrivener. Here is the text filter for the
|
printer is scrivener. Here is the text filter for the
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
||||||
# on port 5100. Installed in /usr/local/libexec/diablo-if-net
|
# on port 5100. Installed in /usr/local/libexec/diablo-if-net
|
||||||
|
|
@ -2993,8 +2956,7 @@ exec /usr/libexec/lpr/lpf "$@" | /usr/local/libexec/netprint scrivener 5100</pro
|
||||||
disable multiple copies by adding the <literal>sc</literal>
|
disable multiple copies by adding the <literal>sc</literal>
|
||||||
capability:</para>
|
capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -3014,8 +2976,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
disable multiple copies for the printer
|
disable multiple copies for the printer
|
||||||
<literal>teak</literal>):</para>
|
<literal>teak</literal>):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid - no multiple copies for local
|
# /etc/printcap for host orchid - no multiple copies for local
|
||||||
# printer teak or remote printer bamboo
|
# printer teak or remote printer bamboo
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -3070,8 +3031,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
is the familiar <filename>/etc/printcap</filename> for host
|
is the familiar <filename>/etc/printcap</filename> for host
|
||||||
<hostid>rose</hostid>:</para>
|
<hostid>rose</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - restricted group for bamboo
|
# /etc/printcap for host rose - restricted group for bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -3131,8 +3091,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
to five megabytes. We will put no limit on the plain text line
|
to five megabytes. We will put no limit on the plain text line
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose
|
# /etc/printcap for host rose
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -3196,8 +3155,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<filename>/etc/hosts.lpd</filename> file on the host
|
<filename>/etc/hosts.lpd</filename> file on the host
|
||||||
<hostid>rose</hostid>:</para>
|
<hostid>rose</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>orchid
|
||||||
orchid
|
|
||||||
violet
|
violet
|
||||||
madrigal.fishbaum.de</programlisting>
|
madrigal.fishbaum.de</programlisting>
|
||||||
|
|
||||||
|
|
@ -3232,8 +3190,7 @@ madrigal.fishbaum.de</programlisting>
|
||||||
directory for this printer; here is <hostid>bamboo</hostid>'s
|
directory for this printer; here is <hostid>bamboo</hostid>'s
|
||||||
entry:</para>
|
entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|
||||||
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
||||||
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
||||||
:if=/usr/local/libexec/psif:\
|
:if=/usr/local/libexec/psif:\
|
||||||
|
|
@ -3363,8 +3320,7 @@ boo/minfree</userinput></screen>
|
||||||
the printer, it then writes an accounting entry in the accounting
|
the printer, it then writes an accounting entry in the accounting
|
||||||
file. The entries look like this:</para>
|
file. The entries look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>2.00 rose:andy
|
||||||
2.00 rose:andy
|
|
||||||
3.00 rose:kelly
|
3.00 rose:kelly
|
||||||
3.00 orchid:mary
|
3.00 orchid:mary
|
||||||
5.00 orchid:mary
|
5.00 orchid:mary
|
||||||
|
|
@ -4332,8 +4288,7 @@ cfA013rose dequeued
|
||||||
<filename>/usr/local/libexec/if-simple</filename> prints a
|
<filename>/usr/local/libexec/if-simple</filename> prints a
|
||||||
form feed after it sends the job to the printer:</para>
|
form feed after it sends the job to the printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# if-simple - Simple text input filter for lpd
|
# if-simple - Simple text input filter for lpd
|
||||||
# Installed in /usr/local/libexec/if-simple
|
# Installed in /usr/local/libexec/if-simple
|
||||||
|
|
@ -4352,8 +4307,7 @@ exit 2</programlisting>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>You got the following on paper:</para>
|
<para>You got the following on paper:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>!"#$%&'()*+,-./01234
|
||||||
!"#$%&'()*+,-./01234
|
|
||||||
"#$%&'()*+,-./012345
|
"#$%&'()*+,-./012345
|
||||||
#$%&'()*+,-./0123456</programlisting>
|
#$%&'()*+,-./0123456</programlisting>
|
||||||
|
|
||||||
|
|
@ -4435,8 +4389,7 @@ exit 2</programlisting>
|
||||||
eject the last page of the job. It should work with
|
eject the last page of the job. It should work with
|
||||||
nearly all Hewlett Packard printers.</para>
|
nearly all Hewlett Packard printers.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
||||||
# Installed in /usr/local/libexec/hpif
|
# Installed in /usr/local/libexec/hpif
|
||||||
|
|
@ -4453,8 +4406,7 @@ exit 2</programlisting>
|
||||||
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
||||||
above script as its text filter:</para>
|
above script as its text filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -4575,8 +4527,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
the entry for <literal>rattan</literal>, with the
|
the entry for <literal>rattan</literal>, with the
|
||||||
<literal>lf</literal> capability:</para>
|
<literal>lf</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
|
||||||
:sh:sd=/var/spool/lpd/rattan:\
|
:sh:sd=/var/spool/lpd/rattan:\
|
||||||
:lp=/dev/lpt0:\
|
:lp=/dev/lpt0:\
|
||||||
:if=/usr/local/libexec/if-simple:\
|
:if=/usr/local/libexec/if-simple:\
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/security/chapter.sgml,v 1.39 2000/12/08 09:20:24 alex Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/security/chapter.sgml,v 1.40 2001/01/16 13:32:01 jedgar Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="security">
|
<chapter id="security">
|
||||||
|
|
@ -1094,8 +1094,7 @@ Enter secret password: <userinput><secret password></userinput>
|
||||||
<para>Here is a sample configuration file which illustrates the
|
<para>Here is a sample configuration file which illustrates the
|
||||||
three most common sorts of configuration statements:</para>
|
three most common sorts of configuration statements:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>permit internet 192.168.0.0 255.255.0.0
|
||||||
permit internet 192.168.0.0 255.255.0.0
|
|
||||||
permit user fnord
|
permit user fnord
|
||||||
permit port ttyd0</programlisting>
|
permit port ttyd0</programlisting>
|
||||||
|
|
||||||
|
|
@ -2353,8 +2352,7 @@ FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995</screen>
|
||||||
<para>Please be aware that in order to use this functionality, you
|
<para>Please be aware that in order to use this functionality, you
|
||||||
must have the following options compiled into your kernel:</para>
|
must have the following options compiled into your kernel:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options IPSEC #IP security
|
||||||
options IPSEC #IP security
|
|
||||||
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/serialcomms/chapter.sgml,v 1.21 2001/01/18 01:14:34 brian Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/serialcomms/chapter.sgml,v 1.22 2001/03/12 17:42:05 nik Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="serialcomms">
|
<chapter id="serialcomms">
|
||||||
|
|
@ -490,8 +490,7 @@
|
||||||
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
||||||
we add the new entry:</para>
|
we add the new entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||||
ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
|
||||||
ttyd5</programlisting>
|
ttyd5</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -528,8 +527,7 @@ ttyd5</programlisting>
|
||||||
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
||||||
the two terminals in which we are interested):</para>
|
the two terminals in which we are interested):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||||
|
|
||||||
<para>Note that the second field—where we specify what program
|
<para>Note that the second field—where we specify what program
|
||||||
|
|
@ -566,8 +564,7 @@ ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||||
Here are the pertinent yet unfinished entries from the
|
Here are the pertinent yet unfinished entries from the
|
||||||
<filename>/etc/ttys</filename> file:</para>
|
<filename>/etc/ttys</filename> file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -586,8 +583,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||||
Here again is the <filename>/etc/ttys</filename> file. We have
|
Here again is the <filename>/etc/ttys</filename> file. We have
|
||||||
turned each port <literal>on</literal>.</para>
|
turned each port <literal>on</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -635,8 +631,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||||
<filename>/etc/ttys</filename> file, with comments added to describe
|
<filename>/etc/ttys</filename> file, with comments added to describe
|
||||||
where the terminals are:</para>
|
where the terminals are:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1054,8 +1049,7 @@ sio3: type 16550A</screen>
|
||||||
the name of your system, but in upper-case letters. Edit the file,
|
the name of your system, but in upper-case letters. Edit the file,
|
||||||
and change the device lines:</para>
|
and change the device lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
|
||||||
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
|
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
|
||||||
device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
||||||
device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr</programlisting>
|
device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr</programlisting>
|
||||||
|
|
@ -1235,8 +1229,7 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
|
||||||
<filename>gettytab</filename> file, so you do not need to add it
|
<filename>gettytab</filename> file, so you do not need to add it
|
||||||
unless it is missing under your version of FreeBSD:</para>
|
unless it is missing under your version of FreeBSD:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
||||||
#
|
#
|
||||||
D2400|d2400|Fast-Dial-2400:\
|
D2400|d2400|Fast-Dial-2400:\
|
||||||
|
|
@ -1251,8 +1244,7 @@ D2400|d2400|Fast-Dial-2400:\
|
||||||
entry you could use for a 14.4 Kbps modem with a top interface
|
entry you could use for a 14.4 Kbps modem with a top interface
|
||||||
speed of 19.2 Kbps:</para>
|
speed of 19.2 Kbps:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Additions for a V.32bis Modem
|
# Additions for a V.32bis Modem
|
||||||
#
|
#
|
||||||
um|V300|High Speed Modem at 300,8-bit:\
|
um|V300|High Speed Modem at 300,8-bit:\
|
||||||
|
|
@ -1287,8 +1279,7 @@ uq|V19200|High Speed Modem at 19200,8-bit:\
|
||||||
higher communications rate than 19.2 Kbps. Here is an example of
|
higher communications rate than 19.2 Kbps. Here is an example of
|
||||||
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Additions for a V.32bis or V.34 Modem
|
# Additions for a V.32bis or V.34 Modem
|
||||||
# Starting at 57.6 Kbps
|
# Starting at 57.6 Kbps
|
||||||
#
|
#
|
||||||
|
|
@ -1327,8 +1318,7 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
|
||||||
line will be the same, whether you are using a locked-speed or
|
line will be the same, whether you are using a locked-speed or
|
||||||
matching-speed configuration:</para>
|
matching-speed configuration:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
|
||||||
|
|
||||||
<para>The first item in the above line is the device special file for
|
<para>The first item in the above line is the device special file for
|
||||||
this entry — <literal>ttyd0</literal> means
|
this entry — <literal>ttyd0</literal> means
|
||||||
|
|
@ -1377,8 +1367,7 @@ ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||||
speed is locked at 19.2 Kbps, the <filename>ttys</filename> entry
|
speed is locked at 19.2 Kbps, the <filename>ttys</filename> entry
|
||||||
might look like this:</para>
|
might look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
|
||||||
|
|
||||||
<para>If your modem is locked at a different data rate, substitute
|
<para>If your modem is locked at a different data rate, substitute
|
||||||
the appropriate name for the
|
the appropriate name for the
|
||||||
|
|
@ -1400,8 +1389,7 @@ ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||||
<literal>V19200</literal> starting point), your
|
<literal>V19200</literal> starting point), your
|
||||||
<filename>ttys</filename> entry might look like this:</para>
|
<filename>ttys</filename> entry might look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
|
||||||
</sect4>
|
</sect4>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1420,8 +1408,7 @@ ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||||
<para>For example, on a sample FreeBSD 1.1.5.1 system,
|
<para>For example, on a sample FreeBSD 1.1.5.1 system,
|
||||||
<filename>/etc/rc.serial</filename> reads:</para>
|
<filename>/etc/rc.serial</filename> reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# Serial port initial configuration
|
# Serial port initial configuration
|
||||||
|
|
||||||
|
|
@ -1437,8 +1424,7 @@ stty -f /dev/cuai01 crtscts</programlisting>
|
||||||
<filename>/etc/rc.local</filename> to set the
|
<filename>/etc/rc.local</filename> to set the
|
||||||
<literal>crtscts</literal> flag on the devices:</para>
|
<literal>crtscts</literal> flag on the devices:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Set serial ports to use RTS/CTS flow control
|
||||||
# Set serial ports to use RTS/CTS flow control
|
|
||||||
stty -f /dev/ttyd0 crtscts
|
stty -f /dev/ttyd0 crtscts
|
||||||
stty -f /dev/ttyd1 crtscts
|
stty -f /dev/ttyd1 crtscts
|
||||||
stty -f /dev/ttyd2 crtscts
|
stty -f /dev/ttyd2 crtscts
|
||||||
|
|
@ -1498,8 +1484,7 @@ stty -f /dev/ttyd3 crtscts</programlisting>
|
||||||
Sportster 14,400 external modem, one could give these commands to
|
Sportster 14,400 external modem, one could give these commands to
|
||||||
the modem:</para>
|
the modem:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&C1&D2&H1&I0&R2&W</programlisting>
|
AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||||
|
|
||||||
<para>You might also want to take this opportunity to adjust other
|
<para>You might also want to take this opportunity to adjust other
|
||||||
|
|
@ -1561,8 +1546,7 @@ AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||||
modem, these commands will lock the modem-to-computer data rate at
|
modem, these commands will lock the modem-to-computer data rate at
|
||||||
the speed used to issue the commands:</para>
|
the speed used to issue the commands:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&B1&W</programlisting>
|
AT&B1&W</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1576,8 +1560,7 @@ AT&B1&W</programlisting>
|
||||||
issue the commands, but allow the serial port rate to vary for
|
issue the commands, but allow the serial port rate to vary for
|
||||||
non-error-corrected connections:</para>
|
non-error-corrected connections:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&B2&W</programlisting>
|
AT&B2&W</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1793,8 +1776,7 @@ AT&B2&W</programlisting>
|
||||||
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
||||||
then put in the following line:</para>
|
then put in the following line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||||
cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
|
||||||
|
|
||||||
<para>Use the highest bps rate your modem supports in the br capability.
|
<para>Use the highest bps rate your modem supports in the br capability.
|
||||||
Then, type <command>tip cuaa0</command> and you will be connected to
|
Then, type <command>tip cuaa0</command> and you will be connected to
|
||||||
|
|
@ -1827,8 +1809,7 @@ cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||||
capability files like <filename>/etc/remote</filename>. Escape it
|
capability files like <filename>/etc/remote</filename>. Escape it
|
||||||
with a backslash:</para>
|
with a backslash:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pn=\@</programlisting>
|
||||||
pn=\@</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1837,8 +1818,7 @@ pn=\@</programlisting>
|
||||||
<para>Put what is called a <quote>generic</quote> entry in your
|
<para>Put what is called a <quote>generic</quote> entry in your
|
||||||
<filename>/etc/remote</filename> file. For example:</para>
|
<filename>/etc/remote</filename> file. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>tip115200|Dial any phone number at 115200 bps:\
|
||||||
tip115200|Dial any phone number at 115200 bps:\
|
|
||||||
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
||||||
tip57600|Dial any phone number at 57600 bps:\
|
tip57600|Dial any phone number at 57600 bps:\
|
||||||
:dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:</programlisting>
|
:dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||||
|
|
@ -1850,8 +1830,7 @@ tip57600|Dial any phone number at 57600 bps:\
|
||||||
<para>If you prefer <command>cu</command> over <command>tip</command>,
|
<para>If you prefer <command>cu</command> over <command>tip</command>,
|
||||||
use a generic cu entry:</para>
|
use a generic cu entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
|
||||||
cu115200|Use cu to dial any number at 115200bps:\
|
|
||||||
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||||
|
|
||||||
<para>and type:</para>
|
<para>and type:</para>
|
||||||
|
|
@ -1878,8 +1857,7 @@ cu115200|Use cu to dial any number at 115200bps:\
|
||||||
<literal>cm</literal> capability. For example, these entries in
|
<literal>cm</literal> capability. For example, these entries in
|
||||||
<filename>/etc/remote</filename>:</para>
|
<filename>/etc/remote</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pain|pain.deep13.com|Forrester's machine:\
|
||||||
pain|pain.deep13.com|Forrester's machine:\
|
|
||||||
:cm=CONNECT pain\n:tc=deep13:
|
:cm=CONNECT pain\n:tc=deep13:
|
||||||
muffin|muffin.deep13.com|Frank's machine:\
|
muffin|muffin.deep13.com|Frank's machine:\
|
||||||
:cm=CONNECT muffin\n:tc=deep13:
|
:cm=CONNECT muffin\n:tc=deep13:
|
||||||
|
|
@ -1901,8 +1879,7 @@ deep13:Gizmonics Institute terminal server:\
|
||||||
<filename>/etc/remote</filename> and use <literal>@</literal> for the
|
<filename>/etc/remote</filename> and use <literal>@</literal> for the
|
||||||
<literal>pn</literal> capability:</para>
|
<literal>pn</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>big-university:\
|
||||||
big-university:\
|
|
||||||
:pn=\@:tc=dialout
|
:pn=\@:tc=dialout
|
||||||
dialout:\
|
dialout:\
|
||||||
:dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:</programlisting>
|
:dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:</programlisting>
|
||||||
|
|
@ -1910,8 +1887,7 @@ dialout:\
|
||||||
<para>Then, list the phone numbers for the university in
|
<para>Then, list the phone numbers for the university in
|
||||||
<filename>/etc/phones</filename>:</para>
|
<filename>/etc/phones</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>big-university 5551111
|
||||||
big-university 5551111
|
|
||||||
big-university 5551112
|
big-university 5551112
|
||||||
big-university 5551113
|
big-university 5551113
|
||||||
big-university 5551114</programlisting>
|
big-university 5551114</programlisting>
|
||||||
|
|
@ -1944,8 +1920,7 @@ big-university 5551114</programlisting>
|
||||||
specifying the following in your <filename>$HOME/.tiprc</filename>
|
specifying the following in your <filename>$HOME/.tiprc</filename>
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>force=<single-char></programlisting>
|
||||||
force=<single-char></programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1961,8 +1936,7 @@ force=<single-char></programlisting>
|
||||||
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
||||||
type CTRL+2 and CTRL+A a lot:</para>
|
type CTRL+2 and CTRL+A a lot:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>force=^^
|
||||||
force=^^
|
|
||||||
raisechar=^^</programlisting>
|
raisechar=^^</programlisting>
|
||||||
|
|
||||||
<para>The ^^ is SHIFT+CTRL+6.</para>
|
<para>The ^^ is SHIFT+CTRL+6.</para>
|
||||||
|
|
@ -2184,8 +2158,7 @@ raisechar=^^</programlisting>
|
||||||
|
|
||||||
<para>Example:</para>
|
<para>Example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||||
device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
|
||||||
|
|
||||||
<para>See &man.sio.4; for more details.</para>
|
<para>See &man.sio.4; for more details.</para>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.3 2000/12/03 02:36:39 kuriyama Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.4 2000/12/06 21:27:12 dannyboy Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sound">
|
<chapter id="sound">
|
||||||
|
|
@ -101,8 +101,7 @@
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. Those are the default settings. You may
|
<para>to your kernel. Those are the default settings. You may
|
||||||
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
||||||
|
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. You may need to change the IRQ, etc. See
|
<para>to your kernel. You may need to change the IRQ, etc. See
|
||||||
the &man.gusc.4; man page for more information.</para>
|
the &man.gusc.4; man page for more information.</para>
|
||||||
|
|
@ -166,8 +164,7 @@ device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
sound card that does not have a bridge driver, you will need
|
sound card that does not have a bridge driver, you will need
|
||||||
to add</para>
|
to add</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel configuration. You may need to change the
|
<para>to your kernel configuration. You may need to change the
|
||||||
IRQ, etc., to match your hardware configuration.</para>
|
IRQ, etc., to match your hardware configuration.</para>
|
||||||
|
|
@ -190,8 +187,7 @@ device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
/dev/sndstat</command>. You should see output similar to the
|
/dev/sndstat</command>. You should see output similar to the
|
||||||
following:</para>
|
following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
|
||||||
Installed devices:
|
Installed devices:
|
||||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.140 2001/02/24 10:53:53 kris Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.141 2001/03/24 21:45:57 asami Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||||
|
|
@ -92,8 +92,7 @@
|
||||||
<para>The minimal <filename>Makefile</filename> would look something
|
<para>The minimal <filename>Makefile</filename> would look something
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># New ports collection makefile for: oneko
|
||||||
# New ports collection makefile for: oneko
|
|
||||||
# Date created: 5 December 1994
|
# Date created: 5 December 1994
|
||||||
# Whom: asami
|
# Whom: asami
|
||||||
#
|
#
|
||||||
|
|
@ -140,8 +139,7 @@ USE_IMAKE= yes
|
||||||
should begin with a capital, and end without a period. Here
|
should begin with a capital, and end without a period. Here
|
||||||
is an example:</para>
|
is an example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>A cat chasing a mouse all over the screen</programlisting>
|
||||||
A cat chasing a mouse all over the screen</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -167,8 +165,7 @@ A cat chasing a mouse all over the screen</programlisting>
|
||||||
<para>It is recommended that you sign your name at the end of this
|
<para>It is recommended that you sign your name at the end of this
|
||||||
file, as in:</para>
|
file, as in:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>This is a port of oneko, in which a cat chases a poor mouse all over
|
||||||
This is a port of oneko, in which a cat chases a poor mouse all over
|
|
||||||
the screen.
|
the screen.
|
||||||
:
|
:
|
||||||
(etc.)
|
(etc.)
|
||||||
|
|
@ -193,8 +190,7 @@ asami@cs.berkeley.edu</programlisting>
|
||||||
|
|
||||||
<para>Here is a small example:</para>
|
<para>Here is a small example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bin/oneko
|
||||||
bin/oneko
|
|
||||||
lib/X11/app-defaults/Oneko
|
lib/X11/app-defaults/Oneko
|
||||||
lib/X11/oneko/cat1.xpm
|
lib/X11/oneko/cat1.xpm
|
||||||
lib/X11/oneko/cat2.xpm
|
lib/X11/oneko/cat2.xpm
|
||||||
|
|
@ -836,8 +832,7 @@ lib/X11/oneko/mouse.xpm
|
||||||
<para>The gtkmumble port, version 0.10, is committed to the
|
<para>The gtkmumble port, version 0.10, is committed to the
|
||||||
ports collection.</para>
|
ports collection.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.10</programlisting>
|
PORTVERSION= 0.10</programlisting>
|
||||||
|
|
||||||
<para><makevar>PKGNAME</makevar> becomes
|
<para><makevar>PKGNAME</makevar> becomes
|
||||||
|
|
@ -847,8 +842,7 @@ PORTVERSION= 0.10</programlisting>
|
||||||
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
||||||
accordingly.</para>
|
accordingly.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSIOn= 0.10
|
PORTVERSIOn= 0.10
|
||||||
PORTREVISION= 1</programlisting>
|
PORTREVISION= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -868,8 +862,7 @@ PORTREVISION= 1</programlisting>
|
||||||
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
||||||
from the makefile).</para>
|
from the makefile).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.2
|
PORTVERSION= 0.2
|
||||||
PORTEPOCH= 1</programlisting>
|
PORTEPOCH= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -880,8 +873,7 @@ PORTEPOCH= 1</programlisting>
|
||||||
<makevar>PORTEPOCH</makevar> never decreases, the version
|
<makevar>PORTEPOCH</makevar> never decreases, the version
|
||||||
variables are now:</para>
|
variables are now:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.3
|
PORTVERSION= 0.3
|
||||||
PORTEPOCH= 1</programlisting>
|
PORTEPOCH= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -1006,8 +998,7 @@ PORTEPOCH= 1</programlisting>
|
||||||
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
||||||
archive. Here is an example:</para>
|
archive. Here is an example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
|
||||||
MASTER_SITE_SUBDIR= applications</programlisting>
|
MASTER_SITE_SUBDIR= applications</programlisting>
|
||||||
|
|
||||||
<para>These variables are defined in
|
<para>These variables are defined in
|
||||||
|
|
@ -1136,8 +1127,7 @@ MASTER_SITE_SUBDIR= applications</programlisting>
|
||||||
|
|
||||||
<para>For example,</para>
|
<para>For example,</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||||
RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
|
||||||
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
||||||
|
|
||||||
<para>will check if the file or directory
|
<para>will check if the file or directory
|
||||||
|
|
@ -1260,8 +1250,7 @@ RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||||
compilation time by specifying the target too. For
|
compilation time by specifying the target too. For
|
||||||
instance
|
instance
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||||
BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
|
||||||
|
|
||||||
will always descend to the JPEG port and extract it.</para>
|
will always descend to the JPEG port and extract it.</para>
|
||||||
|
|
||||||
|
|
@ -1353,8 +1342,7 @@ BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlistin
|
||||||
you could use the following in your
|
you could use the following in your
|
||||||
<filename>Makefile</filename>:</para>
|
<filename>Makefile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>INSTALLS_SHLIB= yes
|
||||||
INSTALLS_SHLIB= yes
|
|
||||||
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||||
|
|
||||||
<para>Note that content of <makevar>LDCONFIG_DIRS</makevar> is passed
|
<para>Note that content of <makevar>LDCONFIG_DIRS</makevar> is passed
|
||||||
|
|
@ -1432,8 +1420,7 @@ LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||||
<para>The variable is set using this line in
|
<para>The variable is set using this line in
|
||||||
<filename>bsd.port.mk</filename>:</para>
|
<filename>bsd.port.mk</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
||||||
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
|
||||||
|
|
||||||
<para>Ports' make processes should use this variable to decide what to
|
<para>Ports' make processes should use this variable to decide what to
|
||||||
do. However, if the port's <filename>configure</filename> script
|
do. However, if the port's <filename>configure</filename> script
|
||||||
|
|
@ -1524,13 +1511,11 @@ PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</p
|
||||||
<para>The <literal>ldconfig</literal> line in Makefiles should
|
<para>The <literal>ldconfig</literal> line in Makefiles should
|
||||||
read:</para>
|
read:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||||
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
|
||||||
|
|
||||||
<para>In <filename>pkg-plist</filename> it should read;</para>
|
<para>In <filename>pkg-plist</filename> it should read;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||||
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
|
||||||
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
||||||
|
|
||||||
<para>This is to ensure that the correct <command>ldconfig</command>
|
<para>This is to ensure that the correct <command>ldconfig</command>
|
||||||
|
|
@ -1559,8 +1544,7 @@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||||
<para>This will be best demonstrated by an example. This is part of
|
<para>This will be best demonstrated by an example. This is part of
|
||||||
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= xdvi
|
||||||
PORTNAME= xdvi
|
|
||||||
PORTVERSION= 17
|
PORTVERSION= 17
|
||||||
PKGNAMEPREFIX= ja-
|
PKGNAMEPREFIX= ja-
|
||||||
PKGNAMESUFFIX= ${RESOLUTION}
|
PKGNAMESUFFIX= ${RESOLUTION}
|
||||||
|
|
@ -1582,8 +1566,7 @@ RESOLUTION?= 300
|
||||||
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
||||||
<filename>xdvi118/Makefile</filename>:</para>
|
<filename>xdvi118/Makefile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>RESOLUTION= 118
|
||||||
RESOLUTION= 118
|
|
||||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
MASTERDIR= ${.CURDIR}/../xdvi300
|
||||||
|
|
||||||
.include ${MASTERDIR}/Makefile</programlisting>
|
.include ${MASTERDIR}/Makefile</programlisting>
|
||||||
|
|
@ -1688,8 +1671,7 @@ MASTERDIR= ${.CURDIR}/../xdvi300
|
||||||
|
|
||||||
<para>Here is an example that puts it all together.</para>
|
<para>Here is an example that puts it all together.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MAN1= foo.1
|
||||||
MAN1= foo.1
|
|
||||||
MAN3= bar.3
|
MAN3= bar.3
|
||||||
MAN4= baz.4
|
MAN4= baz.4
|
||||||
MLINKS= foo.1 alt-name.8
|
MLINKS= foo.1 alt-name.8
|
||||||
|
|
@ -1699,8 +1681,7 @@ MANCOMPRESSED= yes</programlisting>
|
||||||
|
|
||||||
<para>This states that six files are installed by this port;</para>
|
<para>This states that six files are installed by this port;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>${PREFIX}/man/man1/foo.1.gz
|
||||||
${PREFIX}/man/man1/foo.1.gz
|
|
||||||
${PREFIX}/man/ja/man1/foo.1.gz
|
${PREFIX}/man/ja/man1/foo.1.gz
|
||||||
${PREFIX}/share/foobar/man/man3/bar.3.gz
|
${PREFIX}/share/foobar/man/man3/bar.3.gz
|
||||||
${PREFIX}/share/foobar/man/ja/man3/bar.3.gz
|
${PREFIX}/share/foobar/man/ja/man3/bar.3.gz
|
||||||
|
|
@ -1825,8 +1806,7 @@ Options:
|
||||||
statements to files that do not have them. This is part of my
|
statements to files that do not have them. This is part of my
|
||||||
patch:</para>
|
patch:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||||
--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
|
||||||
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
||||||
@@ -2,6 +2,10 @@
|
@@ -2,6 +2,10 @@
|
||||||
|
|
||||||
|
|
@ -1884,8 +1864,7 @@ Options:
|
||||||
<filename>man</filename> subdirectory to rebuild the info
|
<filename>man</filename> subdirectory to rebuild the info
|
||||||
pages.</para>
|
pages.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
|
||||||
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
||||||
@@ -184,7 +184,7 @@
|
@@ -184,7 +184,7 @@
|
||||||
# Subdirectories to make recursively. `lisp' is not included
|
# Subdirectories to make recursively. `lisp' is not included
|
||||||
|
|
@ -1925,8 +1904,7 @@ Options:
|
||||||
otherwise mucking around with the <filename>dir</filename>
|
otherwise mucking around with the <filename>dir</filename>
|
||||||
file.</para>
|
file.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
|
||||||
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
||||||
@@ -368,14 +368,8 @@
|
@@ -368,14 +368,8 @@
|
||||||
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
||||||
|
|
@ -1953,8 +1931,7 @@ Options:
|
||||||
They may be in <filename>pkg-install</filename> or some other
|
They may be in <filename>pkg-install</filename> or some other
|
||||||
file, so search extensively.</para>
|
file, so search extensively.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: pkg-plist
|
||||||
Index: pkg-plist
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||||
retrieving revision 1.15
|
retrieving revision 1.15
|
||||||
|
|
@ -1982,8 +1959,7 @@ diff -u -r1.15 pkg-plist
|
||||||
<command>install-info</command> automatically creates this
|
<command>install-info</command> automatically creates this
|
||||||
file if it does not exist.)</para>
|
file if it does not exist.)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: Makefile
|
||||||
Index: Makefile
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
||||||
retrieving revision 1.26
|
retrieving revision 1.26
|
||||||
|
|
@ -2008,8 +1984,7 @@ diff -u -r1.26 Makefile
|
||||||
<literal>@unexec</literal> for
|
<literal>@unexec</literal> for
|
||||||
<command>pkg_delete</command>.</para>
|
<command>pkg_delete</command>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: pkg-plist
|
||||||
Index: pkg-plist
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||||
retrieving revision 1.15
|
retrieving revision 1.15
|
||||||
|
|
@ -2139,8 +2114,7 @@ diff -u -r1.15 pkg-plist
|
||||||
<para>For instance, if you have a port that installs many files in a
|
<para>For instance, if you have a port that installs many files in a
|
||||||
version-specific subdirectory, you can put something like
|
version-specific subdirectory, you can put something like
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>OCTAVE_VERSION= 2.0.13
|
||||||
OCTAVE_VERSION= 2.0.13
|
|
||||||
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||||
|
|
||||||
in the <filename>Makefile</filename> and use
|
in the <filename>Makefile</filename> and use
|
||||||
|
|
@ -2351,8 +2325,7 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||||
<literal>post-install</literal> rule to to it yourself. Here is an
|
<literal>post-install</literal> rule to to it yourself. Here is an
|
||||||
example:</para>
|
example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>post-install:
|
||||||
post-install:
|
|
||||||
strip ${PREFIX}/bin/xdl</programlisting>
|
strip ${PREFIX}/bin/xdl</programlisting>
|
||||||
|
|
||||||
<para>Use the &man.file.1; command on the installed executable to
|
<para>Use the &man.file.1; command on the installed executable to
|
||||||
|
|
@ -2440,8 +2413,7 @@ post-install:
|
||||||
defined in <filename><sys/param.h></filename>. Hopefully that
|
defined in <filename><sys/param.h></filename>. Hopefully that
|
||||||
file is already included; if not, add the code:</para>
|
file is already included; if not, add the code:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif</programlisting>
|
#endif</programlisting>
|
||||||
|
|
||||||
|
|
@ -2454,8 +2426,7 @@ post-install:
|
||||||
<para>Another way is to use the GNU Autoconf style of doing
|
<para>Another way is to use the GNU Autoconf style of doing
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifdef HAVE_SYS_PARAM_H
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif</programlisting>
|
#endif</programlisting>
|
||||||
|
|
||||||
|
|
@ -2466,8 +2437,7 @@ post-install:
|
||||||
<para>Once you have <filename>sys/param.h</filename> included, you may
|
<para>Once you have <filename>sys/param.h</filename> included, you may
|
||||||
use:</para>
|
use:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||||
#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
|
||||||
|
|
||||||
<para>to detect if the code is being compiled on a 4.3 Net2 code base
|
<para>to detect if the code is being compiled on a 4.3 Net2 code base
|
||||||
or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386
|
or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386
|
||||||
|
|
@ -2475,8 +2445,7 @@ post-install:
|
||||||
|
|
||||||
<para>Use:</para>
|
<para>Use:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||||
#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
|
||||||
|
|
||||||
<para>to detect if the code is being compiled on a 4.4 code base or
|
<para>to detect if the code is being compiled on a 4.4 code base or
|
||||||
newer (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or
|
newer (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or
|
||||||
|
|
@ -2519,8 +2488,7 @@ post-install:
|
||||||
system. If you need more granularity in detecting FreeBSD
|
system. If you need more granularity in detecting FreeBSD
|
||||||
systems since 2.0-RELEASE you can use the following:</para>
|
systems since 2.0-RELEASE you can use the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if __FreeBSD__ >= 2
|
||||||
#if __FreeBSD__ >= 2
|
|
||||||
#include <osreldate.h>
|
#include <osreldate.h>
|
||||||
# if __FreeBSD_version >= 199504
|
# if __FreeBSD_version >= 199504
|
||||||
/* 2.0.5+ release specific code here */
|
/* 2.0.5+ release specific code here */
|
||||||
|
|
@ -3156,8 +3124,7 @@ post-install:
|
||||||
<para>Here are some examples of things you can write after
|
<para>Here are some examples of things you can write after
|
||||||
<filename>bsd.port.pre.mk</filename>:</para>
|
<filename>bsd.port.pre.mk</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># no need to compile lang/perl5 if perl5 is already in system
|
||||||
# no need to compile lang/perl5 if perl5 is already in system
|
|
||||||
.if ${OSVERSION} > 300003
|
.if ${OSVERSION} > 300003
|
||||||
BROKEN= perl is in system
|
BROKEN= perl is in system
|
||||||
.endif
|
.endif
|
||||||
|
|
@ -3196,8 +3163,7 @@ post-install:
|
||||||
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
||||||
<filename>/etc/make.conf</filename>, like this:</para>
|
<filename>/etc/make.conf</filename>, like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>post-install:
|
||||||
post-install:
|
|
||||||
.if !defined(NOPORTDOCS)
|
.if !defined(NOPORTDOCS)
|
||||||
${MKDIR} ${PREFIX}/share/doc/xv
|
${MKDIR} ${PREFIX}/share/doc/xv
|
||||||
${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
|
${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
|
||||||
|
|
@ -3349,13 +3315,11 @@ post-install:
|
||||||
your port requires a macro <literal>PAGER</literal> to be the full
|
your port requires a macro <literal>PAGER</literal> to be the full
|
||||||
pathname of <command>less</command>, use the compiler flag:
|
pathname of <command>less</command>, use the compiler flag:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||||
-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||||
-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
|
||||||
|
|
||||||
if this is an X port, instead of
|
if this is an X port, instead of
|
||||||
<literal>-DPAGER=\"/usr/local/bin/less\".</literal> This way it will
|
<literal>-DPAGER=\"/usr/local/bin/less\".</literal> This way it will
|
||||||
|
|
@ -3395,8 +3359,7 @@ post-install:
|
||||||
specifically created by the port. You need to delete subdirectories
|
specifically created by the port. You need to delete subdirectories
|
||||||
before you can delete parent directories.</para>
|
before you can delete parent directories.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> :
|
||||||
:
|
|
||||||
lib/X11/oneko/pixmaps/cat.xpm
|
lib/X11/oneko/pixmaps/cat.xpm
|
||||||
lib/X11/oneko/sounds/cat.au
|
lib/X11/oneko/sounds/cat.au
|
||||||
:
|
:
|
||||||
|
|
@ -3409,8 +3372,7 @@ lib/X11/oneko/sounds/cat.au
|
||||||
can call <command>rmdir</command> from <literal>@unexec</literal> to
|
can call <command>rmdir</command> from <literal>@unexec</literal> to
|
||||||
remove only empty directories without warning.</para>
|
remove only empty directories without warning.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||||
@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
|
||||||
|
|
||||||
<para>This will neither print any error messages nor cause
|
<para>This will neither print any error messages nor cause
|
||||||
<command>pkg_delete</command> to exit abnormally even if
|
<command>pkg_delete</command> to exit abnormally even if
|
||||||
|
|
@ -3435,8 +3397,7 @@ lib/X11/oneko/sounds/cat.au
|
||||||
other ports. This is the current list of UIDs between 50 and
|
other ports. This is the current list of UIDs between 50 and
|
||||||
99.</para>
|
99.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||||
majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
|
||||||
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
||||||
gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh
|
gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh
|
||||||
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
|
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
|
||||||
|
|
@ -3588,8 +3549,7 @@ vpopmail:*:89:89::0:0:User &:/usr/local/vpopmail:/nonexistent</programlisting>
|
||||||
linkend="porting-portlint">portlint</link> to check the
|
linkend="porting-portlint">portlint</link> to check the
|
||||||
<filename>Makefile</filename>.</para>
|
<filename>Makefile</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>[the header...just to make it easier for us to identify the ports.]
|
||||||
[the header...just to make it easier for us to identify the ports.]
|
|
||||||
# New ports collection makefile for: xdvi
|
# New ports collection makefile for: xdvi
|
||||||
[the "version required" line is only needed when the PORTVERSION
|
[the "version required" line is only needed when the PORTVERSION
|
||||||
variable is not specific enough to describe the port.]
|
variable is not specific enough to describe the port.]
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/ppp-primer/book.sgml,v 1.6 2001/01/17 07:22:10 brian Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/ppp-primer/book.sgml,v 1.7 2001/04/05 01:44:24 dd Exp $</pubdate>
|
||||||
|
|
||||||
<abstract><para>This is a step-by-step guide for configuring FreeBSD systems to act as
|
<abstract><para>This is a step-by-step guide for configuring FreeBSD systems to act as
|
||||||
a dial-up router/gateway in a Local Area Environment. All entries may
|
a dial-up router/gateway in a Local Area Environment. All entries may
|
||||||
|
|
@ -786,8 +786,7 @@ dial-out Internet gateway for our example LAN:
|
||||||
<emphasis>must</emphasis> be indented!</para>
|
<emphasis>must</emphasis> be indented!</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>################################################################
|
||||||
################################################################
|
|
||||||
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
||||||
#
|
#
|
||||||
# Default settings; These are always executed always when PPP
|
# Default settings; These are always executed always when PPP
|
||||||
|
|
@ -836,8 +835,7 @@ demand:
|
||||||
set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0
|
set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0
|
||||||
add 0 0 127.2.2.2
|
add 0 0 127.2.2.2
|
||||||
################################################################
|
################################################################
|
||||||
# End of /etc/ppp/ppp.conf
|
# End of /etc/ppp/ppp.conf</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
This file, taken verbatim from a working system, has three relevant
|
This file, taken verbatim from a working system, has three relevant
|
||||||
configuration sections:</para>
|
configuration sections:</para>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/fonts/article.sgml,v 1.9 2000/07/26 18:24:28 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/fonts/article.sgml,v 1.10 2001/03/11 07:48:57 hrs Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||||
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
||||||
|
|
@ -230,8 +230,7 @@
|
||||||
your locale):</para>
|
your locale):</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).
|
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).</programlisting>
|
||||||
</programlisting>
|
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>The command to actually switch the mode is
|
<para>The command to actually switch the mode is
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/new-users/article.sgml,v 1.15 2000/10/30 00:58:45 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/new-users/article.sgml,v 1.16 2000/11/21 13:46:23 ben Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
|
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||||
|
|
@ -899,8 +899,7 @@
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls
|
setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
||||||
</programlisting>
|
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>This assumes that the file <filename>XKeysymDB</filename> and the
|
<para>This assumes that the file <filename>XKeysymDB</filename> and the
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/programming-tools/article.sgml,v 1.12 2000/07/26 18:24:50 jim Exp $ -->
|
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/programming-tools/article.sgml,v 1.13 2000/08/22 20:03:31 marko Exp $ -->
|
||||||
<!-- The FreeBSD Documentation Project -->
|
<!-- The FreeBSD Documentation Project -->
|
||||||
|
|
||||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||||
|
|
@ -1069,8 +1069,7 @@ free(foo);
|
||||||
<para>Here's a very simple make file:</para>
|
<para>Here's a very simple make file:</para>
|
||||||
|
|
||||||
<programlisting>foo: foo.c
|
<programlisting>foo: foo.c
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>It consists of two lines, a dependency line and a creation
|
<para>It consists of two lines, a dependency line and a creation
|
||||||
line.</para>
|
line.</para>
|
||||||
|
|
@ -1114,8 +1113,7 @@ free(foo);
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp foo /home/me
|
cp foo /home/me</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>We can tell make which target we want to make by
|
<para>We can tell make which target we want to make by
|
||||||
typing:</para>
|
typing:</para>
|
||||||
|
|
@ -1168,8 +1166,7 @@ install:
|
||||||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, if we go to the directory for this port and type
|
<para>Now, if we go to the directory for this port and type
|
||||||
<userinput>make</userinput>, the following happens:</para>
|
<userinput>make</userinput>, the following happens:</para>
|
||||||
|
|
@ -1283,8 +1280,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
<filename>/usr/local/info</filename> directory to add an entry
|
<filename>/usr/local/info</filename> directory to add an entry
|
||||||
for it. This involves adding a line like</para>
|
for it. This involves adding a line like</para>
|
||||||
|
|
||||||
<programlisting> * Make: (make). The GNU Make utility.
|
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>to the file. Once you have done this, you can type
|
<para>to the file. Once you have done this, you can type
|
||||||
<userinput>info</userinput> and then select
|
<userinput>info</userinput> and then select
|
||||||
|
|
@ -1390,8 +1386,7 @@ main() {
|
||||||
int bazz(int anint) {
|
int bazz(int anint) {
|
||||||
printf("You gave me %d\n", anint);
|
printf("You gave me %d\n", anint);
|
||||||
return anint;
|
return anint;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This program sets <symbol>i</symbol> to be
|
<para>This program sets <symbol>i</symbol> to be
|
||||||
<literal>5</literal> and passes it to a function
|
<literal>5</literal> and passes it to a function
|
||||||
|
|
@ -1447,8 +1442,7 @@ main() {
|
||||||
|
|
||||||
i = 5;
|
i = 5;
|
||||||
printf("This is my program\n");
|
printf("This is my program\n");
|
||||||
<lineannotation>&hellip</>
|
<lineannotation>&hellip</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||||
|
|
@ -2170,8 +2164,7 @@ in font-lock-auto-mode-list"
|
||||||
("\\.lsp$" . lisp-mode)
|
("\\.lsp$" . lisp-mode)
|
||||||
("\\.wiz$" . whizbang-mode)
|
("\\.wiz$" . whizbang-mode)
|
||||||
("\\.scm$" . scheme-mode)
|
("\\.scm$" . scheme-mode)
|
||||||
<lineannotation>…</>
|
<lineannotation>…</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will automatically go into
|
<para>This means that Emacs will automatically go into
|
||||||
<function>whizbang-mode</function> when you edit a file ending
|
<function>whizbang-mode</function> when you edit a file ending
|
||||||
|
|
@ -2184,8 +2177,7 @@ in font-lock-auto-mode-list"
|
||||||
<programlisting>;; Auto font lock mode
|
<programlisting>;; Auto font lock mode
|
||||||
(defvar font-lock-auto-mode-list
|
(defvar font-lock-auto-mode-list
|
||||||
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
||||||
"List of modes to always start in font-lock-mode")
|
"List of modes to always start in font-lock-mode")</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will always enable
|
<para>This means that Emacs will always enable
|
||||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.2 2000/12/04 11:34:57 alex Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.3 2000/12/04 11:39:41 alex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="driverbasics">
|
<chapter id="driverbasics">
|
||||||
|
|
@ -60,8 +60,7 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>Skeleton Layout of a kernel module</para>
|
<para>Skeleton Layout of a kernel module</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* KLD Skeleton
|
* KLD Skeleton
|
||||||
* Inspired by Andrew Reiter's Daemonnews article
|
* Inspired by Andrew Reiter's Daemonnews article
|
||||||
*/
|
*/
|
||||||
|
|
@ -98,20 +97,17 @@ skel_loader(struct module *m, int what, void *arg)
|
||||||
|
|
||||||
/* Declare this module to the rest of the kernel */
|
/* Declare this module to the rest of the kernel */
|
||||||
|
|
||||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Makefile</title>
|
<title>Makefile</title>
|
||||||
<para>FreeBSD provides a makefile include that you can use
|
<para>FreeBSD provides a makefile include that you can use
|
||||||
to quickly compile your kernel addition.</para>
|
to quickly compile your kernel addition.</para>
|
||||||
<programlisting>
|
<programlisting>SRCS=skeleton.c
|
||||||
SRCS=skeleton.c
|
|
||||||
KMOD=skeleton
|
KMOD=skeleton
|
||||||
|
|
||||||
.include <bsd.kmod.mk>
|
.include <bsd.kmod.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
|
||||||
<para>Simply running <command>make</command> with
|
<para>Simply running <command>make</command> with
|
||||||
|
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
||||||
<para>This simple example pseudo-device remembers whatever values you write
|
<para>This simple example pseudo-device remembers whatever values you write
|
||||||
to it and can then supply them back to you when you read from
|
to it and can then supply them back to you when you read from
|
||||||
it.</para>
|
it.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple `echo' pseudo-device KLD
|
* Simple `echo' pseudo-device KLD
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
||||||
return(err);
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEV_MODULE(echo,echo_loader,NULL);
|
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>To install this driver you will first need to make a node on
|
<para>To install this driver you will first need to make a node on
|
||||||
your filesystem with a command such as : </para>
|
your filesystem with a command such as : </para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/pci/chapter.sgml,v 1.1 2000/11/28 19:07:46 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="pci">
|
<chapter id="pci">
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
<para>Information here about how the PCI bus code iterates
|
<para>Information here about how the PCI bus code iterates
|
||||||
through the unattached devices and see if a newly loaded kld
|
through the unattached devices and see if a newly loaded kld
|
||||||
will attach to any of them.</para>
|
will attach to any of them.</para>
|
||||||
<programlisting>
|
<programlisting>/*
|
||||||
/*
|
|
||||||
* Simple KLD to play with the PCI functions.
|
* Simple KLD to play with the PCI functions.
|
||||||
*
|
*
|
||||||
* Murray Stokely
|
* Murray Stokely
|
||||||
|
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
||||||
|
|
||||||
static devclass_t mypci_devclass;
|
static devclass_t mypci_devclass;
|
||||||
|
|
||||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Additional Resources
|
<para>Additional Resources
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/scsi/chapter.sgml,v 1.1 2001/03/29 06:14:42 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="scsi">
|
<chapter id="scsi">
|
||||||
|
|
@ -89,14 +89,12 @@
|
||||||
<para>A typical SIM driver needs to include the following
|
<para>A typical SIM driver needs to include the following
|
||||||
CAM-related header files:</para>
|
CAM-related header files:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#include <cam/cam.h>
|
||||||
#include <cam/cam.h>
|
|
||||||
#include <cam/cam_ccb.h>
|
#include <cam/cam_ccb.h>
|
||||||
#include <cam/cam_sim.h>
|
#include <cam/cam_sim.h>
|
||||||
#include <cam/cam_xpt_sim.h>
|
#include <cam/cam_xpt_sim.h>
|
||||||
#include <cam/cam_debug.h>
|
#include <cam/cam_debug.h>
|
||||||
#include <cam/scsi/scsi_all.h>
|
#include <cam/scsi/scsi_all.h></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The first thing each SIM driver must do is register itself
|
<para>The first thing each SIM driver must do is register itself
|
||||||
with the CAM subsystem. This is done during the driver's
|
with the CAM subsystem. This is done during the driver's
|
||||||
|
|
@ -109,35 +107,29 @@
|
||||||
<para>This is achieved in multiple steps: first it's necessary to
|
<para>This is achieved in multiple steps: first it's necessary to
|
||||||
allocate the queue of requests associated with this SIM:</para>
|
allocate the queue of requests associated with this SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_devq *devq;
|
||||||
struct cam_devq *devq;
|
|
||||||
|
|
||||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Here SIZE is the size of the queue to be allocated, maximal
|
<para>Here SIZE is the size of the queue to be allocated, maximal
|
||||||
number of requests it could contain. It's the number of requests
|
number of requests it could contain. It's the number of requests
|
||||||
that the SIM driver can handle in parallel on one SCSI
|
that the SIM driver can handle in parallel on one SCSI
|
||||||
card. Commonly it can be calculated as:</para>
|
card. Commonly it can be calculated as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Next we create a descriptor of our SIM:</para>
|
<para>Next we create a descriptor of our SIM:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_sim *sim;
|
||||||
struct cam_sim *sim;
|
|
||||||
|
|
||||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||||
softc, unit, max_dev_transactions,
|
softc, unit, max_dev_transactions,
|
||||||
max_tagged_dev_transactions, devq) )==NULL) {
|
max_tagged_dev_transactions, devq) )==NULL) {
|
||||||
cam_simq_free(devq);
|
cam_simq_free(devq);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Note that if we are not able to create a SIM descriptor we
|
<para>Note that if we are not able to create a SIM descriptor we
|
||||||
free the <structname>devq</structname> also because we can do
|
free the <structname>devq</structname> also because we can do
|
||||||
|
|
@ -218,12 +210,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>Finally we register the SCSI buses associated with our SCSI
|
<para>Finally we register the SCSI buses associated with our SCSI
|
||||||
adapter:</para>
|
adapter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
|
||||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||||
error; /* some code to handle the error */
|
error; /* some code to handle the error */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If there is one <structName>devq</structName> structure per
|
<para>If there is one <structName>devq</structName> structure per
|
||||||
SCSI bus (i.e. we consider a card with multiple buses as
|
SCSI bus (i.e. we consider a card with multiple buses as
|
||||||
|
|
@ -260,8 +250,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
can create the path for the future bus reset events in advance
|
can create the path for the future bus reset events in advance
|
||||||
and avoid problems with the future memory shortage:</para>
|
and avoid problems with the future memory shortage:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct cam_path *path;
|
||||||
struct cam_path *path;
|
|
||||||
|
|
||||||
if(xpt_create_path(&path, /*periph*/NULL,
|
if(xpt_create_path(&path, /*periph*/NULL,
|
||||||
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
cam_sim_path(sim), CAM_TARGET_WILDCARD,
|
||||||
|
|
@ -272,8 +261,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
softc->wpath = path;
|
softc->wpath = path;
|
||||||
softc->sim = sim;
|
softc->sim = sim;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As you can see the path includes:</para>
|
<para>As you can see the path includes:</para>
|
||||||
|
|
||||||
|
|
@ -310,16 +298,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request is passed to CAM by requesting CAM action on a CAM
|
request is passed to CAM by requesting CAM action on a CAM
|
||||||
control block for this type of request:</para>
|
control block for this type of request:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_setasync csa;
|
||||||
struct ccb_setasync csa;
|
|
||||||
|
|
||||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||||
csa.event_enable = AC_LOST_DEVICE;
|
csa.event_enable = AC_LOST_DEVICE;
|
||||||
csa.callback = xxx_async;
|
csa.callback = xxx_async;
|
||||||
csa.callback_arg = sim;
|
csa.callback_arg = sim;
|
||||||
xpt_action((union ccb *)&csa);
|
xpt_action((union ccb *)&csa);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we take a look at the <function>xxx_action()</function>
|
<para>Now we take a look at the <function>xxx_action()</function>
|
||||||
and <function>xxx_poll()</function> driver entry points.</para>
|
and <function>xxx_poll()</function> driver entry points.</para>
|
||||||
|
|
@ -377,8 +363,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<function>xxx_action()</function> consists of a big
|
<function>xxx_action()</function> consists of a big
|
||||||
switch:</para>
|
switch:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
|
||||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||||
int unit = cam_sim_unit(sim);
|
int unit = cam_sim_unit(sim);
|
||||||
int bus = cam_sim_bus(sim);
|
int bus = cam_sim_bus(sim);
|
||||||
|
|
@ -390,8 +375,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_REQ_INVALID;
|
ccb_h->status = CAM_REQ_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>As can be seen from the default case (if an unknown command
|
<para>As can be seen from the default case (if an unknown command
|
||||||
was received) the return code of the command is set into
|
was received) the return code of the command is set into
|
||||||
|
|
@ -505,10 +489,8 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
is to define some meaningful names for them and use these
|
is to define some meaningful names for them and use these
|
||||||
meaningful names in the driver, like:</para>
|
meaningful names in the driver, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The most common initiator mode requests are:</para>
|
<para>The most common initiator mode requests are:</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
@ -581,20 +563,17 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
make sure that the command did not get aborted when it was
|
make sure that the command did not get aborted when it was
|
||||||
sitting in the queue:</para>
|
sitting in the queue:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||||
struct ccb_scsiio *csio = &ccb->csio;
|
|
||||||
|
|
||||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Also we check that the device is supported at all by our
|
<para>Also we check that the device is supported at all by our
|
||||||
controller:</para>
|
controller:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
|
||||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||||
ccb_h->status = CAM_TID_INVALID;
|
ccb_h->status = CAM_TID_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
|
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb_h->status = CAM_LUN_INVALID;
|
ccb_h->status = CAM_LUN_INVALID;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then allocate whatever data structures (such as
|
<para>Then allocate whatever data structures (such as
|
||||||
card-dependent hardware control block) we need to process this
|
card-dependent hardware control block) we need to process this
|
||||||
|
|
@ -617,8 +595,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
well, link the CCB with the hardware control block (HCB) and
|
well, link the CCB with the hardware control block (HCB) and
|
||||||
mark it as queued.</para>
|
mark it as queued.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
|
||||||
|
|
||||||
if(hcb == NULL) {
|
if(hcb == NULL) {
|
||||||
softc->flags |= RESOURCE_SHORTAGE;
|
softc->flags |= RESOURCE_SHORTAGE;
|
||||||
|
|
@ -629,8 +606,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;
|
||||||
ccb_h->status |= CAM_SIM_QUEUED;
|
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Extract the target data from CCB into the hardware control
|
<para>Extract the target data from CCB into the hardware control
|
||||||
block. Check if we are asked to assign a tag and if yes then
|
block. Check if we are asked to assign a tag and if yes then
|
||||||
|
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
devices to set the maximal mutually supported bus width,
|
devices to set the maximal mutually supported bus width,
|
||||||
synchronous rate and offset.</para>
|
synchronous rate and offset.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
|
||||||
generate_identify_message(hcb);
|
generate_identify_message(hcb);
|
||||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||||
if( !target_negotiated(hcb) )
|
if( !target_negotiated(hcb) )
|
||||||
generate_negotiation_messages(hcb);
|
generate_negotiation_messages(hcb);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then set up the SCSI command. The command storage may be
|
<para>Then set up the SCSI command. The command storage may be
|
||||||
specified in the CCB in many interesting ways, specified by
|
specified in the CCB in many interesting ways, specified by
|
||||||
|
|
@ -671,8 +645,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
back to a virtual address but with big pain, so we don't do
|
back to a virtual address but with big pain, so we don't do
|
||||||
that.</para>
|
that.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
|
||||||
/* CDB is a pointer */
|
/* CDB is a pointer */
|
||||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||||
/* CDB pointer is virtual */
|
/* CDB pointer is virtual */
|
||||||
|
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
/* CDB is in the ccb (buffer) */
|
/* CDB is in the ccb (buffer) */
|
||||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||||
}
|
}
|
||||||
hcb->cmdlen = csio->cdb_len;
|
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now it's time to set up the data. Again, the data storage
|
<para>Now it's time to set up the data. Again, the data storage
|
||||||
may be specified in the CCB in many interesting ways,
|
may be specified in the CCB in many interesting ways,
|
||||||
|
|
@ -698,12 +670,10 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
data transfer. The simplest case is if there is no data to
|
data transfer. The simplest case is if there is no data to
|
||||||
transfer:</para>
|
transfer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
|
||||||
|
|
||||||
if (dir == CAM_DIR_NONE)
|
if (dir == CAM_DIR_NONE)
|
||||||
goto end_data;
|
goto end_data;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the data is in one chunk or in a
|
<para>Then we check if the data is in one chunk or in a
|
||||||
scatter-gather list, and the addresses are physical or
|
scatter-gather list, and the addresses are physical or
|
||||||
|
|
@ -722,8 +692,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
the case for a single non-scattered virtual buffer must be
|
the case for a single non-scattered virtual buffer must be
|
||||||
implemented, it's actively used by CAM.</para>
|
implemented, it's actively used by CAM.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int rv;
|
||||||
int rv;
|
|
||||||
|
|
||||||
initialize_hcb_for_data(hcb);
|
initialize_hcb_for_data(hcb);
|
||||||
|
|
||||||
|
|
@ -770,16 +739,13 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
free_hcb_and_ccb_done(hcb, ccb, rv);
|
free_hcb_and_ccb_done(hcb, ccb, rv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
end_data:
|
end_data:</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If disconnection is disabled for this CCB we pass this
|
<para>If disconnection is disabled for this CCB we pass this
|
||||||
information to the hcb:</para>
|
information to the hcb:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
hcb_disable_disconnect(hcb);</programlisting>
|
||||||
hcb_disable_disconnect(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the controller is able to run REQUEST SENSE command all
|
<para>If the controller is able to run REQUEST SENSE command all
|
||||||
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
by itself then the value of the flag CAM_DIS_AUTOSENSE should
|
||||||
|
|
@ -790,18 +756,15 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
to the hardware and return, the rest will be done by the
|
to the hardware and return, the rest will be done by the
|
||||||
interrupt handler (or timeout handler).</para>
|
interrupt handler (or timeout handler).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
|
||||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||||
put_hcb_into_hardware_queue(hcb);
|
put_hcb_into_hardware_queue(hcb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>And here is a possible implementation of the function
|
<para>And here is a possible implementation of the function
|
||||||
returning CCB:</para>
|
returning CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||||
{
|
{
|
||||||
struct xxx_softc *softc = hcb->softc;
|
struct xxx_softc *softc = hcb->softc;
|
||||||
|
|
@ -819,8 +782,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
ccb->ccb_h.status = status |
|
ccb->ccb_h.status = status |
|
||||||
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
(ccb->ccb_h.status & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
<listitem><para><emphasis>XPT_RESET_DEV</emphasis> - send the SCSI "BUS
|
||||||
|
|
@ -859,8 +821,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and those being disconnected, as done with the status
|
and those being disconnected, as done with the status
|
||||||
CAM_SCSI_BUS_RESET. Like:</para>
|
CAM_SCSI_BUS_RESET. Like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int targ, lun;
|
||||||
int targ, lun;
|
|
||||||
struct xxx_hcb *h, *hh;
|
struct xxx_hcb *h, *hh;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Implementing the SCSI bus reset as a function may be a good
|
<para>Implementing the SCSI bus reset as a function may be a good
|
||||||
idea because it would be re-used by the timeout function as a
|
idea because it would be re-used by the timeout function as a
|
||||||
|
|
@ -931,23 +891,20 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
<para>The hard way is to implement this request honestly. First
|
<para>The hard way is to implement this request honestly. First
|
||||||
check that abort applies to a SCSI transaction:</para>
|
check that abort applies to a SCSI transaction:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb *abort_ccb;
|
||||||
struct ccb *abort_ccb;
|
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then it's necessary to find this CCB in our queue. This can
|
<para>Then it's necessary to find this CCB in our queue. This can
|
||||||
be done by walking the list of all our hardware control blocks
|
be done by walking the list of all our hardware control blocks
|
||||||
in search for one associated with this CCB:</para>
|
in search for one associated with this CCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h;
|
||||||
struct xxx_hcb *hcb, *h;
|
|
||||||
|
|
||||||
hcb = NULL;
|
hcb = NULL;
|
||||||
|
|
||||||
|
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hcb=found_hcb;
|
hcb=found_hcb;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now we look at the current processing status of the HCB. It
|
<para>Now we look at the current processing status of the HCB. It
|
||||||
may be either sitting in the queue waiting to be sent to the
|
may be either sitting in the queue waiting to be sent to the
|
||||||
|
|
@ -982,8 +938,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
SCSI bus the SCSI controller will see this flag and skip
|
SCSI bus the SCSI controller will see this flag and skip
|
||||||
it.</para>
|
it.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int hstatus;
|
||||||
int hstatus;
|
|
||||||
|
|
||||||
/* shown as a function, in case special action is needed to make
|
/* shown as a function, in case special action is needed to make
|
||||||
* this flag visible to hardware
|
* this flag visible to hardware
|
||||||
|
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
case HCB_COMPLETED:
|
case HCB_COMPLETED:
|
||||||
/* this is an easy case */
|
/* this is an easy case */
|
||||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is being transferred right now we would like to
|
<para>If the CCB is being transferred right now we would like to
|
||||||
signal to the SCSI controller in some hardware-dependent way
|
signal to the SCSI controller in some hardware-dependent way
|
||||||
|
|
@ -1016,8 +970,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
and mark the aborted CCB as aborted (but not mark it as done
|
and mark the aborted CCB as aborted (but not mark it as done
|
||||||
yet).</para>
|
yet).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||||
case HCB_BEING_TRANSFERRED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1031,16 +984,14 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
goto abort_again;
|
goto abort_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the CCB is in the list of disconnected then set it up as
|
<para>If the CCB is in the list of disconnected then set it up as
|
||||||
an abort request and re-queue it at the front of hardware
|
an abort request and re-queue it at the front of hardware
|
||||||
queue. Reset the timeout and report the abort request to be
|
queue. Reset the timeout and report the abort request to be
|
||||||
completed.</para>
|
completed.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case HCB_DISCONNECTED:
|
||||||
case HCB_DISCONNECTED:
|
|
||||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||||
abort_ccb->ccb_h.timeout_ch =
|
abort_ccb->ccb_h.timeout_ch =
|
||||||
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
timeout(xxx_timeout, (caddr_t) hcb, 10 * hz);
|
||||||
|
|
@ -1050,8 +1001,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>That's all for the ABORT request, although there is one more
|
<para>That's all for the ABORT request, although there is one more
|
||||||
issue. Because the ABORT message cleans all the ongoing
|
issue. Because the ABORT message cleans all the ongoing
|
||||||
|
|
@ -1066,8 +1016,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
request. Then the case XPT_ABORT would be small, like
|
request. Then the case XPT_ABORT would be small, like
|
||||||
that:</para>
|
that:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case XPT_ABORT:
|
||||||
case XPT_ABORT:
|
|
||||||
struct ccb *abort_ccb;
|
struct ccb *abort_ccb;
|
||||||
abort_ccb = ccb->cab.abort_ccb;
|
abort_ccb = ccb->cab.abort_ccb;
|
||||||
|
|
||||||
|
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||||
else
|
else
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||||
|
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
||||||
|
|
||||||
<para>The code looks like:</para>
|
<para>The code looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_trans_settings *cts;
|
||||||
struct ccb_trans_settings *cts;
|
|
||||||
int targ, lun;
|
int targ, lun;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
||||||
}
|
}
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then when the next I/O request will be processed it will
|
<para>Then when the next I/O request will be processed it will
|
||||||
check if it has to re-negotiate, for example by calling the
|
check if it has to re-negotiate, for example by calling the
|
||||||
function target_negotiated(hcb). It can be implemented like
|
function target_negotiated(hcb). It can be implemented like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int
|
||||||
int
|
|
||||||
target_negotiated(struct xxx_hcb *hcb)
|
target_negotiated(struct xxx_hcb *hcb)
|
||||||
{
|
{
|
||||||
struct softc *softc = hcb->softc;
|
struct softc *softc = hcb->softc;
|
||||||
|
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
||||||
return 0; /* FALSE */
|
return 0; /* FALSE */
|
||||||
else
|
else
|
||||||
return 1; /* TRUE */
|
return 1; /* TRUE */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After the values are re-negotiated the resulting values must
|
<para>After the values are re-negotiated the resulting values must
|
||||||
be assigned to both current and goal parameters, so for future
|
be assigned to both current and goal parameters, so for future
|
||||||
|
|
@ -1300,8 +1244,7 @@ of the union ccb:</para>
|
||||||
typical calculation example taken from the aic7xxx driver
|
typical calculation example taken from the aic7xxx driver
|
||||||
is:</para>
|
is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct ccb_calc_geometry *ccg;
|
||||||
struct ccb_calc_geometry *ccg;
|
|
||||||
u_int32_t size_mb;
|
u_int32_t size_mb;
|
||||||
u_int32_t secs_per_cylinder;
|
u_int32_t secs_per_cylinder;
|
||||||
int extended;
|
int extended;
|
||||||
|
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
||||||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||||
xpt_done(ccb);
|
xpt_done(ccb);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This gives the general idea, the exact calculation depends
|
<para>This gives the general idea, the exact calculation depends
|
||||||
on the quirks of the particular BIOS. If BIOS provides no way
|
on the quirks of the particular BIOS. If BIOS provides no way
|
||||||
|
|
@ -1331,10 +1273,8 @@ of the union ccb:</para>
|
||||||
normally be assumed equal to 1. Other popular geometries
|
normally be assumed equal to 1. Other popular geometries
|
||||||
are:</para>
|
are:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||||
128 heads, 63 sectors - Symbios controllers
|
16 heads, 63 sectors - old controllers</programlisting>
|
||||||
16 heads, 63 sectors - old controllers
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||||
with variable success, for example a combination of Symbios
|
with variable success, for example a combination of Symbios
|
||||||
|
|
@ -1447,9 +1387,7 @@ ccb_pathinq cpi" of the union ccb:</para>
|
||||||
<para>The recommended way of setting the string fields is using
|
<para>The recommended way of setting the string fields is using
|
||||||
strncpy, like:</para>
|
strncpy, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);</programlisting>
|
||||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
<para>After setting the values set the status to CAM_REQ_CMP and mark the
|
||||||
CCB as done.</para>
|
CCB as done.</para>
|
||||||
|
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
||||||
gets just the the device unit number. So the poll routine would
|
gets just the the device unit number. So the poll routine would
|
||||||
normally look as:</para>
|
normally look as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>or</para>
|
<para>or</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_poll(struct cam_sim *sim)
|
xxx_poll(struct cam_sim *sim)
|
||||||
{
|
{
|
||||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
||||||
<para>If an asynchronous event callback has been set up then the
|
<para>If an asynchronous event callback has been set up then the
|
||||||
callback function should be defined.</para>
|
callback function should be defined.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>callback_arg - the value supplied when registering the
|
<listitem><para>callback_arg - the value supplied when registering the
|
||||||
|
|
@ -1532,8 +1464,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
<para>Implementation for a single type of event, AC_LOST_DEVICE,
|
||||||
looks like:</para>
|
looks like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_softc *softc;
|
||||||
struct xxx_softc *softc;
|
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
int targ;
|
int targ;
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
|
|
@ -1555,8 +1486,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
@ -1580,8 +1510,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
section. To make sure that the interrupt level will be always
|
section. To make sure that the interrupt level will be always
|
||||||
restored a wrapper function can be defined, like:</para>
|
restored a wrapper function can be defined, like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> static void
|
||||||
static void
|
|
||||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
@ -1594,8 +1523,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
xxx_action1(struct cam_sim *sim, union ccb *ccb)
|
||||||
{
|
{
|
||||||
... process the request ...
|
... process the request ...
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This approach is simple and robust but the problem with it
|
<para>This approach is simple and robust but the problem with it
|
||||||
is that interrupts may get blocked for a relatively long time
|
is that interrupts may get blocked for a relatively long time
|
||||||
|
|
@ -1619,8 +1547,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
probably need also sending RESET signal to the SCSI bus to reset
|
probably need also sending RESET signal to the SCSI bus to reset
|
||||||
the status of the connections with the SCSI devices.</para>
|
the status of the connections with the SCSI devices.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> int fatal=0;
|
||||||
int fatal=0;
|
|
||||||
struct ccb_trans_settings neg;
|
struct ccb_trans_settings neg;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
|
||||||
|
|
@ -1678,8 +1605,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If interrupt is not caused by a controller-wide condition
|
<para>If interrupt is not caused by a controller-wide condition
|
||||||
then probably something has happened to the current hardware
|
then probably something has happened to the current hardware
|
||||||
|
|
@ -1687,8 +1613,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
non-HCB-related events, we just do not consider them here. Then
|
non-HCB-related events, we just do not consider them here. Then
|
||||||
we analyze what happened to this HCB:</para>
|
we analyze what happened to this HCB:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||||
struct xxx_hcb *hcb, *h, *hh;
|
|
||||||
int hcb_status, scsi_status;
|
int hcb_status, scsi_status;
|
||||||
int ccb_status;
|
int ccb_status;
|
||||||
int targ;
|
int targ;
|
||||||
|
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
targ = hcb->target;
|
targ = hcb->target;
|
||||||
hcb_status = get_status_of_current_hcb(softc);
|
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>First we check if the HCB has completed and if so we check
|
<para>First we check if the HCB has completed and if so we check
|
||||||
the returned SCSI status.</para>
|
the returned SCSI status.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb_status == COMPLETED) {
|
||||||
if(hcb_status == COMPLETED) {
|
scsi_status = get_completion_status(hcb);</programlisting>
|
||||||
scsi_status = get_completion_status(hcb);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then look if this status is related to the REQUEST SENSE
|
<para>Then look if this status is related to the REQUEST SENSE
|
||||||
command and if so handle it in a simple way.</para>
|
command and if so handle it in a simple way.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||||
if(hcb->flags & DOING_AUTOSENSE) {
|
|
||||||
if(scsi_status == GOOD) { /* autosense was successful */
|
if(scsi_status == GOOD) { /* autosense was successful */
|
||||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
|
|
@ -1729,16 +1650,14 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Else the command itself has completed, pay more attention to
|
<para>Else the command itself has completed, pay more attention to
|
||||||
details. If auto-sense is not disabled for this CCB and the
|
details. If auto-sense is not disabled for this CCB and the
|
||||||
command has failed with sense data then run REQUEST SENSE
|
command has failed with sense data then run REQUEST SENSE
|
||||||
command to receive that data.</para>
|
command to receive that data.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||||
hcb->ccb->csio.scsi_status = scsi_status;
|
|
||||||
calculate_residue(hcb);
|
calculate_residue(hcb);
|
||||||
|
|
||||||
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
if( (hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0
|
||||||
|
|
@ -1756,8 +1675,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>One typical thing would be negotiation events: negotiation
|
<para>One typical thing would be negotiation events: negotiation
|
||||||
messages received from a SCSI target (in answer to our
|
messages received from a SCSI target (in answer to our
|
||||||
|
|
@ -1765,8 +1683,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
unable to negotiate (rejects our negotiation messages or does
|
unable to negotiate (rejects our negotiation messages or does
|
||||||
not answer them).</para>
|
not answer them).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> switch(hcb_status) {
|
||||||
switch(hcb_status) {
|
|
||||||
case TARGET_REJECTED_WIDE_NEG:
|
case TARGET_REJECTED_WIDE_NEG:
|
||||||
/* revert to 8-bit bus */
|
/* revert to 8-bit bus */
|
||||||
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
softc->current_bus_width[targ] = softc->goal_bus_width[targ] = 8;
|
||||||
|
|
@ -1816,26 +1733,22 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
continue_current_hcb(softc);
|
continue_current_hcb(softc);
|
||||||
return;
|
return;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we handle any errors that could have happened during
|
<para>Then we handle any errors that could have happened during
|
||||||
auto-sense in the same simple-minded way as before. Otherwise we
|
auto-sense in the same simple-minded way as before. Otherwise we
|
||||||
look closer at the details again.</para>
|
look closer at the details again.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||||
if(hcb->flags & DOING_AUTOSENSE)
|
|
||||||
goto autosense_failed;
|
goto autosense_failed;
|
||||||
|
|
||||||
switch(hcb_status) {
|
switch(hcb_status) {</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The next event we consider is unexpected disconnect. Which
|
<para>The next event we consider is unexpected disconnect. Which
|
||||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||||
and abnormal in other cases.</para>
|
and abnormal in other cases.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||||
case UNEXPECTED_DISCONNECT:
|
|
||||||
if(requested_abort(hcb)) {
|
if(requested_abort(hcb)) {
|
||||||
/* abort affects all commands on that target+LUN, so
|
/* abort affects all commands on that target+LUN, so
|
||||||
* mark all disconnected HCBs on that target+LUN as aborted too
|
* mark all disconnected HCBs on that target+LUN as aborted too
|
||||||
|
|
@ -1872,14 +1785,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
}
|
}
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If the target refuses to accept tags we notify CAM about
|
<para>If the target refuses to accept tags we notify CAM about
|
||||||
that and return back all commands for this LUN:</para>
|
that and return back all commands for this LUN:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case TAGS_REJECTED:
|
||||||
case TAGS_REJECTED:
|
|
||||||
/* report the event */
|
/* report the event */
|
||||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||||
neg.valid = CCB_TRANS_TQ_VALID;
|
neg.valid = CCB_TRANS_TQ_VALID;
|
||||||
|
|
@ -1889,14 +1800,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = hcb->lun;
|
lun_to_freeze = hcb->lun;
|
||||||
break;
|
break;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check a number of other conditions, with processing
|
<para>Then we check a number of other conditions, with processing
|
||||||
basically limited to setting the CCB status:</para>
|
basically limited to setting the CCB status:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> case SELECTION_TIMEOUT:
|
||||||
case SELECTION_TIMEOUT:
|
|
||||||
ccb_status = CAM_SEL_TIMEOUT;
|
ccb_status = CAM_SEL_TIMEOUT;
|
||||||
/* request the further code to freeze the queue */
|
/* request the further code to freeze the queue */
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
|
|
@ -1916,14 +1825,12 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||||
break;
|
break;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Then we check if the error was serious enough to freeze the
|
<para>Then we check if the error was serious enough to freeze the
|
||||||
input queue until it gets proceeded and do so if it is:</para>
|
input queue until it gets proceeded and do so if it is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
|
||||||
/* freeze the queue */
|
/* freeze the queue */
|
||||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||||
|
|
||||||
|
|
@ -1939,8 +1846,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
}
|
}
|
||||||
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
free_hcb_and_ccb_done(hcb, hcb->ccb, ccb_status);
|
||||||
schedule_next_hcb(softc);
|
schedule_next_hcb(softc);
|
||||||
return;
|
return;</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This concludes the generic interrupt handling although
|
<para>This concludes the generic interrupt handling although
|
||||||
specific controllers may require some additions.</para>
|
specific controllers may require some additions.</para>
|
||||||
|
|
@ -2046,8 +1952,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||||
device reset request got stuck. So after all the timeout
|
device reset request got stuck. So after all the timeout
|
||||||
function would look like:</para>
|
function would look like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>static void
|
||||||
static void
|
|
||||||
xxx_timeout(void *arg)
|
xxx_timeout(void *arg)
|
||||||
{
|
{
|
||||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||||
|
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
||||||
} else {
|
} else {
|
||||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>When we abort a request all the other disconnected requests
|
<para>When we abort a request all the other disconnected requests
|
||||||
to the same target/LUN get aborted too. So there appears a
|
to the same target/LUN get aborted too. So there appears a
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/secure/chapter.sgml,v 1.1 2000/11/28 18:31:39 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="secure">
|
<chapter id="secure">
|
||||||
|
|
@ -121,8 +121,7 @@
|
||||||
instruction immediately following the function call. (Inspired
|
instruction immediately following the function call. (Inspired
|
||||||
by <xref linkend="Phrack">)</para>
|
by <xref linkend="Phrack">)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#include <sgmltag>stdio.h</sgmltag>
|
||||||
#include <sgmltag>stdio.h</sgmltag>
|
|
||||||
|
|
||||||
void manipulate(char *buffer) {
|
void manipulate(char *buffer) {
|
||||||
char newbuffer[80];
|
char newbuffer[80];
|
||||||
|
|
@ -140,8 +139,7 @@ int main() {
|
||||||
i=2;
|
i=2;
|
||||||
printf("The value of i is : %d\n",i);
|
printf("The value of i is : %d\n",i);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Let us examine what the memory image of this process would
|
<para>Let us examine what the memory image of this process would
|
||||||
look like if we were to input 160 spaces into our little program
|
look like if we were to input 160 spaces into our little program
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD:$
|
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/tools/chapter.sgml,v 1.1 2000/11/28 18:21:36 asmodai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="tools">
|
<chapter id="tools">
|
||||||
|
|
@ -1060,8 +1060,7 @@ free(foo);
|
||||||
<para>Here's a very simple make file:</para>
|
<para>Here's a very simple make file:</para>
|
||||||
|
|
||||||
<programlisting>foo: foo.c
|
<programlisting>foo: foo.c
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>It consists of two lines, a dependency line and a creation
|
<para>It consists of two lines, a dependency line and a creation
|
||||||
line.</para>
|
line.</para>
|
||||||
|
|
@ -1105,8 +1104,7 @@ free(foo);
|
||||||
cc -o foo foo.c
|
cc -o foo foo.c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp foo /home/me
|
cp foo /home/me</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>We can tell make which target we want to make by
|
<para>We can tell make which target we want to make by
|
||||||
typing:</para>
|
typing:</para>
|
||||||
|
|
@ -1159,8 +1157,7 @@ install:
|
||||||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, if we go to the directory for this port and type
|
<para>Now, if we go to the directory for this port and type
|
||||||
<userinput>make</userinput>, the following happens:</para>
|
<userinput>make</userinput>, the following happens:</para>
|
||||||
|
|
@ -1274,8 +1271,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||||
<filename>/usr/local/info</filename> directory to add an entry
|
<filename>/usr/local/info</filename> directory to add an entry
|
||||||
for it. This involves adding a line like</para>
|
for it. This involves adding a line like</para>
|
||||||
|
|
||||||
<programlisting> * Make: (make). The GNU Make utility.
|
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>to the file. Once you have done this, you can type
|
<para>to the file. Once you have done this, you can type
|
||||||
<userinput>info</userinput> and then select
|
<userinput>info</userinput> and then select
|
||||||
|
|
@ -1381,8 +1377,7 @@ main() {
|
||||||
int bazz(int anint) {
|
int bazz(int anint) {
|
||||||
printf("You gave me %d\n", anint);
|
printf("You gave me %d\n", anint);
|
||||||
return anint;
|
return anint;
|
||||||
}
|
}</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This program sets <symbol>i</symbol> to be
|
<para>This program sets <symbol>i</symbol> to be
|
||||||
<literal>5</literal> and passes it to a function
|
<literal>5</literal> and passes it to a function
|
||||||
|
|
@ -1438,8 +1433,7 @@ main() {
|
||||||
|
|
||||||
i = 5;
|
i = 5;
|
||||||
printf("This is my program\n");
|
printf("This is my program\n");
|
||||||
<lineannotation>&hellip</>
|
<lineannotation>&hellip</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||||
|
|
@ -2162,8 +2156,7 @@ in font-lock-auto-mode-list"
|
||||||
("\\.lsp$" . lisp-mode)
|
("\\.lsp$" . lisp-mode)
|
||||||
("\\.wiz$" . whizbang-mode)
|
("\\.wiz$" . whizbang-mode)
|
||||||
("\\.scm$" . scheme-mode)
|
("\\.scm$" . scheme-mode)
|
||||||
<lineannotation>…</>
|
<lineannotation>…</></programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will automatically go into
|
<para>This means that Emacs will automatically go into
|
||||||
<function>whizbang-mode</function> when you edit a file ending
|
<function>whizbang-mode</function> when you edit a file ending
|
||||||
|
|
@ -2176,8 +2169,7 @@ in font-lock-auto-mode-list"
|
||||||
<programlisting>;; Auto font lock mode
|
<programlisting>;; Auto font lock mode
|
||||||
(defvar font-lock-auto-mode-list
|
(defvar font-lock-auto-mode-list
|
||||||
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'whizbang-mode 'lisp-mode 'perl-mode 'scheme-mode)
|
||||||
"List of modes to always start in font-lock-mode")
|
"List of modes to always start in font-lock-mode")</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This means that Emacs will always enable
|
<para>This means that Emacs will always enable
|
||||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<corpauthor>The FreeBSD Documentation Project</corpauthor>
|
<corpauthor>The FreeBSD Documentation Project</corpauthor>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.165 2001/04/03 02:07:13 dd Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.166 2001/04/08 18:51:50 dd Exp $</pubdate>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>1995</year>
|
<year>1995</year>
|
||||||
|
|
@ -2763,8 +2763,7 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on
|
||||||
<para>Add the following lines to your kernel configuration
|
<para>Add the following lines to your kernel configuration
|
||||||
file, and rebuild the kernel.</para>
|
file, and rebuild the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device uhci
|
||||||
device uhci
|
|
||||||
device ohci
|
device ohci
|
||||||
device usb
|
device usb
|
||||||
device ukbd
|
device ukbd
|
||||||
|
|
@ -2773,8 +2772,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
||||||
<para>In versions of FreeBSD before 4.0, use this
|
<para>In versions of FreeBSD before 4.0, use this
|
||||||
instead:</para>
|
instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>controller uhci0
|
||||||
controller uhci0
|
|
||||||
controller ohci0
|
controller ohci0
|
||||||
controller usb0
|
controller usb0
|
||||||
controller ukbd0
|
controller ukbd0
|
||||||
|
|
@ -2794,8 +2792,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
||||||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||||
following lines:</para>
|
following lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>usbd_enable="YES"
|
||||||
usbd_enable="YES"
|
|
||||||
usbd_flags=""</programlisting>
|
usbd_flags=""</programlisting>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
@ -3024,8 +3021,7 @@ moused_flags=""</programlisting>
|
||||||
<para>Add the following lines to your kernel configuration
|
<para>Add the following lines to your kernel configuration
|
||||||
file, and rebuild the kernel.</para>
|
file, and rebuild the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device uhci
|
||||||
device uhci
|
|
||||||
device ohci
|
device ohci
|
||||||
device usb
|
device usb
|
||||||
device ums</programlisting>
|
device ums</programlisting>
|
||||||
|
|
@ -3033,8 +3029,7 @@ device ums</programlisting>
|
||||||
<para>In versions of FreeBSD before 4.0, use this
|
<para>In versions of FreeBSD before 4.0, use this
|
||||||
instead:</para>
|
instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>controller uhci0
|
||||||
controller uhci0
|
|
||||||
controller ohci0
|
controller ohci0
|
||||||
controller usb0
|
controller usb0
|
||||||
device ums0</programlisting>
|
device ums0</programlisting>
|
||||||
|
|
@ -3052,8 +3047,7 @@ device ums0</programlisting>
|
||||||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||||
following lines:</para>
|
following lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>moused_enable="YES"
|
||||||
moused_enable="YES"
|
|
||||||
moused_type="auto"
|
moused_type="auto"
|
||||||
moused_port="/dev/ums0"
|
moused_port="/dev/ums0"
|
||||||
moused_flags=""
|
moused_flags=""
|
||||||
|
|
@ -3070,16 +3064,14 @@ usbd_flags=""</programlisting>
|
||||||
3.3.2 or later, be sure to have the following lines in the
|
3.3.2 or later, be sure to have the following lines in the
|
||||||
<emphasis>Pointer</emphasis> section:</para>
|
<emphasis>Pointer</emphasis> section:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Device "/dev/sysmouse"
|
||||||
Device "/dev/sysmouse"
|
|
||||||
Protocol "Auto"</programlisting>
|
Protocol "Auto"</programlisting>
|
||||||
|
|
||||||
<para>If you are using earlier versions of XFree86, be sure to
|
<para>If you are using earlier versions of XFree86, be sure to
|
||||||
have the following lines in the <emphasis>Pointer</emphasis>
|
have the following lines in the <emphasis>Pointer</emphasis>
|
||||||
section:</para>
|
section:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Device "/dev/sysmouse"
|
||||||
Device "/dev/sysmouse"
|
|
||||||
Protocol "SysMouse"</programlisting>
|
Protocol "SysMouse"</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
@ -3127,8 +3119,7 @@ Protocol "SysMouse"</programlisting>
|
||||||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||||
kernel.</para>
|
kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: psm.c
|
||||||
Index: psm.c
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||||
retrieving revision 1.60.2.1
|
retrieving revision 1.60.2.1
|
||||||
|
|
@ -4356,13 +4347,11 @@ IO range check 0x00 activate 0x01</screen>
|
||||||
will fit) or part of the <emphasis>Device Description</emphasis>
|
will fit) or part of the <emphasis>Device Description</emphasis>
|
||||||
from the output of &man.pnpinfo.8;:</para>
|
from the output of &man.pnpinfo.8;:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||||
{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
|
||||||
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
||||||
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
||||||
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
||||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
|
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Add the hexadecimal Vendor ID for your device in the
|
<para>Add the hexadecimal Vendor ID for your device in the
|
||||||
correct place, save the file, rebuild your kernel, and reboot.
|
correct place, save the file, rebuild your kernel, and reboot.
|
||||||
|
|
@ -7242,8 +7231,7 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
|
||||||
<para>Then edit <filename>/etc/XF86Config</filename> and make
|
<para>Then edit <filename>/etc/XF86Config</filename> and make
|
||||||
sure you have the following lines.</para>
|
sure you have the following lines.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Section Pointer
|
||||||
Section Pointer
|
|
||||||
Protocol "SysMouse"
|
Protocol "SysMouse"
|
||||||
Device "/dev/sysmouse"
|
Device "/dev/sysmouse"
|
||||||
.....</programlisting>
|
.....</programlisting>
|
||||||
|
|
@ -7328,8 +7316,7 @@ Device "/dev/sysmouse"
|
||||||
Protocol "SysMouse"
|
Protocol "SysMouse"
|
||||||
Device "/dev/sysmouse"
|
Device "/dev/sysmouse"
|
||||||
Buttons 5
|
Buttons 5
|
||||||
EndSection
|
EndSection</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
|
|
@ -7398,8 +7385,7 @@ EndSection</programlisting>
|
||||||
Protocol "IntelliMouse"
|
Protocol "IntelliMouse"
|
||||||
Device "/dev/psm0"
|
Device "/dev/psm0"
|
||||||
ZAxisMapping 4 5
|
ZAxisMapping 4 5
|
||||||
EndSection
|
EndSection</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
@ -7454,8 +7440,7 @@ EndSection
|
||||||
(scroll-up imwheel-scroll-interval))
|
(scroll-up imwheel-scroll-interval))
|
||||||
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||||
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||||
;;; end imwheel section
|
;;; end imwheel section</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>For <application>Xemacs</application>, add the
|
<para>For <application>Xemacs</application>, add the
|
||||||
|
|
@ -7476,8 +7461,7 @@ EndSection
|
||||||
(scroll-up imwheel-scroll-interval))
|
(scroll-up imwheel-scroll-interval))
|
||||||
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||||
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||||
;;; end imwheel section
|
;;; end imwheel section</programlisting>
|
||||||
</programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
@ -8478,8 +8462,7 @@ SMC EtherPower (Model 8432)
|
||||||
TopWare TE-3500P
|
TopWare TE-3500P
|
||||||
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
||||||
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
||||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)
|
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)</programlisting>
|
||||||
</programlisting>
|
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/sgml-primer/chapter.sgml,v 1.14 2000/10/31 19:36:16 nik Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/sgml-primer/chapter.sgml,v 1.15 2000/11/01 22:38:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sgml-primer">
|
<chapter id="sgml-primer">
|
||||||
|
|
@ -215,8 +215,7 @@
|
||||||
the element is a paragraph, called <literal>p</literal>. This
|
the element is a paragraph, called <literal>p</literal>. This
|
||||||
element has both start and end tags.</para>
|
element has both start and end tags.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
||||||
<![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
|
||||||
the 'p' element, and it will end with the end tag for the 'p'
|
the 'p' element, and it will end with the end tag for the 'p'
|
||||||
element.</p>
|
element.</p>
|
||||||
|
|
||||||
|
|
@ -235,8 +234,7 @@
|
||||||
<literal>hr</literal>. This element does not wrap content, so only
|
<literal>hr</literal>. This element does not wrap content, so only
|
||||||
has a start tag.</para>
|
has a start tag.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a paragraph.</p>
|
||||||
<![ CDATA [<p>This is a paragraph.</p>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
@ -252,8 +250,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||||
<![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
|
||||||
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
|
|
@ -303,8 +300,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Using an element with an attribute</title>
|
<title>Using an element with an attribute</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p align="left">The inclusion of the align attribute
|
||||||
<![ CDATA [<p align="left">The inclusion of the align attribute
|
|
||||||
on this paragraph was superfluous, since the default is left.</p>
|
on this paragraph was superfluous, since the default is left.</p>
|
||||||
|
|
||||||
<p align="center">This may appear in the center.</p>]]></programlisting>
|
<p align="center">This may appear in the center.</p>]]></programlisting>
|
||||||
|
|
@ -319,8 +315,7 @@
|
||||||
<example>
|
<example>
|
||||||
<title>Single quotes around attributes</title>
|
<title>Single quotes around attributes</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||||
<![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>Sometimes you do not need to use quotes around attribute values at
|
<para>Sometimes you do not need to use quotes around attribute values at
|
||||||
|
|
@ -352,8 +347,7 @@
|
||||||
<title><filename>.profile</filename>, for &man.sh.1; and
|
<title><filename>.profile</filename>, for &man.sh.1; and
|
||||||
&man.bash.1; users</title>
|
&man.bash.1; users</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>SGML_ROOT=/usr/local/share/sgml
|
||||||
SGML_ROOT=/usr/local/share/sgml
|
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
||||||
SGML_CATALOG_FILES=${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
SGML_CATALOG_FILES=${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
||||||
|
|
@ -365,8 +359,7 @@ export SGML_CATALOG_FILES</programlisting>
|
||||||
<title><filename>.login</filename>, for &man.csh.1; and
|
<title><filename>.login</filename>, for &man.csh.1; and
|
||||||
&man.tcsh.1; users</title>
|
&man.tcsh.1; users</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>setenv SGML_ROOT /usr/local/share/sgml
|
||||||
setenv SGML_ROOT /usr/local/share/sgml
|
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/jade/catalog
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/jade/catalog
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/iso8879/catalog:$SGML_CATALOG_FILES
|
||||||
setenv SGML_CATALOG_FILES ${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
setenv SGML_CATALOG_FILES ${SGML_ROOT}/html/catalog:$SGML_CATALOG_FILES
|
||||||
|
|
@ -383,8 +376,7 @@ setenv SGML_CATALOG_FILES ${SGML_ROOT}/docbook/catalog:$SGML_CATALOG_FILES</prog
|
||||||
<para>Create <filename>example.sgml</filename>, and enter the
|
<para>Create <filename>example.sgml</filename>, and enter the
|
||||||
following text;</para>
|
following text;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
@ -532,8 +524,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
<para>A typical declaration for a document written to conform with version
|
<para>A typical declaration for a document written to conform with version
|
||||||
4.0 of the HTML DTD looks like this;</para>
|
4.0 of the HTML DTD looks like this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
|
||||||
|
|
||||||
<para>That line contains a number of different components.</para>
|
<para>That line contains a number of different components.</para>
|
||||||
|
|
||||||
|
|
@ -603,8 +594,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
<para>FPIs must follow a specific syntax. This syntax is as
|
<para>FPIs must follow a specific syntax. This syntax is as
|
||||||
follows;</para>
|
follows;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||||
"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|
@ -693,8 +683,7 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished</screen>
|
||||||
map FPIs to filenames. For example, if the catalog file contained
|
map FPIs to filenames. For example, if the catalog file contained
|
||||||
the line;</para>
|
the line;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|
||||||
|
|
||||||
<para>The SGML processor would know to look up the DTD from
|
<para>The SGML processor would know to look up the DTD from
|
||||||
<filename>strict.dtd</filename> in the <filename>4.0</filename>
|
<filename>strict.dtd</filename> in the <filename>4.0</filename>
|
||||||
|
|
@ -754,8 +743,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>The syntax for this is slightly different:</para>
|
<para>The syntax for this is slightly different:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||||
<![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
|
||||||
|
|
||||||
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
||||||
processor should locate the DTD in a system specific fashion. This
|
processor should locate the DTD in a system specific fashion. This
|
||||||
|
|
@ -807,8 +795,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>SGML generic comment</title>
|
<title>SGML generic comment</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!-- test comment --></programlisting>
|
||||||
<!-- test comment --></programlisting>
|
|
||||||
|
|
||||||
<programlisting><![ CDATA [
|
<programlisting><![ CDATA [
|
||||||
<!-- This is inside the comment -->
|
<!-- This is inside the comment -->
|
||||||
|
|
@ -864,20 +851,17 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>The SGML parser will treat this as though it were actually;</para>
|
<para>The SGML parser will treat this as though it were actually;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||||
<!THIS IS OUTSIDE THE COMMENT></programlisting>
|
|
||||||
|
|
||||||
<para>This is not valid SGML, and may give confusing error
|
<para>This is not valid SGML, and may give confusing error
|
||||||
messages.</para>
|
messages.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||||
<![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
|
||||||
|
|
||||||
<para>As the example suggests, <emphasis>do not</emphasis> write
|
<para>As the example suggests, <emphasis>do not</emphasis> write
|
||||||
comments like that.</para>
|
comments like that.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!--===================================================-->]]></programlisting>
|
||||||
<![ CDATA [<!--===================================================-->]]></programlisting>
|
|
||||||
|
|
||||||
<para>That is a (slightly) better approach, but it still potentially
|
<para>That is a (slightly) better approach, but it still potentially
|
||||||
confusing to people new to SGML.</para>
|
confusing to people new to SGML.</para>
|
||||||
|
|
@ -933,8 +917,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<literal>current.version</literal> which expanded to the current
|
<literal>current.version</literal> which expanded to the current
|
||||||
version number of your product. You could write;</para>
|
version number of your product. You could write;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<para>The current version of our product is
|
||||||
<![ CDATA [<para>The current version of our product is
|
|
||||||
¤t.version;.</para>]]></programlisting>
|
¤t.version;.</para>]]></programlisting>
|
||||||
|
|
||||||
<para>When the version number changes you can simply change the
|
<para>When the version number changes you can simply change the
|
||||||
|
|
@ -958,8 +941,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Defining general entities</title>
|
<title>Defining general entities</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY current.version "3.0-RELEASE">
|
<!ENTITY current.version "3.0-RELEASE">
|
||||||
<!ENTITY last.version "2.2.7-RELEASE">
|
<!ENTITY last.version "2.2.7-RELEASE">
|
||||||
]>]]></programlisting>
|
]>]]></programlisting>
|
||||||
|
|
@ -998,8 +980,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Defining parameter entities</title>
|
<title>Defining parameter entities</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % param.some "some">
|
<!ENTITY % param.some "some">
|
||||||
<!ENTITY % param.text "text">
|
<!ENTITY % param.text "text">
|
||||||
<!ENTITY % param.new "%param.some more %param.text">
|
<!ENTITY % param.new "%param.some more %param.text">
|
||||||
|
|
@ -1019,8 +1000,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Add a general entity to
|
<para>Add a general entity to
|
||||||
<filename>example.sgml</filename>.</para>
|
<filename>example.sgml</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
|
||||||
<!ENTITY version "1.1">
|
<!ENTITY version "1.1">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
@ -1118,8 +1098,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Using general entities to include files</title>
|
<title>Using general entities to include files</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||||
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">
|
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">
|
||||||
|
|
@ -1173,8 +1152,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<filename>chapters.ent</filename>. This file contains the
|
<filename>chapters.ent</filename>. This file contains the
|
||||||
following;</para>
|
following;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||||
<![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
|
||||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||||
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">]]></programlisting>
|
<!ENTITY chapter.3 SYSTEM "chapter3.sgml">]]></programlisting>
|
||||||
|
|
||||||
|
|
@ -1183,8 +1161,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
document, which will then make all the general entities available
|
document, which will then make all the general entities available
|
||||||
for use. Then use the general entities as before;</para>
|
for use. Then use the general entities as before;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!-- Define a parameter entity to load in the chapter general entities -->
|
<!-- Define a parameter entity to load in the chapter general entities -->
|
||||||
<!ENTITY % chapters SYSTEM "chapters.ent">
|
<!ENTITY % chapters SYSTEM "chapters.ent">
|
||||||
|
|
||||||
|
|
@ -1214,16 +1191,14 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
|
|
||||||
<para>Put content similar to the following in each file;</para>
|
<para>Put content similar to the following in each file;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||||
<![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||||
this;</para>
|
this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY version "1.1">
|
<!ENTITY version "1.1">
|
||||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||||
|
|
@ -1273,8 +1248,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||||
this;</para>
|
this;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % entities SYSTEM "entities.sgml"> %entities;
|
<!ENTITY % entities SYSTEM "entities.sgml"> %entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
@ -1297,8 +1271,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Create a new file, <filename>entities.sgml</filename>, with
|
<para>Create a new file, <filename>entities.sgml</filename>, with
|
||||||
this content:</para>
|
this content:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [<!ENTITY version "1.1">
|
||||||
<![ CDATA [<!ENTITY version "1.1">
|
|
||||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||||
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
||||||
|
|
@ -1332,8 +1305,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Structure of a marked section</title>
|
<title>Structure of a marked section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ <replaceable>KEYWORD</replaceable> [
|
||||||
<![ <replaceable>KEYWORD</replaceable> [
|
|
||||||
Contents of marked section
|
Contents of marked section
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
@ -1399,8 +1371,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<example>
|
<example>
|
||||||
<title>Using a CDATA marked section</title>
|
<title>Using a CDATA marked section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><para>Here is an example of how you would include some text
|
||||||
<para>Here is an example of how you would include some text
|
|
||||||
that contained many &lt; and &amp; symbols. The sample
|
that contained many &lt; and &amp; symbols. The sample
|
||||||
text is a fragment of HTML. The surrounding text (<para> and
|
text is a fragment of HTML. The surrounding text (<para> and
|
||||||
<programlisting>) are from DocBook.</para>
|
<programlisting>) are from DocBook.</para>
|
||||||
|
|
@ -1441,8 +1412,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<title>Using <literal>INCLUDE</literal> and
|
<title>Using <literal>INCLUDE</literal> and
|
||||||
<literal>IGNORE</literal> in marked sections</title>
|
<literal>IGNORE</literal> in marked sections</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ INCLUDE [
|
||||||
<![ INCLUDE [
|
|
||||||
This text will be processed and included.
|
This text will be processed and included.
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
|
|
@ -1480,8 +1450,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<title>Using a parameter entity to control a marked
|
<title>Using a parameter entity to control a marked
|
||||||
section</title>
|
section</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % electronic.copy "INCLUDE">
|
<!ENTITY % electronic.copy "INCLUDE">
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
|
|
@ -1495,8 +1464,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>When producing the hard-copy version, change the entity's
|
<para>When producing the hard-copy version, change the entity's
|
||||||
definition to;</para>
|
definition to;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||||
<!ENTITY % electronic.copy "IGNORE"></programlisting>
|
|
||||||
|
|
||||||
<para>On reprocessing the document, the marked sections that use
|
<para>On reprocessing the document, the marked sections that use
|
||||||
<literal>%electronic.copy</literal> as their keyword will be
|
<literal>%electronic.copy</literal> as their keyword will be
|
||||||
|
|
@ -1513,8 +1481,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||||
<para>Create a new file, <filename>section.sgml</filename>, that
|
<para>Create a new file, <filename>section.sgml</filename>, that
|
||||||
contains the following;</para>
|
contains the following;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
|
||||||
<!ENTITY % text.output "INCLUDE">
|
<!ENTITY % text.output "INCLUDE">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/writing-style/chapter.sgml,v 1.9 2000/08/08 23:39:14 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/fdp-primer/writing-style/chapter.sgml,v 1.10 2001/04/05 01:47:13 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="writing-style">
|
<chapter id="writing-style">
|
||||||
|
|
@ -182,8 +182,7 @@
|
||||||
<para>For example, the source for this section looks something
|
<para>For example, the source for this section looks something
|
||||||
like:</para>
|
like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [+--- This is column 0
|
||||||
<![ CDATA [+--- This is column 0
|
|
||||||
V
|
V
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>...</title>
|
<title>...</title>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.34 2001/01/16 21:38:07 ben Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.35 2001/02/09 16:02:02 dannyboy Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="advanced-networking">
|
<chapter id="advanced-networking">
|
||||||
|
|
@ -574,8 +574,7 @@ Local1 (10.20.30.1, 10.9.9.30) --> T1-GW (10.9.9.1)
|
||||||
|
|
||||||
<para>On the NFS server make sure you have:</para>
|
<para>On the NFS server make sure you have:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>portmap_enable="YES"
|
||||||
portmap_enable="YES"
|
|
||||||
nfs_server_enable="YES"
|
nfs_server_enable="YES"
|
||||||
nfs_server_flags="-u -t -n 4"
|
nfs_server_flags="-u -t -n 4"
|
||||||
mountd_flags="-r"</programlisting>
|
mountd_flags="-r"</programlisting>
|
||||||
|
|
@ -588,8 +587,7 @@ mountd_flags="-r"</programlisting>
|
||||||
|
|
||||||
<para>On the client, make sure you have:</para>
|
<para>On the client, make sure you have:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>nfs_client_enable="YES"
|
||||||
nfs_client_enable="YES"
|
|
||||||
nfs_client_flags="-n 4"</programlisting>
|
nfs_client_flags="-n 4"</programlisting>
|
||||||
|
|
||||||
<para>Like <command>nfsd</command>, the <option>-n 4</option> tells
|
<para>Like <command>nfsd</command>, the <option>-n 4</option> tells
|
||||||
|
|
@ -764,8 +762,7 @@ nfs_client_flags="-n 4"</programlisting>
|
||||||
<para>Examples for the FreeBSD system (<hostid>freebox</hostid>) as
|
<para>Examples for the FreeBSD system (<hostid>freebox</hostid>) as
|
||||||
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||||
fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>As a manual mount command on <hostid>freebox</hostid>:</para>
|
<para>As a manual mount command on <hostid>freebox</hostid>:</para>
|
||||||
|
|
||||||
|
|
@ -774,8 +771,7 @@ fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||||
<para>Examples for the FreeBSD system as the server: in
|
<para>Examples for the FreeBSD system as the server: in
|
||||||
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||||
freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>As a manual mount command on <hostid>fastws</hostid>:</para>
|
<para>As a manual mount command on <hostid>fastws</hostid>:</para>
|
||||||
|
|
||||||
|
|
@ -856,8 +852,7 @@ freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||||
<para>Set up a bootp server to provide the client with IP, gateway,
|
<para>Set up a bootp server to provide the client with IP, gateway,
|
||||||
netmask.</para>
|
netmask.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>diskless:\
|
||||||
diskless:\
|
|
||||||
:ht=ether:\
|
:ht=ether:\
|
||||||
:ha=0000c01f848a:\
|
:ha=0000c01f848a:\
|
||||||
:sm=255.255.255.0:\
|
:sm=255.255.255.0:\
|
||||||
|
|
@ -960,16 +955,14 @@ diskless:\
|
||||||
|
|
||||||
<para>A typical completely diskless cfg file might contain:</para>
|
<para>A typical completely diskless cfg file might contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||||
rootfs 192.1.2.3:/rootfs/myclient
|
|
||||||
swapfs 192.1.2.3:/swapfs
|
swapfs 192.1.2.3:/swapfs
|
||||||
swapsize 20000
|
swapsize 20000
|
||||||
hostname myclient.mydomain</programlisting>
|
hostname myclient.mydomain</programlisting>
|
||||||
|
|
||||||
<para>A cfg file for a machine with local swap might contain:</para>
|
<para>A cfg file for a machine with local swap might contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||||
rootfs 192.1.2.3:/rootfs/myclient
|
|
||||||
hostname myclient.mydomain</programlisting>
|
hostname myclient.mydomain</programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
@ -980,14 +973,12 @@ hostname myclient.mydomain</programlisting>
|
||||||
<filename>/etc/exports</filename> file on FreeBSD might look
|
<filename>/etc/exports</filename> file on FreeBSD might look
|
||||||
like:</para>
|
like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||||
/rootfs/myclient -maproot=0:0 myclient.mydomain
|
|
||||||
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
||||||
|
|
||||||
<para>And on HP-UX:</para>
|
<para>And on HP-UX:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/rootfs/myclient -root=myclient.mydomain
|
||||||
/rootfs/myclient -root=myclient.mydomain
|
|
||||||
/swapfs -root=myclient.mydomain</programlisting>
|
/swapfs -root=myclient.mydomain</programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
@ -1139,8 +1130,7 @@ hostname myclient.mydomain</programlisting>
|
||||||
list, send mail to &a.majordomo; and
|
list, send mail to &a.majordomo; and
|
||||||
specify:</para>
|
specify:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-isdn</programlisting>
|
||||||
subscribe freebsd-isdn</programlisting>
|
|
||||||
|
|
||||||
<para>in the body of your message.</para>
|
<para>in the body of your message.</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
@ -1262,8 +1252,7 @@ subscribe freebsd-isdn</programlisting>
|
||||||
with AUI/10BT transceiver, if necessary.</para>
|
with AUI/10BT transceiver, if necessary.</para>
|
||||||
|
|
||||||
<!-- This should be a graphic -->
|
<!-- This should be a graphic -->
|
||||||
<programlisting>
|
<programlisting>---Sun workstation
|
||||||
---Sun workstation
|
|
||||||
|
|
|
|
||||||
---FreeBSD box
|
---FreeBSD box
|
||||||
|
|
|
|
||||||
|
|
@ -1284,8 +1273,7 @@ ISDN BRI line</programlisting>
|
||||||
<para>Network is Twisted Pair Ethernet.</para>
|
<para>Network is Twisted Pair Ethernet.</para>
|
||||||
|
|
||||||
<!-- This should be a graphic -->
|
<!-- This should be a graphic -->
|
||||||
<programlisting>
|
<programlisting> -------Novell Server
|
||||||
-------Novell Server
|
|
||||||
| H |
|
| H |
|
||||||
| ---Sun
|
| ---Sun
|
||||||
| |
|
| |
|
||||||
|
|
@ -1805,8 +1793,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
||||||
<filename>/etc/crontab</filename> entries on your slave
|
<filename>/etc/crontab</filename> entries on your slave
|
||||||
servers should do the job:</para>
|
servers should do the job:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||||
20 * * * * root /usr/libexec/ypxfr passwd.byname
|
|
||||||
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
||||||
|
|
||||||
<para>These two lines force the slave to sync its maps with
|
<para>These two lines force the slave to sync its maps with
|
||||||
|
|
@ -1863,8 +1850,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
||||||
and start <command>ypbind</command> upon network
|
and start <command>ypbind</command> upon network
|
||||||
startup:</para>
|
startup:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>nisdomainname="test-domain"
|
||||||
nisdomainname="test-domain"
|
|
||||||
nis_client_enable="YES"</programlisting>
|
nis_client_enable="YES"</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
@ -1923,8 +1909,7 @@ nis_client_enable="YES"</programlisting>
|
||||||
like this:</para>
|
like this:</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># allow connections from local host -- mandatory
|
||||||
# allow connections from local host -- mandatory
|
|
||||||
127.0.0.1 255.255.255.255
|
127.0.0.1 255.255.255.255
|
||||||
# allow connections from any host
|
# allow connections from any host
|
||||||
# on the 192.168.128.0 network
|
# on the 192.168.128.0 network
|
||||||
|
|
@ -2177,13 +2162,11 @@ ellington&prompt.root; <userinput>vi /var/yp/netgroup</userinput>
|
||||||
least four netgroups: IT employees, IT apprentices, normal
|
least four netgroups: IT employees, IT apprentices, normal
|
||||||
employees and interns.</para>
|
employees and interns.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
|
||||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||||
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
||||||
(,golf,test-domain)
|
(,golf,test-domain)
|
||||||
INTERNS (,able,test-domain) (,baker,test-domain)
|
INTERNS (,able,test-domain) (,baker,test-domain)</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
||||||
are the names of the netgroups. Each bracketed group adds
|
are the names of the netgroups. Each bracketed group adds
|
||||||
|
|
@ -2230,12 +2213,10 @@ INTERNS (,able,test-domain) (,baker,test-domain)
|
||||||
15 users or less and a real netgroup that consists of the
|
15 users or less and a real netgroup that consists of the
|
||||||
sub-netgroups:</para>
|
sub-netgroups:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||||
BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
|
||||||
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
||||||
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
||||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3
|
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>You can repeat this process if you need more than 225
|
<para>You can repeat this process if you need more than 225
|
||||||
users within a single netgroup.</para>
|
users within a single netgroup.</para>
|
||||||
|
|
@ -2271,15 +2252,11 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
<replaceable>war</replaceable>, you only have to start
|
<replaceable>war</replaceable>, you only have to start
|
||||||
&man.vipw.8; and replace the line</para>
|
&man.vipw.8; and replace the line</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+:::::::::</programlisting>
|
||||||
+:::::::::
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>with</para>
|
<para>with</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::</programlisting>
|
||||||
+@IT_EMP:::::::::
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Now, only the data for the users defined in the netgroup
|
<para>Now, only the data for the users defined in the netgroup
|
||||||
<replaceable>IT_EMP</replaceable> is imported into
|
<replaceable>IT_EMP</replaceable> is imported into
|
||||||
|
|
@ -2321,20 +2298,16 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
of <filename>/etc/master.passwd</filename> with something like
|
of <filename>/etc/master.passwd</filename> with something like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::
|
||||||
+@IT_EMP:::::::::
|
|
||||||
+@IT_APP:::::::::
|
+@IT_APP:::::::::
|
||||||
+:::::::::/sbin/nologin
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>The corresponding lines for the normal workstations
|
<para>The corresponding lines for the normal workstations
|
||||||
could be:</para>
|
could be:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@IT_EMP:::::::::
|
||||||
+@IT_EMP:::::::::
|
|
||||||
+@USERS:::::::::
|
+@USERS:::::::::
|
||||||
+:::::::::/sbin/nologin
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>And everything would be fine until there is a policy
|
<para>And everything would be fine until there is a policy
|
||||||
change a few weeks later: The IT department starts hiring
|
change a few weeks later: The IT department starts hiring
|
||||||
|
|
@ -2359,11 +2332,9 @@ ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput>
|
||||||
that are allowed to login onto these machines. The new
|
that are allowed to login onto these machines. The new
|
||||||
entries for your NIS map netgroup should look like this:</para>
|
entries for your NIS map netgroup should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BIGSRV IT_EMP IT_APP
|
||||||
BIGSRV IT_EMP IT_APP
|
|
||||||
SMALLSRV IT_EMP IT_APP ITINTERN
|
SMALLSRV IT_EMP IT_APP ITINTERN
|
||||||
USERBOX IT_EMP ITINTERN USERS
|
USERBOX IT_EMP ITINTERN USERS</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>This method of defining login restrictions works
|
<para>This method of defining login restrictions works
|
||||||
reasonably well if you can define groups of machines with
|
reasonably well if you can define groups of machines with
|
||||||
|
|
@ -2382,10 +2353,8 @@ USERBOX IT_EMP ITINTERN USERS
|
||||||
name of the netgroup. In other words, the lines should look
|
name of the netgroup. In other words, the lines should look
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||||
+@<replaceable>BOXNAME</replaceable>:::::::::
|
+:::::::::/sbin/nologin</programlisting>
|
||||||
+:::::::::/sbin/nologin
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>Once you have completed this task for all your machines,
|
<para>Once you have completed this task for all your machines,
|
||||||
you will not have to modify the local versions of
|
you will not have to modify the local versions of
|
||||||
|
|
@ -2394,8 +2363,7 @@ USERBOX IT_EMP ITINTERN USERS
|
||||||
is an example of a possible netgroup map for this
|
is an example of a possible netgroup map for this
|
||||||
scenario with some additional goodies.</para>
|
scenario with some additional goodies.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Define groups of users first
|
||||||
# Define groups of users first
|
|
||||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||||
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
||||||
|
|
@ -2429,8 +2397,7 @@ ONE SECURITY
|
||||||
#
|
#
|
||||||
# Restrict a machine to a single user
|
# Restrict a machine to a single user
|
||||||
TWO (,hotel,test-domain)
|
TWO (,hotel,test-domain)
|
||||||
# [...more groups to follow]
|
# [...more groups to follow]</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>If you are using some kind of database to manage your user
|
<para>If you are using some kind of database to manage your user
|
||||||
accounts, you should be able to create the first part of the
|
accounts, you should be able to create the first part of the
|
||||||
|
|
@ -2667,9 +2634,7 @@ lrwxr-xr-x 1 root wheel 14 Nov 8 14:27 /usr/lib/libscrypt.so@ -> libscryp
|
||||||
<para>Edit your <filename>/etc/rc.conf</filename> to
|
<para>Edit your <filename>/etc/rc.conf</filename> to
|
||||||
include the following:</para>
|
include the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ifconfig_fxp0="DHCP"</programlisting>
|
||||||
ifconfig_fxp0="DHCP"
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>Be sure to replace <literal>fxp0</literal> with the
|
<para>Be sure to replace <literal>fxp0</literal> with the
|
||||||
|
|
@ -2682,10 +2647,8 @@ ifconfig_fxp0="DHCP"
|
||||||
flags to <command>dhclient</command>, also include the
|
flags to <command>dhclient</command>, also include the
|
||||||
following (editing as necessary):</para>
|
following (editing as necessary):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>dhcp_program="/sbin/dhclient"
|
||||||
dhcp_program="/sbin/dhclient"
|
dhcp_flags=""</programlisting>
|
||||||
dhcp_flags=""
|
|
||||||
</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/backups/chapter.sgml,v 1.26 2000/09/18 17:05:13 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/backups/chapter.sgml,v 1.27 2000/12/15 21:52:33 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="backups">
|
<chapter id="backups">
|
||||||
|
|
@ -419,8 +419,7 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
|
||||||
|
|
||||||
<para>An example script for creating a bootable floppy:</para>
|
<para>An example script for creating a bootable floppy:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><![ CDATA [#!/bin/sh
|
||||||
<![ CDATA [#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# create a restore floppy
|
# create a restore floppy
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.404 2001/04/07 01:58:20 will Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/contrib/chapter.sgml,v 1.405 2001/04/08 10:47:59 dinoex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="contrib">
|
<chapter id="contrib">
|
||||||
|
|
@ -592,8 +592,7 @@
|
||||||
wish to protect, replacing the text between the <literal>%%</literal>
|
wish to protect, replacing the text between the <literal>%%</literal>
|
||||||
with the appropriate information.</para>
|
with the appropriate information.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Copyright (c) %%proper_years_here%%
|
||||||
Copyright (c) %%proper_years_here%%
|
|
||||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.59 2001/01/03 13:23:22 kevlo Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.60 2001/03/17 01:58:42 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="cutting-edge">
|
<chapter id="cutting-edge">
|
||||||
|
|
@ -139,8 +139,7 @@
|
||||||
<para>To join these lists, send mail to &a.majordomo; and
|
<para>To join these lists, send mail to &a.majordomo; and
|
||||||
specify the following in the body of your message:</para>
|
specify the following in the body of your message:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-current
|
||||||
subscribe freebsd-current
|
|
||||||
subscribe cvs-all</programlisting>
|
subscribe cvs-all</programlisting>
|
||||||
|
|
||||||
<para>Optionally, you can also say <literal>help</literal>
|
<para>Optionally, you can also say <literal>help</literal>
|
||||||
|
|
@ -304,8 +303,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CVSup/cvsupit.tgz</userinput></scr
|
||||||
<para>To join these lists, send mail to &a.majordomo; and
|
<para>To join these lists, send mail to &a.majordomo; and
|
||||||
specify the following in the body of your message:</para>
|
specify the following in the body of your message:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe freebsd-stable
|
||||||
subscribe freebsd-stable
|
|
||||||
subscribe cvs-all</programlisting>
|
subscribe cvs-all</programlisting>
|
||||||
|
|
||||||
<para>Optionally, you can also say <literal>help</literal>
|
<para>Optionally, you can also say <literal>help</literal>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.24 2000/12/05 12:54:46 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.25 2000/12/15 21:52:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="disks">
|
<chapter id="disks">
|
||||||
|
|
@ -662,8 +662,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
|
||||||
adding the following line to your kernel configuration
|
adding the following line to your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options QUOTA</programlisting>
|
||||||
options QUOTA</programlisting>
|
|
||||||
|
|
||||||
<para>The stock <filename>GENERIC</filename> kernel does not have
|
<para>The stock <filename>GENERIC</filename> kernel does not have
|
||||||
this enabled by default, so you will have to configure, build and
|
this enabled by default, so you will have to configure, build and
|
||||||
|
|
@ -676,8 +675,7 @@ options QUOTA</programlisting>
|
||||||
<filename>/etc/rc.conf</filename>. This is done by adding the
|
<filename>/etc/rc.conf</filename>. This is done by adding the
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable_quotas=<quote>YES</quote></programlisting>
|
||||||
enable_quotas=<quote>YES</quote></programlisting>
|
|
||||||
|
|
||||||
<para>For finer control over your quota startup, there is an
|
<para>For finer control over your quota startup, there is an
|
||||||
additional configuration variable available. Normally on bootup,
|
additional configuration variable available. Normally on bootup,
|
||||||
|
|
@ -690,15 +688,13 @@ enable_quotas=<quote>YES</quote></programlisting>
|
||||||
skip this step, a variable is made available for the
|
skip this step, a variable is made available for the
|
||||||
purpose:</para>
|
purpose:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>check_quotas=<quote>NO</quote></programlisting>
|
||||||
check_quotas=<quote>NO</quote></programlisting>
|
|
||||||
|
|
||||||
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
||||||
configuration is simpler, and consists of only one variable. Set
|
configuration is simpler, and consists of only one variable. Set
|
||||||
the following in your <filename>/etc/rc.conf</filename>:</para>
|
the following in your <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>check_quotas=<quote>YES</quote></programlisting>
|
||||||
check_quotas=<quote>YES</quote></programlisting>
|
|
||||||
|
|
||||||
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
||||||
to enable disk quotas on a per-file system basis. This is where
|
to enable disk quotas on a per-file system basis. This is where
|
||||||
|
|
@ -710,16 +706,14 @@ check_quotas=<quote>YES</quote></programlisting>
|
||||||
<filename>/etc/fstab</filename> entry for the file system you want
|
<filename>/etc/fstab</filename> entry for the file system you want
|
||||||
to to enable quotas on. For example:</para>
|
to to enable quotas on. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||||
/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
|
||||||
|
|
||||||
<para>Similarly, to enable group quotas, use the
|
<para>Similarly, to enable group quotas, use the
|
||||||
<literal>groupquota</literal> option instead of the
|
<literal>groupquota</literal> option instead of the
|
||||||
<literal>userquota</literal> keyword. To enable both user and
|
<literal>userquota</literal> keyword. To enable both user and
|
||||||
group quotas, change the entry as follows:</para>
|
group quotas, change the entry as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||||
/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
|
||||||
|
|
||||||
<para>By default the quota files are stored in the root directory of
|
<para>By default the quota files are stored in the root directory of
|
||||||
the file system with the names <filename>quota.user</filename> and
|
the file system with the names <filename>quota.user</filename> and
|
||||||
|
|
@ -792,8 +786,7 @@ check_quotas=<quote>YES</quote></programlisting>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>edquota -u test</userinput></screen>
|
<screen>&prompt.root; <userinput>edquota -u test</userinput></screen>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Quotas for user test:
|
||||||
Quotas for user test:
|
|
||||||
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
||||||
inodes in use: 7, limits (soft = 50, hard = 60)
|
inodes in use: 7, limits (soft = 50, hard = 60)
|
||||||
/usr/var: blocks in use: 0, limits (soft = 50, hard = 75)
|
/usr/var: blocks in use: 0, limits (soft = 50, hard = 75)
|
||||||
|
|
@ -847,8 +840,7 @@ Quotas for user test:
|
||||||
<command>quota -v</command> command for a user that has quota
|
<command>quota -v</command> command for a user that has quota
|
||||||
limits on two file systems.</para>
|
limits on two file systems.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Disk quotas for user test (uid 1002):
|
||||||
Disk quotas for user test (uid 1002):
|
|
||||||
Filesystem blocks quota limit grace files quota limit grace
|
Filesystem blocks quota limit grace files quota limit grace
|
||||||
/usr 65* 50 75 5days 7 50 60
|
/usr 65* 50 75 5days 7 50 60
|
||||||
/usr/var 0 50 75 0 50 60</programlisting>
|
/usr/var 0 50 75 0 50 60</programlisting>
|
||||||
|
|
@ -879,8 +871,7 @@ Disk quotas for user test (uid 1002):
|
||||||
<para>Enable <command>rpc.rquotad</command> in
|
<para>Enable <command>rpc.rquotad</command> in
|
||||||
<filename>/etc/inetd.conf</filename> like so:</para>
|
<filename>/etc/inetd.conf</filename> like so:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||||
rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
|
||||||
|
|
||||||
<para>Now restart <command>inetd</command>:</para>
|
<para>Now restart <command>inetd</command>:</para>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/eresources/chapter.sgml,v 1.53 2001/01/15 13:16:46 joe Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/eresources/chapter.sgml,v 1.54 2001/04/01 01:17:24 dd Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="eresources">
|
<appendix id="eresources">
|
||||||
|
|
@ -482,8 +482,7 @@
|
||||||
|
|
||||||
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>subscribe <listname> [<optional address>]</programlisting>
|
||||||
subscribe <listname> [<optional address>]</programlisting>
|
|
||||||
|
|
||||||
in the body of your message. For example, to subscribe yourself to
|
in the body of your message. For example, to subscribe yourself to
|
||||||
<literal>freebsd-announce</literal>, you'd do:</para>
|
<literal>freebsd-announce</literal>, you'd do:</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/hw/chapter.sgml,v 1.34 2000/07/13 21:03:21 marko Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/hw/chapter.sgml,v 1.35 2000/07/24 09:37:46 alex Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="hw">
|
<appendix id="hw">
|
||||||
|
|
@ -1364,8 +1364,7 @@
|
||||||
below.</para>
|
below.</para>
|
||||||
|
|
||||||
<!-- This should really be a graphic -->
|
<!-- This should really be a graphic -->
|
||||||
<programlisting>
|
<programlisting>INS8250 -> INS8250B
|
||||||
INS8250 -> INS8250B
|
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
\-> INS8250A -> INS82C50A
|
\-> INS8250A -> INS82C50A
|
||||||
|
|
@ -2609,8 +2608,7 @@ INS8250 -> INS8250B
|
||||||
<literal>options COM_MULTIPORT</literal> or it will not work very
|
<literal>options COM_MULTIPORT</literal> or it will not work very
|
||||||
well!</para>
|
well!</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio4 at isa? port 0x100 tty flags 0xb05
|
||||||
device sio4 at isa? port 0x100 tty flags 0xb05
|
|
||||||
device sio5 at isa? port 0x108 tty flags 0xb05
|
device sio5 at isa? port 0x108 tty flags 0xb05
|
||||||
device sio6 at isa? port 0x110 tty flags 0xb05
|
device sio6 at isa? port 0x110 tty flags 0xb05
|
||||||
device sio7 at isa? port 0x118 tty flags 0xb05
|
device sio7 at isa? port 0x118 tty flags 0xb05
|
||||||
|
|
@ -2667,8 +2665,7 @@ device sio11 at isa? port 0x138 tty flags 0xb05 irq 9 vector siointr<
|
||||||
<step>
|
<step>
|
||||||
<para>Add the line
|
<para>Add the line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options COM_MULTIPORT</programlisting>
|
||||||
options COM_MULTIPORT</programlisting>
|
|
||||||
|
|
||||||
to the config file.</para>
|
to the config file.</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -2684,8 +2681,7 @@ options COM_MULTIPORT</programlisting>
|
||||||
for Each port is +8 hexadecimal from the previous port, thus
|
for Each port is +8 hexadecimal from the previous port, thus
|
||||||
the 100h, 108h, 110h... addresses.</para>
|
the 100h, 108h, 110h... addresses.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio1 at isa? port 0x100 tty flags 0x1005
|
||||||
device sio1 at isa? port 0x100 tty flags 0x1005
|
|
||||||
device sio2 at isa? port 0x108 tty flags 0x1005
|
device sio2 at isa? port 0x108 tty flags 0x1005
|
||||||
device sio3 at isa? port 0x110 tty flags 0x1005
|
device sio3 at isa? port 0x110 tty flags 0x1005
|
||||||
device sio4 at isa? port 0x118 tty flags 0x1005
|
device sio4 at isa? port 0x118 tty flags 0x1005
|
||||||
|
|
@ -2918,8 +2914,7 @@ sio2: type 16550A (multiport master)</screen>
|
||||||
linkend="kernelconfig-config">kernel configuration</link>
|
linkend="kernelconfig-config">kernel configuration</link>
|
||||||
(note that your irq and iomem settings may differ).</para>
|
(note that your irq and iomem settings may differ).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||||
device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
|
|
@ -2943,8 +2938,7 @@ device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programl
|
||||||
using <literal>ttyc</literal> in place of
|
using <literal>ttyc</literal> in place of
|
||||||
<literal>ttyd</literal>. For example:</para>
|
<literal>ttyd</literal>. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
|
||||||
ttyc1 "/usr/libexec/getty std.38400" unknown on insecure
|
ttyc1 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
ttyc2 "/usr/libexec/getty std.38400" unknown on insecure
|
ttyc2 "/usr/libexec/getty std.38400" unknown on insecure
|
||||||
…
|
…
|
||||||
|
|
@ -3005,16 +2999,14 @@ ttyc7 "/usr/libexec/getty std.38400" unknown on insecure</programlisting>
|
||||||
<link linkend="kernelconfig-config">kernel configuration
|
<link linkend="kernelconfig-config">kernel configuration
|
||||||
file</link>, changing the numbers as appropriate:</para>
|
file</link>, changing the numbers as appropriate:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
||||||
device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
|
||||||
|
|
||||||
<para>Valid IRQ numbers are 9, 10, 11, 12 and 15 for SX ISA host cards
|
<para>Valid IRQ numbers are 9, 10, 11, 12 and 15 for SX ISA host cards
|
||||||
and 11, 12 and 15 for SI/XIO ISA host cards.</para>
|
and 11, 12 and 15 for SI/XIO ISA host cards.</para>
|
||||||
|
|
||||||
<para>To configure an EISA or PCI host card, use this line:</para>
|
<para>To configure an EISA or PCI host card, use this line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device si0</programlisting>
|
||||||
device si0</programlisting>
|
|
||||||
|
|
||||||
<para>After adding the configuration entry, <link
|
<para>After adding the configuration entry, <link
|
||||||
linkend="kernelconfig-building"> rebuild and install</link> your
|
linkend="kernelconfig-building"> rebuild and install</link> your
|
||||||
|
|
@ -3035,8 +3027,7 @@ device si0</programlisting>
|
||||||
need to add lines like this to <link
|
need to add lines like this to <link
|
||||||
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||||
ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>Change the terminal type as appropriate. For modems,
|
<para>Change the terminal type as appropriate. For modems,
|
||||||
|
|
@ -3552,8 +3543,7 @@ moused_port="/dev/ums0"</programlisting>
|
||||||
kernel config file. An example from the kernel config file (they
|
kernel config file. An example from the kernel config file (they
|
||||||
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># First WD compatible controller
|
||||||
# First WD compatible controller
|
|
||||||
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
||||||
disk wd0 at wdc0 drive 0
|
disk wd0 at wdc0 drive 0
|
||||||
disk wd1 at wdc0 drive 1
|
disk wd1 at wdc0 drive 1
|
||||||
|
|
@ -4253,8 +4243,7 @@ sd0(bt0:0:0): Direct-Access 1350MB (2766300 512 byte sectors)</screen>
|
||||||
config file <filename>LINT</filename> with some added comments
|
config file <filename>LINT</filename> with some added comments
|
||||||
(between []):</para>
|
(between []):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
|
||||||
#
|
#
|
||||||
# aha: Adaptec 154x
|
# aha: Adaptec 154x
|
||||||
# ahb: Adaptec 174x
|
# ahb: Adaptec 174x
|
||||||
|
|
@ -4335,8 +4324,7 @@ device cd0 at scbus? [the first ever CDROM found, no wiring]<
|
||||||
config file after upgrading from a pre-FreeBSD2.0.5.R system check
|
config file after upgrading from a pre-FreeBSD2.0.5.R system check
|
||||||
this out.</para>
|
this out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>[driver for Adaptec 174x]
|
||||||
[driver for Adaptec 174x]
|
|
||||||
controller ahb0 at isa? bio irq 11 vector ahbintr
|
controller ahb0 at isa? bio irq 11 vector ahbintr
|
||||||
|
|
||||||
[for Adaptec 154x]
|
[for Adaptec 154x]
|
||||||
|
|
@ -4381,8 +4369,7 @@ device cd0 #Only need one of these, the code dynamically grows</pro
|
||||||
SCSI bus reset. You can set this delay time in your kernel
|
SCSI bus reset. You can set this delay time in your kernel
|
||||||
configuration file using a line like:</para>
|
configuration file using a line like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
||||||
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
|
||||||
|
|
||||||
<para>This line sets the delay time to 15 seconds. On my own system
|
<para>This line sets the delay time to 15 seconds. On my own system
|
||||||
I had to use 3 seconds minimum to get my trusty old CDROM drive
|
I had to use 3 seconds minimum to get my trusty old CDROM drive
|
||||||
|
|
@ -4452,8 +4439,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
|
|
||||||
<para>Look for a struct that is initialized like below:</para>
|
<para>Look for a struct that is initialized like below:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{
|
||||||
{
|
|
||||||
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
||||||
"mx1", SC_ONE_LU
|
"mx1", SC_ONE_LU
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
@ -4462,8 +4448,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
as a SCSI disk and has firmware revision 123 you would add
|
as a SCSI disk and has firmware revision 123 you would add
|
||||||
something like:</para>
|
something like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>{
|
||||||
{
|
|
||||||
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
||||||
"sd", SC_MORE_LUS
|
"sd", SC_MORE_LUS
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
@ -4525,8 +4510,7 @@ Mar 29 21:16:37 yedi /kernel: st1: Archive Viper 150 is a known rogue </screen>
|
||||||
the right, read: fastest feasible, transfer rate. This option is
|
the right, read: fastest feasible, transfer rate. This option is
|
||||||
disabled by default:</para>
|
disabled by default:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||||
options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
|
||||||
|
|
||||||
<para>Check the man pages for the host adapter that you use. Or
|
<para>Check the man pages for the host adapter that you use. Or
|
||||||
better still, use the ultimate documentation (read: driver
|
better still, use the ultimate documentation (read: driver
|
||||||
|
|
@ -5064,8 +5048,7 @@ options "TUNE_1542" #dynamic tune of bus DMA speed</programli
|
||||||
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
||||||
Build and install a new kernel.</para>
|
Build and install a new kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*** 4831,4835 ****
|
||||||
*** 4831,4835 ****
|
|
||||||
};
|
};
|
||||||
|
|
||||||
! if (np->latetime>4) {
|
! if (np->latetime>4) {
|
||||||
|
|
@ -5525,8 +5508,7 @@ options "TUNE_1542" #dynamic tune of bus DMA speed</programli
|
||||||
tapes at the end of a volume. This shell script can be used to
|
tapes at the end of a volume. This shell script can be used to
|
||||||
change tapes:</para>
|
change tapes:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/install/chapter.sgml,v 1.63 2000/11/29 14:41:04 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/install/chapter.sgml,v 1.64 2000/12/15 21:52:35 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="install">
|
<chapter id="install">
|
||||||
|
|
@ -253,8 +253,7 @@
|
||||||
need to add the following line to the password file (using the
|
need to add the following line to the password file (using the
|
||||||
<command>vipw</command> command):</para>
|
<command>vipw</command> command):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
|
||||||
|
|
||||||
<para>Anyone with network connectivity to your machine can now
|
<para>Anyone with network connectivity to your machine can now
|
||||||
chose a media type of FTP and type in
|
chose a media type of FTP and type in
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/internals/chapter.sgml,v 1.23 2000/11/03 19:12:29 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/internals/chapter.sgml,v 1.24 2000/11/03 19:33:54 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="internals">
|
<chapter id="internals">
|
||||||
|
|
@ -1596,8 +1596,7 @@
|
||||||
Note that you should not use <option>-g</option> unless you can
|
Note that you should not use <option>-g</option> unless you can
|
||||||
accommodate the large (typically 7 MB+) kernels that result.</para>
|
accommodate the large (typically 7 MB+) kernels that result.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>makeoptions DEBUG="-g"
|
||||||
makeoptions DEBUG="-g"
|
|
||||||
makeoptions COPTFLAGS="-O -pipe"</programlisting>
|
makeoptions COPTFLAGS="-O -pipe"</programlisting>
|
||||||
|
|
||||||
<para>Sysctl provides a way to tune kernel parameters at run-time. You
|
<para>Sysctl provides a way to tune kernel parameters at run-time. You
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelconfig/chapter.sgml,v 1.37 2001/01/24 12:22:38 ben Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelconfig/chapter.sgml,v 1.38 2001/02/13 21:28:14 peter Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelconfig">
|
<chapter id="kernelconfig">
|
||||||
|
|
@ -253,8 +253,7 @@
|
||||||
closely. For details of all the possible kernel options, see
|
closely. For details of all the possible kernel options, see
|
||||||
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
||||||
#
|
#
|
||||||
# For more information on this file, please read the handbook section on
|
# For more information on this file, please read the handbook section on
|
||||||
|
|
@ -282,8 +281,7 @@
|
||||||
<literal>i386</literal>, <literal>alpha</literal>, or
|
<literal>i386</literal>, <literal>alpha</literal>, or
|
||||||
<literal>pc98</literal>.</para>
|
<literal>pc98</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cpu I386_CPU
|
||||||
cpu I386_CPU
|
|
||||||
cpu I486_CPU
|
cpu I486_CPU
|
||||||
cpu I586_CPU
|
cpu I586_CPU
|
||||||
cpu I686_CPU</programlisting>
|
cpu I686_CPU</programlisting>
|
||||||
|
|
@ -299,8 +297,7 @@ cpu I686_CPU</programlisting>
|
||||||
<para>The Alpha architecture has different values for
|
<para>The Alpha architecture has different values for
|
||||||
<literal>cpu_type</literal>. They include:</para>
|
<literal>cpu_type</literal>. They include:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cpu EV4
|
||||||
cpu EV4
|
|
||||||
cpu EV5</programlisting>
|
cpu EV5</programlisting>
|
||||||
|
|
||||||
<para>If you are using an Alpha machine, you should be using one of
|
<para>If you are using an Alpha machine, you should be using one of
|
||||||
|
|
@ -355,8 +352,7 @@ cpu EV5</programlisting>
|
||||||
<para>Everything that follows is more or less optional. See the notes
|
<para>Everything that follows is more or less optional. See the notes
|
||||||
underneath or next to each option for more information.</para>
|
underneath or next to each option for more information.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
|
||||||
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||||
|
|
||||||
<para>This line allows the kernel to simulate a math co-processor if
|
<para>This line allows the kernel to simulate a math co-processor if
|
||||||
|
|
@ -374,28 +370,24 @@ options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||||
which is not included by default for licensing reasons.</para>
|
which is not included by default for licensing reasons.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options INET #InterNETworking</programlisting>
|
||||||
options INET #InterNETworking</programlisting>
|
|
||||||
|
|
||||||
<para>Networking support. Leave this in, even if you do not plan to
|
<para>Networking support. Leave this in, even if you do not plan to
|
||||||
be connected to a network. Most programs require at least loopback
|
be connected to a network. Most programs require at least loopback
|
||||||
networking (i.e., making network connections within your PC), so
|
networking (i.e., making network connections within your PC), so
|
||||||
this is essentially mandatory.</para>
|
this is essentially mandatory.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options INET6 #IPv6 communications protocols</programlisting>
|
||||||
options INET6 #IPv6 communications protocols</programlisting>
|
|
||||||
|
|
||||||
<para>This enables the IPv6 communication protocols.</para>
|
<para>This enables the IPv6 communication protocols.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options FFS #Berkeley Fast Filesystem
|
||||||
options FFS #Berkeley Fast Filesystem
|
|
||||||
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
||||||
|
|
||||||
<para>This is the basic hard drive filesystem. Leave it in if you
|
<para>This is the basic hard drive filesystem. Leave it in if you
|
||||||
boot from the hard disk.</para>
|
boot from the hard disk.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options MFS #Memory Filesystem
|
||||||
options MFS #Memory Filesystem
|
|
||||||
options MD_ROOT #MD is a potential root device</programlisting>
|
options MD_ROOT #MD is a potential root device</programlisting>
|
||||||
|
|
||||||
<para>This is the memory-mapped filesystem. This is basically a RAM
|
<para>This is the memory-mapped filesystem. This is basically a RAM
|
||||||
|
|
@ -413,16 +405,14 @@ options MD_ROOT #MD is a potential root device</programlisting>
|
||||||
<para>Now you simply need to either reboot, or run the command
|
<para>Now you simply need to either reboot, or run the command
|
||||||
<command>mount /tmp</command>.</para>
|
<command>mount /tmp</command>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options NFS #Network Filesystem
|
||||||
options NFS #Network Filesystem
|
|
||||||
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
||||||
|
|
||||||
<para>The network filesystem. Unless you plan to mount partitions
|
<para>The network filesystem. Unless you plan to mount partitions
|
||||||
from a UNIX file server over TCP/IP, you can comment these
|
from a UNIX file server over TCP/IP, you can comment these
|
||||||
out.</para>
|
out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||||
options MSDOSFS #MSDOS Filesystem</programlisting>
|
|
||||||
|
|
||||||
<para>The MS-DOS filesystem. Unless you plan to mount a DOS formatted
|
<para>The MS-DOS filesystem. Unless you plan to mount a DOS formatted
|
||||||
hard drive partition at boot time, you can safely comment this out.
|
hard drive partition at boot time, you can safely comment this out.
|
||||||
|
|
@ -433,8 +423,7 @@ options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||||
unmount them (and does not require <literal>MSDOSFS</literal> at
|
unmount them (and does not require <literal>MSDOSFS</literal> at
|
||||||
all).</para>
|
all).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options CD9660 #ISO 9660 Filesystem
|
||||||
options CD9660 #ISO 9660 Filesystem
|
|
||||||
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
||||||
|
|
||||||
<para>The ISO 9660 filesystem for CDROMs. Comment it out if you do
|
<para>The ISO 9660 filesystem for CDROMs. Comment it out if you do
|
||||||
|
|
@ -442,22 +431,19 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
|
||||||
will be dynamically loaded the first time you mount a data CD).
|
will be dynamically loaded the first time you mount a data CD).
|
||||||
Audio CDs do not need this filesystem.</para>
|
Audio CDs do not need this filesystem.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options PROCFS #Process filesystem</programlisting>
|
||||||
options PROCFS #Process filesystem</programlisting>
|
|
||||||
|
|
||||||
<para>The process filesystem. This is a <quote>pretend</quote>
|
<para>The process filesystem. This is a <quote>pretend</quote>
|
||||||
filesystem mounted on <filename>/proc</filename> which allows
|
filesystem mounted on <filename>/proc</filename> which allows
|
||||||
programs like &man.ps.1; to give you more information on what
|
programs like &man.ps.1; to give you more information on what
|
||||||
processes are running.</para>
|
processes are running.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||||
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
|
||||||
|
|
||||||
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
||||||
act strangely if you comment this out.</para>
|
act strangely if you comment this out.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||||
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
|
||||||
|
|
||||||
<para>This causes the kernel to pause for 15 seconds before probing
|
<para>This causes the kernel to pause for 15 seconds before probing
|
||||||
each SCSI device in your system. If you only have IDE hard drives,
|
each SCSI device in your system. If you only have IDE hard drives,
|
||||||
|
|
@ -466,8 +452,7 @@ options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</program
|
||||||
you do this, and FreeBSD has trouble recognizing your SCSI devices,
|
you do this, and FreeBSD has trouble recognizing your SCSI devices,
|
||||||
you will have to raise it back up.</para>
|
you will have to raise it back up.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options UCONSOLE #Allow users to grab the console</programlisting>
|
||||||
options UCONSOLE #Allow users to grab the console</programlisting>
|
|
||||||
|
|
||||||
<para>Allow users to grab the console, which is useful for X users.
|
<para>Allow users to grab the console, which is useful for X users.
|
||||||
For example, you can create a console xterm by typing <command>xterm
|
For example, you can create a console xterm by typing <command>xterm
|
||||||
|
|
@ -475,26 +460,22 @@ options UCONSOLE #Allow users to grab the console</programli
|
||||||
<command>talk</command>, and any other messages you receive, as well
|
<command>talk</command>, and any other messages you receive, as well
|
||||||
as any console messages sent by the kernel.</para>
|
as any console messages sent by the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options USERCONFIG #boot -c editor</programlisting>
|
||||||
options USERCONFIG #boot -c editor</programlisting>
|
|
||||||
|
|
||||||
<para>This option allows you to boot the configuration editor from the
|
<para>This option allows you to boot the configuration editor from the
|
||||||
boot menu.</para>
|
boot menu.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||||
options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
|
||||||
|
|
||||||
<para>This option allows you to boot the visual configuration editor
|
<para>This option allows you to boot the visual configuration editor
|
||||||
from the boot menu.</para>
|
from the boot menu.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options KTRACE #ktrace(1) support</programlisting>
|
||||||
options KTRACE #ktrace(1) support</programlisting>
|
|
||||||
|
|
||||||
<para>This enables kernel process tracing, which is useful in
|
<para>This enables kernel process tracing, which is useful in
|
||||||
debugging.</para>
|
debugging.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||||
options SYSVSHM #SYSV-style shared memory</programlisting>
|
|
||||||
|
|
||||||
<para>This option provides for System V shared memory. The most
|
<para>This option provides for System V shared memory. The most
|
||||||
common use of this is the XSHM extension in X, which many
|
common use of this is the XSHM extension in X, which many
|
||||||
|
|
@ -502,14 +483,12 @@ options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||||
extra speed. If you use X, you'll definitely want to include
|
extra speed. If you use X, you'll definitely want to include
|
||||||
this.</para>
|
this.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||||
options SYSVSEM #SYSV-style semaphores</programlisting>
|
|
||||||
|
|
||||||
<para>Support for System V semaphores. Less commonly used but only
|
<para>Support for System V semaphores. Less commonly used but only
|
||||||
adds a few hundred bytes to the kernel.</para>
|
adds a few hundred bytes to the kernel.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SYSVMSG #SYSV-style message queues</programlisting>
|
||||||
options SYSVMSG #SYSV-style message queues</programlisting>
|
|
||||||
|
|
||||||
<para>Support for System V messages. Again, only adds a few hundred
|
<para>Support for System V messages. Again, only adds a few hundred
|
||||||
bytes to the kernel.</para>
|
bytes to the kernel.</para>
|
||||||
|
|
@ -519,30 +498,26 @@ options SYSVMSG #SYSV-style message queues</programlisting>
|
||||||
these System V facilities.</para>
|
these System V facilities.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options P1003_1B #Posix P1003_1B real-time extentions
|
||||||
options P1003_1B #Posix P1003_1B real-time extentions
|
|
||||||
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
||||||
|
|
||||||
<para>Real-time extensions added in the 1993 POSIX. Certain
|
<para>Real-time extensions added in the 1993 POSIX. Certain
|
||||||
applications in the ports collection use these (such as Star
|
applications in the ports collection use these (such as Star
|
||||||
Office).</para>
|
Office).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||||
options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
|
||||||
|
|
||||||
<para>This option enables ICMP error response bandwidth limiting. You
|
<para>This option enables ICMP error response bandwidth limiting. You
|
||||||
typically want this option as it will help protect the machine from
|
typically want this option as it will help protect the machine from
|
||||||
denial of service packet attacks.</para>
|
denial of service packet attacks.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># To make an SMP kernel, the next two are needed
|
||||||
# To make an SMP kernel, the next two are needed
|
|
||||||
#options SMP # Symmetric MultiProcessor Kernel
|
#options SMP # Symmetric MultiProcessor Kernel
|
||||||
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
||||||
|
|
||||||
<para>The above are both required for SMP support.</para>
|
<para>The above are both required for SMP support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Optionally these may need tweaked, (defaults shown):
|
||||||
# Optionally these may need tweaked, (defaults shown):
|
|
||||||
#options NCPU=2 # number of CPUs
|
#options NCPU=2 # number of CPUs
|
||||||
#options NBUS=4 # number of busses
|
#options NBUS=4 # number of busses
|
||||||
#options NAPIC=1 # number of IO APICs
|
#options NAPIC=1 # number of IO APICs
|
||||||
|
|
@ -568,8 +543,7 @@ options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||||
auto-detection of PCI cards and gatewaying from the PCI to ISA
|
auto-detection of PCI cards and gatewaying from the PCI to ISA
|
||||||
bus.</para>
|
bus.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Floppy drives
|
||||||
# Floppy drives
|
|
||||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||||
device fd0 at fdc0 drive 0
|
device fd0 at fdc0 drive 0
|
||||||
device fd1 at fdc0 drive 1</programlisting>
|
device fd1 at fdc0 drive 1</programlisting>
|
||||||
|
|
@ -585,8 +559,7 @@ device fd1 at fdc0 drive 1</programlisting>
|
||||||
one <literal>device ata</literal> line for the kernel to detect all
|
one <literal>device ata</literal> line for the kernel to detect all
|
||||||
PCI ATA/ATAPI devices on modern machines.</para>
|
PCI ATA/ATAPI devices on modern machines.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atadisk # ATA disk drives</programlisting>
|
||||||
device atadisk # ATA disk drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI disk drives.</para>
|
ATAPI disk drives.</para>
|
||||||
|
|
@ -597,40 +570,34 @@ device atapicd # ATAPI CDROM drives</programlisting>
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI CDROM drives.</para>
|
ATAPI CDROM drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atapifd # ATAPI floppy drives</programlisting>
|
||||||
device atapifd # ATAPI floppy drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI floppy drives.</para>
|
ATAPI floppy drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atapist # ATAPI tape drives</programlisting>
|
||||||
device atapist # ATAPI tape drives</programlisting>
|
|
||||||
|
|
||||||
<para>This is needed along with <literal>device ata</literal> for
|
<para>This is needed along with <literal>device ata</literal> for
|
||||||
ATAPI tape drives.</para>
|
ATAPI tape drives.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||||
options ATA_STATIC_ID #Static device numbering</programlisting>
|
|
||||||
|
|
||||||
<para>This makes the controller number static (like the old driver) or
|
<para>This makes the controller number static (like the old driver) or
|
||||||
else the device numbers are dynamically allocated.</para>
|
else the device numbers are dynamically allocated.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||||
#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
|
||||||
|
|
||||||
<para>This enables DMA on the ATAPI device. Since many ATAPI devices
|
<para>This enables DMA on the ATAPI device. Since many ATAPI devices
|
||||||
claim to support DMA, but it does not actually work, this is turned
|
claim to support DMA, but it does not actually work, this is turned
|
||||||
off by default.</para>
|
off by default.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># ATA and ATAPI devices
|
||||||
# ATA and ATAPI devices
|
|
||||||
device ata0 at isa? port IO_WD1 irq 14
|
device ata0 at isa? port IO_WD1 irq 14
|
||||||
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
||||||
|
|
||||||
<para>Use the above for older, non-PCI systems.</para>
|
<para>Use the above for older, non-PCI systems.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI Controllers
|
||||||
# SCSI Controllers
|
|
||||||
device ahb # EISA AHA1742 family
|
device ahb # EISA AHA1742 family
|
||||||
device ahc # AHA2940 and onboard AIC7xxx devices
|
device ahc # AHA2940 and onboard AIC7xxx devices
|
||||||
device amd # AMD 53C974 (Teckram DC-390(T))
|
device amd # AMD 53C974 (Teckram DC-390(T))
|
||||||
|
|
@ -649,8 +616,7 @@ device aic0 at isa?</programlisting>
|
||||||
system. If you have an IDE only system, you can remove these
|
system. If you have an IDE only system, you can remove these
|
||||||
altogether.</para>
|
altogether.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># SCSI peripherals
|
||||||
# SCSI peripherals
|
|
||||||
device scbus # SCSI bus (required)
|
device scbus # SCSI bus (required)
|
||||||
device da # Direct Access (disks)
|
device da # Direct Access (disks)
|
||||||
device sa # Sequential Access (tape etc)
|
device sa # Sequential Access (tape etc)
|
||||||
|
|
@ -661,8 +627,7 @@ access)</programlisting>
|
||||||
<para>SCSI peripherals. Again, comment out any you do not have, or if
|
<para>SCSI peripherals. Again, comment out any you do not have, or if
|
||||||
you have only IDE hardware, you can remove them completely.</para>
|
you have only IDE hardware, you can remove them completely.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># RAID controllers
|
||||||
# RAID controllers
|
|
||||||
device ida # Compaq Smart RAID
|
device ida # Compaq Smart RAID
|
||||||
device amr # AMI MegaRAID
|
device amr # AMI MegaRAID
|
||||||
device mlx # Mylex DAC960 family</programlisting>
|
device mlx # Mylex DAC960 family</programlisting>
|
||||||
|
|
@ -670,8 +635,7 @@ device mlx # Mylex DAC960 family</programlisting>
|
||||||
<para>Supported RAID controllers. If you do not have any of these,
|
<para>Supported RAID controllers. If you do not have any of these,
|
||||||
you can comment them out or remove them.</para>
|
you can comment them out or remove them.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
|
||||||
device atkbdc0 at isa? port IO_KBD</programlisting>
|
device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||||
|
|
||||||
<para>The keyboard controller (<literal>atkbdc</literal>) provides I/O
|
<para>The keyboard controller (<literal>atkbdc</literal>) provides I/O
|
||||||
|
|
@ -680,16 +644,14 @@ device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||||
(<literal>atkbd</literal>) and the PS/2 pointing device driver
|
(<literal>atkbd</literal>) and the PS/2 pointing device driver
|
||||||
(<literal>psm</literal>).</para>
|
(<literal>psm</literal>).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device atkbd0 at atkbdc? irq 1</programlisting>
|
||||||
device atkbd0 at atkbdc? irq 1</programlisting>
|
|
||||||
|
|
||||||
<para>The <literal>atkbd</literal> driver, together with
|
<para>The <literal>atkbd</literal> driver, together with
|
||||||
<literal>atkbdc</literal> controller, provides access to the AT 84
|
<literal>atkbdc</literal> controller, provides access to the AT 84
|
||||||
keyboard or the AT enhanced keyboard which is connected to the AT
|
keyboard or the AT enhanced keyboard which is connected to the AT
|
||||||
keyboard controller.</para>
|
keyboard controller.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device psm0 at atkbdc? irq 12</programlisting>
|
||||||
device psm0 at atkbdc? irq 12</programlisting>
|
|
||||||
|
|
||||||
<para>Use this device if your mouse plugs into the PS/2 mouse
|
<para>Use this device if your mouse plugs into the PS/2 mouse
|
||||||
port.</para>
|
port.</para>
|
||||||
|
|
@ -698,15 +660,13 @@ device psm0 at atkbdc? irq 12</programlisting>
|
||||||
|
|
||||||
<para>The video card driver.</para>
|
<para>The video card driver.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># splash screen/screen saver
|
||||||
# splash screen/screen saver
|
|
||||||
pseudo-device splash</programlisting>
|
pseudo-device splash</programlisting>
|
||||||
|
|
||||||
<para>Splash screen at start up! Screen savers require this
|
<para>Splash screen at start up! Screen savers require this
|
||||||
too.</para>
|
too.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># syscons is the default console driver, resembling an SCO console
|
||||||
# syscons is the default console driver, resembling an SCO console
|
|
||||||
device sc0 at isa?</programlisting>
|
device sc0 at isa?</programlisting>
|
||||||
|
|
||||||
<para><literal>sc0</literal> is the default console driver, which
|
<para><literal>sc0</literal> is the default console driver, which
|
||||||
|
|
@ -718,8 +678,7 @@ device sc0 at isa?</programlisting>
|
||||||
<envar>TERM</envar> variable to <literal>scoansi</literal> if
|
<envar>TERM</envar> variable to <literal>scoansi</literal> if
|
||||||
full-screen programs have trouble running under this console.</para>
|
full-screen programs have trouble running under this console.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||||
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
|
||||||
#device vt0 at isa?
|
#device vt0 at isa?
|
||||||
#options XSERVER # support for X server on a vt console
|
#options XSERVER # support for X server on a vt console
|
||||||
#options FAT_CURSOR # start with block cursor
|
#options FAT_CURSOR # start with block cursor
|
||||||
|
|
@ -737,8 +696,7 @@ device sc0 at isa?</programlisting>
|
||||||
device are often not available — <literal>vt100</literal>
|
device are often not available — <literal>vt100</literal>
|
||||||
should be available on virtually any platform.</para>
|
should be available on virtually any platform.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Floating point support - do not disable.
|
||||||
# Floating point support - do not disable.
|
|
||||||
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||||
|
|
||||||
<para><literal>npx0</literal> is the interface to the floating point
|
<para><literal>npx0</literal> is the interface to the floating point
|
||||||
|
|
@ -746,14 +704,12 @@ device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||||
the software math emulator. This is <emphasis>not</emphasis>
|
the software math emulator. This is <emphasis>not</emphasis>
|
||||||
optional.</para>
|
optional.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Power management support (see LINT for more options)
|
||||||
# Power management support (see LINT for more options)
|
|
||||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
||||||
|
|
||||||
<para>Advanced Power Management support. Useful for laptops.</para>
|
<para>Advanced Power Management support. Useful for laptops.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCCARD (PCMCIA) support
|
||||||
# PCCARD (PCMCIA) support
|
|
||||||
device card
|
device card
|
||||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||||
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</programlisting>
|
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</programlisting>
|
||||||
|
|
@ -761,8 +717,7 @@ device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable</progra
|
||||||
<para>PCMCIA support. You need this if you are installing on a
|
<para>PCMCIA support. You need this if you are installing on a
|
||||||
laptop.</para>
|
laptop.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Serial (COM) ports
|
||||||
# Serial (COM) ports
|
|
||||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||||
device sio1 at isa? port IO_COM2 irq 3
|
device sio1 at isa? port IO_COM2 irq 3
|
||||||
device sio2 at isa? disable port IO_COM3 irq 5
|
device sio2 at isa? disable port IO_COM3 irq 5
|
||||||
|
|
@ -789,19 +744,16 @@ device sio3 at isa? disable port IO_COM4 irq 9</programlisting>
|
||||||
used.</para>
|
used.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Parallel port
|
||||||
# Parallel port
|
|
||||||
device ppc0 at isa? irq 7</programlisting>
|
device ppc0 at isa? irq 7</programlisting>
|
||||||
|
|
||||||
<para>This is the ISA-bus parallel port interface.</para>
|
<para>This is the ISA-bus parallel port interface.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device ppbus # Parallel port bus (required)</programlisting>
|
||||||
device ppbus # Parallel port bus (required)</programlisting>
|
|
||||||
|
|
||||||
<para>Provides support for the parallel port bus.</para>
|
<para>Provides support for the parallel port bus.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt # Printer</programlisting>
|
||||||
device lpt # Printer</programlisting>
|
|
||||||
|
|
||||||
<para>Support for parallel port printers.</para>
|
<para>Support for parallel port printers.</para>
|
||||||
|
|
||||||
|
|
@ -810,26 +762,22 @@ device lpt # Printer</programlisting>
|
||||||
support.</para>
|
support.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device plip # TCP/IP over parallel</programlisting>
|
||||||
device plip # TCP/IP over parallel</programlisting>
|
|
||||||
|
|
||||||
<para>This is the driver for the parallel network interface.</para>
|
<para>This is the driver for the parallel network interface.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device ppi # Parallel port interface device</programlisting>
|
||||||
device ppi # Parallel port interface device</programlisting>
|
|
||||||
|
|
||||||
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
||||||
I/O.</para>
|
I/O.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#device vpo # Requires scbus and da</programlisting>
|
||||||
#device vpo # Requires scbus and da</programlisting>
|
|
||||||
|
|
||||||
<para>This is for an Iomega Zip drive. It requires
|
<para>This is for an Iomega Zip drive. It requires
|
||||||
<literal>scbus</literal> and <literal>da</literal> support. Best
|
<literal>scbus</literal> and <literal>da</literal> support. Best
|
||||||
performance is achieved with ports in EPP 1.9 mode.</para>
|
performance is achieved with ports in EPP 1.9 mode.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCI Ethernet NICs.
|
||||||
# PCI Ethernet NICs.
|
|
||||||
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
||||||
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
||||||
device tx # SMC 9432TX (83c170 <quote>EPIC</quote>)
|
device tx # SMC 9432TX (83c170 <quote>EPIC</quote>)
|
||||||
|
|
@ -839,8 +787,7 @@ device wx # Intel Gigabit Ethernet Card (<quote>Wiseman</quote>
|
||||||
<para>Various PCI network card drivers. Comment out or remove any of
|
<para>Various PCI network card drivers. Comment out or remove any of
|
||||||
these not present in your system.</para>
|
these not present in your system.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># PCI Ethernet NICs that use the common MII bus controller code.
|
||||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
|
||||||
device miibus # MII bus support</programlisting>
|
device miibus # MII bus support</programlisting>
|
||||||
|
|
||||||
<para>MII bus support is required for some PCI 10/100 ethernet NICs,
|
<para>MII bus support is required for some PCI 10/100 ethernet NICs,
|
||||||
|
|
@ -851,8 +798,7 @@ device miibus # MII bus support</programlisting>
|
||||||
including a generic one for PHYs that are not specifically handled
|
including a generic one for PHYs that are not specifically handled
|
||||||
by an individual driver</para>
|
by an individual driver</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device dc # DEC/Intel 21143 and various workalikes
|
||||||
device dc # DEC/Intel 21143 and various workalikes
|
|
||||||
device rl # RealTek 8129/8139
|
device rl # RealTek 8129/8139
|
||||||
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
||||||
device sis # Silicon Integrated Systems SiS 900/SiS 7016
|
device sis # Silicon Integrated Systems SiS 900/SiS 7016
|
||||||
|
|
@ -864,8 +810,7 @@ device xl # 3Com 3c90x (<quote>Boomerang</quote>, <quote>Cyclon
|
||||||
|
|
||||||
<para>Drivers that use the MII bus controller code.</para>
|
<para>Drivers that use the MII bus controller code.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># ISA Ethernet NICs.
|
||||||
# ISA Ethernet NICs.
|
|
||||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||||
device ex
|
device ex
|
||||||
device ep
|
device ep
|
||||||
|
|
@ -893,8 +838,7 @@ device sn0 at isa? port 0x300 irq 10
|
||||||
<filename>/usr/src/sys/i386/conf/LINT</filename> for which cards are
|
<filename>/usr/src/sys/i386/conf/LINT</filename> for which cards are
|
||||||
supported by which driver.</para>
|
supported by which driver.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Pseudo devices - the number indicates how many units to allocated.
|
||||||
# Pseudo devices - the number indicates how many units to allocated.
|
|
||||||
pseudo-device loop # Network loopback</programlisting>
|
pseudo-device loop # Network loopback</programlisting>
|
||||||
|
|
||||||
<para>This is the generic loopback device for TCP/IP. If you telnet
|
<para>This is the generic loopback device for TCP/IP. If you telnet
|
||||||
|
|
@ -902,14 +846,12 @@ pseudo-device loop # Network loopback</programlisting>
|
||||||
role="ipaddr">127.0.0.1</hostid>) it will come back at you through
|
role="ipaddr">127.0.0.1</hostid>) it will come back at you through
|
||||||
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device ether # Ethernet support</programlisting>
|
||||||
pseudo-device ether # Ethernet support</programlisting>
|
|
||||||
|
|
||||||
<para><literal>ether</literal> is only needed if you have an Ethernet
|
<para><literal>ether</literal> is only needed if you have an Ethernet
|
||||||
card. It includes generic Ethernet protocol code.</para>
|
card. It includes generic Ethernet protocol code.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||||
pseudo-device sl 1 # Kernel SLIP</programlisting>
|
|
||||||
|
|
||||||
<para><literal>sl</literal> is for SLIP support. This has been almost
|
<para><literal>sl</literal> is for SLIP support. This has been almost
|
||||||
entirely supplanted by PPP, which is easier to set up, better suited
|
entirely supplanted by PPP, which is easier to set up, better suited
|
||||||
|
|
@ -917,8 +859,7 @@ pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||||
<replaceable>number</replaceable> after <literal>sl</literal>
|
<replaceable>number</replaceable> after <literal>sl</literal>
|
||||||
specifies how many simultaneous SLIP sessions to support.</para>
|
specifies how many simultaneous SLIP sessions to support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||||
pseudo-device ppp 1 # Kernel PPP</programlisting>
|
|
||||||
|
|
||||||
<para>This is for kernel PPP support for dial-up connections. There
|
<para>This is for kernel PPP support for dial-up connections. There
|
||||||
is also a version of PPP implemented as a userland application that
|
is also a version of PPP implemented as a userland application that
|
||||||
|
|
@ -927,8 +868,7 @@ pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||||
<literal>ppp</literal> specifies how many simultaneous PPP
|
<literal>ppp</literal> specifies how many simultaneous PPP
|
||||||
connections to support.</para>
|
connections to support.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device tun # Packet tunnel.</programlisting>
|
||||||
pseudo-device tun # Packet tunnel.</programlisting>
|
|
||||||
|
|
||||||
<para>This is used by the userland PPP software. The
|
<para>This is used by the userland PPP software. The
|
||||||
<replaceable>number</replaceable> after <literal>tun</literal>
|
<replaceable>number</replaceable> after <literal>tun</literal>
|
||||||
|
|
@ -950,26 +890,22 @@ pseudo-device pty # Pseudo-ttys (telnet etc)</programlisting>
|
||||||
and/or remote logins, be sure to increase this number accordingly,
|
and/or remote logins, be sure to increase this number accordingly,
|
||||||
up to a maximum of 256.</para>
|
up to a maximum of 256.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||||
pseudo-device md # Memory <quote>disks</quote></programlisting>
|
|
||||||
|
|
||||||
<para>Memory disk pseudo-devices.</para>
|
<para>Memory disk pseudo-devices.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
|
||||||
|
|
||||||
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
||||||
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
||||||
tunneling.</para>
|
tunneling.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
|
||||||
|
|
||||||
<para>This pseudo-device captures packets that are sent to it and
|
<para>This pseudo-device captures packets that are sent to it and
|
||||||
diverts them to the IPv4/IPv6 translation daemon.</para>
|
diverts them to the IPv4/IPv6 translation daemon.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
|
||||||
# Be aware of the administrative consequences of enabling this!
|
# Be aware of the administrative consequences of enabling this!
|
||||||
pseudo-device bpf # Berkeley packet filter</programlisting>
|
pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
|
|
||||||
|
|
@ -979,8 +915,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
can be captured to disk and or examined with the &man.tcpdump.1;
|
can be captured to disk and or examined with the &man.tcpdump.1;
|
||||||
program.</para>
|
program.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># USB support
|
||||||
# USB support
|
|
||||||
#device uhci # UHCI PCI->USB interface
|
#device uhci # UHCI PCI->USB interface
|
||||||
#device ohci # OHCI PCI->USB interface
|
#device ohci # OHCI PCI->USB interface
|
||||||
#device usb # USB Bus (required)
|
#device usb # USB Bus (required)
|
||||||
|
|
@ -1020,8 +955,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
|
||||||
<para>Suppose you add the IDE CD-ROM support to the kernel. The line
|
<para>Suppose you add the IDE CD-ROM support to the kernel. The line
|
||||||
to add is:</para>
|
to add is:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device acd0</programlisting>
|
||||||
device acd0</programlisting>
|
|
||||||
|
|
||||||
<para>This means that you should look for some entries that start with
|
<para>This means that you should look for some entries that start with
|
||||||
<filename>acd0</filename> in the <filename>/dev</filename>
|
<filename>acd0</filename> in the <filename>/dev</filename>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.28 2000/11/15 12:42:07 des Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.29 2001/01/23 12:25:31 des Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kerneldebug">
|
<chapter id="kerneldebug">
|
||||||
|
|
@ -272,8 +272,7 @@
|
||||||
and edit your configuration file. Uncomment (or add, if it does not
|
and edit your configuration file. Uncomment (or add, if it does not
|
||||||
exist) the following line</para>
|
exist) the following line</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
|
||||||
|
|
||||||
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
<para>Rebuild the kernel. Due to the time stamp change on the Makefile,
|
||||||
there will be some other object files rebuild, for example
|
there will be some other object files rebuild, for example
|
||||||
|
|
@ -312,8 +311,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
|
||||||
|
|
||||||
<para>To configure your kernel to include DDB, add the option line
|
<para>To configure your kernel to include DDB, add the option line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options DDB</programlisting>
|
||||||
options DDB</programlisting>
|
|
||||||
|
|
||||||
to your config file, and rebuild. (See <link
|
to your config file, and rebuild. (See <link
|
||||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.15 2000/06/08 01:56:11 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.16 2000/06/14 00:47:36 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelopts">
|
<chapter id="kernelopts">
|
||||||
|
|
@ -37,8 +37,7 @@
|
||||||
concept in mind, i.e., the default can be overridden by the
|
concept in mind, i.e., the default can be overridden by the
|
||||||
config option. This is usually done with something like:</para>
|
config option. This is usually done with something like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifndef THIS_OPTION
|
||||||
#ifndef THIS_OPTION
|
|
||||||
#define THIS_OPTION (some_default_value)
|
#define THIS_OPTION (some_default_value)
|
||||||
#endif /* THIS_OPTION */</programlisting>
|
#endif /* THIS_OPTION */</programlisting>
|
||||||
|
|
||||||
|
|
@ -52,8 +51,7 @@
|
||||||
<para>It is also possible to create value-less options that simply enable
|
<para>It is also possible to create value-less options that simply enable
|
||||||
or disable a particular piece of code by embracing it in</para>
|
or disable a particular piece of code by embracing it in</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifdef THAT_OPTION
|
||||||
#ifdef THAT_OPTION
|
|
||||||
|
|
||||||
[your code here]
|
[your code here]
|
||||||
|
|
||||||
|
|
@ -68,8 +66,7 @@
|
||||||
is at least a single <literal>#ifdef</literal> referencing it...
|
is at least a single <literal>#ifdef</literal> referencing it...
|
||||||
However, it's unlikely that many people would put</para>
|
However, it's unlikely that many people would put</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options notyet,notdef</programlisting>
|
||||||
options notyet,notdef</programlisting>
|
|
||||||
|
|
||||||
<para>in their config file, and then wonder why the kernel compilation
|
<para>in their config file, and then wonder why the kernel compilation
|
||||||
falls over. <!-- smiley -->:-)</para>
|
falls over. <!-- smiley -->:-)</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/l10n/chapter.sgml,v 1.42 2000/12/13 04:56:07 kevlo Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/l10n/chapter.sgml,v 1.43 2001/03/09 16:57:48 keichii Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="l10n">
|
<chapter id="l10n">
|
||||||
|
|
@ -79,8 +79,7 @@
|
||||||
Language Code, Country Code, and Encoding. Locale names are
|
Language Code, Country Code, and Encoding. Locale names are
|
||||||
constructed from these parts as follows:</para>
|
constructed from these parts as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||||
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Language and Country Codes</title>
|
<title>Language and Country Codes</title>
|
||||||
|
|
@ -231,8 +230,7 @@
|
||||||
directory which has both variables set for Latin-1
|
directory which has both variables set for Latin-1
|
||||||
encoding:</para>
|
encoding:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>german:German User:\
|
||||||
german:German User:\
|
|
||||||
:charset=ISO-8859-1:\
|
:charset=ISO-8859-1:\
|
||||||
:lang=de_DE.ISO_8859-1:</programlisting>
|
:lang=de_DE.ISO_8859-1:</programlisting>
|
||||||
|
|
||||||
|
|
@ -242,8 +240,7 @@ german:German User:\
|
||||||
more variables set because some software does not respect
|
more variables set because some software does not respect
|
||||||
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#Users who do not wish to use monetary units or time formats
|
||||||
#Users who do not wish to use monetary units or time formats
|
|
||||||
#of Taiwan can manually change each variable
|
#of Taiwan can manually change each variable
|
||||||
taiwan:Taiwanese User:\
|
taiwan:Taiwanese User:\
|
||||||
lang=zh_TW.Big5:\
|
lang=zh_TW.Big5:\
|
||||||
|
|
@ -268,8 +265,7 @@ taiwan:Taiwanese User:\
|
||||||
correct language user's class. Make sure these settings
|
correct language user's class. Make sure these settings
|
||||||
appear in <filename>/etc/login.conf</filename>:</para>
|
appear in <filename>/etc/login.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||||
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
|
||||||
:charset=<replaceable>MIME_charset</replaceable>:\
|
:charset=<replaceable>MIME_charset</replaceable>:\
|
||||||
:lang=<replaceable>locale_name</replaceable>:\
|
:lang=<replaceable>locale_name</replaceable>:\
|
||||||
:tc=default:</programlisting>
|
:tc=default:</programlisting>
|
||||||
|
|
@ -277,8 +273,7 @@ taiwan:Taiwanese User:\
|
||||||
<para>So sticking with our previous example using Latin-1, it
|
<para>So sticking with our previous example using Latin-1, it
|
||||||
would look like this:</para>
|
would look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>german:German Users Accounts:\
|
||||||
german:German Users Accounts:\
|
|
||||||
:charset=ISO-8859-1:\
|
:charset=ISO-8859-1:\
|
||||||
:lang=de_DE.ISO_8859-1:\
|
:lang=de_DE.ISO_8859-1:\
|
||||||
:tc=default:</programlisting>
|
:tc=default:</programlisting>
|
||||||
|
|
@ -288,8 +283,7 @@ german:German Users Accounts:\
|
||||||
<para>Use <command>vipw</command> to add new users, and make
|
<para>Use <command>vipw</command> to add new users, and make
|
||||||
the entry look like this:</para>
|
the entry look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
||||||
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
|
||||||
|
|
||||||
<para>Changing Login Classes with &man.adduser.8;</para>
|
<para>Changing Login Classes with &man.adduser.8;</para>
|
||||||
|
|
||||||
|
|
@ -348,14 +342,12 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
|
|
||||||
<para>In <filename>/etc/profile</filename>:</para>
|
<para>In <filename>/etc/profile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
|
||||||
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
||||||
|
|
||||||
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||||
<envar>setenv LANG de_DE.ISO_8859-1</envar>
|
|
||||||
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
||||||
|
|
||||||
<para>Alternatively, you can add the above instructions to
|
<para>Alternatively, you can add the above instructions to
|
||||||
|
|
@ -369,13 +361,11 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
|
|
||||||
<para>In <filename>$HOME/.xinitrc</filename>:</para>
|
<para>In <filename>$HOME/.xinitrc</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
|
||||||
|
|
||||||
<para>Or:</para>
|
<para>Or:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||||
<envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
|
||||||
|
|
||||||
<para>Depending on your shell (see above).</para>
|
<para>Depending on your shell (see above).</para>
|
||||||
</sect4>
|
</sect4>
|
||||||
|
|
@ -389,8 +379,7 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
||||||
console fonts in <filename>/etc/rc.conf</filename> for the
|
console fonts in <filename>/etc/rc.conf</filename> for the
|
||||||
language in question with:</para>
|
language in question with:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>font8x16=<replaceable>font_name</replaceable>
|
||||||
font8x16=<replaceable>font_name</replaceable>
|
|
||||||
font8x14=<replaceable>font_name</replaceable>
|
font8x14=<replaceable>font_name</replaceable>
|
||||||
font8x8=<replaceable>font_name</replaceable></programlisting>
|
font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||||
|
|
||||||
|
|
@ -405,8 +394,7 @@ font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||||
<literal>Console</literal>. Alternatively, you can add the
|
<literal>Console</literal>. Alternatively, you can add the
|
||||||
following to <filename>/etc/rc.conf</filename>:</para>
|
following to <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>scrnmap=<replaceable>screenmap_name</replaceable>
|
||||||
scrnmap=<replaceable>screenmap_name</replaceable>
|
|
||||||
keymap=<replaceable>keymap_name</replaceable>
|
keymap=<replaceable>keymap_name</replaceable>
|
||||||
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
||||||
|
|
||||||
|
|
@ -441,8 +429,7 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
||||||
mouse cursor the sc0 console driver. To enable the workaround,
|
mouse cursor the sc0 console driver. To enable the workaround,
|
||||||
insert the following line into the kernel config.</para>
|
insert the following line into the kernel config.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
|
||||||
|
|
||||||
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
||||||
the <filename>/usr/share/syscons/keymaps</filename> directory,
|
the <filename>/usr/share/syscons/keymaps</filename> directory,
|
||||||
|
|
@ -671,13 +658,11 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
|
|
||||||
<para>In <literal>sh</literal>-based shells:</para>
|
<para>In <literal>sh</literal>-based shells:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||||
<envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
|
|
||||||
<para>In <literal>C</literal>-based shells:</para>
|
<para>In <literal>C</literal>-based shells:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting><envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||||
<envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
</sect3>
|
</sect3>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
@ -701,8 +686,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
<para>Put the following lines into your
|
<para>Put the following lines into your
|
||||||
<filename>~/.login_conf</filename> file:</para>
|
<filename>~/.login_conf</filename> file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>me:My Account:\
|
||||||
me:My Account:\
|
|
||||||
:charset=KOI8-R:\
|
:charset=KOI8-R:\
|
||||||
:lang=ru_RU.KOI8-R:</programlisting>
|
:lang=ru_RU.KOI8-R:</programlisting>
|
||||||
|
|
||||||
|
|
@ -718,16 +702,14 @@ me:My Account:\
|
||||||
<para>Add the following to your kernel configuration
|
<para>Add the following to your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Use following settings in
|
<para>Use following settings in
|
||||||
<filename>/etc/rc.conf</filename>:</para>
|
<filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>keymap="ru.koi8-r"
|
||||||
keymap="ru.koi8-r"
|
|
||||||
scrnmap="koi8-r2cp866"
|
scrnmap="koi8-r2cp866"
|
||||||
font8x16="cp866b-8x16"
|
font8x16="cp866b-8x16"
|
||||||
font8x14="cp866-8x14"
|
font8x14="cp866-8x14"
|
||||||
|
|
@ -756,8 +738,7 @@ font8x8="cp866-8x8"</programlisting>
|
||||||
A Russian printer <filename>/etc/printcap</filename> entry
|
A Russian printer <filename>/etc/printcap</filename> entry
|
||||||
should look like:</para>
|
should look like:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>lp|Russian local line printer:\
|
||||||
lp|Russian local line printer:\
|
|
||||||
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
||||||
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:</programlisting>
|
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:</programlisting>
|
||||||
|
|
||||||
|
|
@ -770,8 +751,7 @@ lp|Russian local line printer:\
|
||||||
<para>The following example &man.fstab.5; entry enables support
|
<para>The following example &man.fstab.5; entry enables support
|
||||||
for Russian filenames in mounted MS-DOS filesystems:</para>
|
for Russian filenames in mounted MS-DOS filesystems:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
||||||
/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
|
||||||
|
|
||||||
<para>See &man.mount.msdos.8; for a detailed description of the
|
<para>See &man.mount.msdos.8; for a detailed description of the
|
||||||
<option>-W</option> and <option>-L</option> options.</para>
|
<option>-W</option> and <option>-L</option> options.</para>
|
||||||
|
|
@ -814,8 +794,7 @@ lp|Russian local line printer:\
|
||||||
lines must be added <emphasis>before</emphasis> any other
|
lines must be added <emphasis>before</emphasis> any other
|
||||||
<literal>FontPath</literal> entries:</para>
|
<literal>FontPath</literal> entries:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
||||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
||||||
|
|
||||||
|
|
@ -830,14 +809,12 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v3.*:</para>
|
<para>For XFree86 v3.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>XkbLayout "ru"
|
||||||
XkbLayout "ru"
|
|
||||||
XkbOptions "grp:caps_toggle"</programlisting>
|
XkbOptions "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v4.*:</para>
|
<para>For XFree86 v4.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Option "XkbLayout" "ru"
|
||||||
Option "XkbLayout" "ru"
|
|
||||||
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>Also make sure that <literal>XkbDisable</literal> is
|
<para>Also make sure that <literal>XkbDisable</literal> is
|
||||||
|
|
@ -855,13 +832,11 @@ Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||||
|
|
||||||
<para>For XFree86 v3.*:</para>
|
<para>For XFree86 v3.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>XkbVariant "winkeys"</programlisting>
|
||||||
XkbVariant "winkeys"</programlisting>
|
|
||||||
|
|
||||||
<para>For XFree86 v4.*:</para>
|
<para>For XFree86 v4.*:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Option "XkbVariant" "winkeys"</programlisting>
|
||||||
Option "XkbVariant" "winkeys"</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>The Russian XKB keyboard may not work with old XFree86
|
<para>The Russian XKB keyboard may not work with old XFree86
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.33 2001/03/16 23:51:03 murray Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.34 2001/03/29 07:40:19 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="linuxemu">
|
<chapter id="linuxemu">
|
||||||
|
|
@ -68,8 +68,7 @@
|
||||||
<para>This, in turn, triggers the following action in
|
<para>This, in turn, triggers the following action in
|
||||||
<filename>/etc/rc.i386</filename>:</para>
|
<filename>/etc/rc.i386</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Start the Linux binary compatibility if requested.
|
||||||
# Start the Linux binary compatibility if requested.
|
|
||||||
#
|
#
|
||||||
case ${linux_enable} in
|
case ${linux_enable} in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
|
|
@ -261,8 +260,7 @@ Abort</screen>
|
||||||
<filename>/compat/linux/etc/host.conf</filename> file
|
<filename>/compat/linux/etc/host.conf</filename> file
|
||||||
containing:</para>
|
containing:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>order hosts, bind
|
||||||
order hosts, bind
|
|
||||||
multi on</programlisting>
|
multi on</programlisting>
|
||||||
|
|
||||||
<para>The order here specifies that <filename>/etc/hosts</filename>
|
<para>The order here specifies that <filename>/etc/hosts</filename>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mail/chapter.sgml,v 1.19 2000/06/14 20:30:34 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mail/chapter.sgml,v 1.20 2000/07/26 05:08:14 hanai Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="mail">
|
<chapter id="mail">
|
||||||
|
|
@ -172,13 +172,11 @@
|
||||||
|
|
||||||
<para>As a good workaround, you can place the line:
|
<para>As a good workaround, you can place the line:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>search foo.bar.edu bar.edu</programlisting>
|
||||||
search foo.bar.edu bar.edu</programlisting>
|
|
||||||
|
|
||||||
instead of the previous:
|
instead of the previous:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain foo.bar.edu</programlisting>
|
||||||
domain foo.bar.edu</programlisting>
|
|
||||||
|
|
||||||
into your <filename>/etc/resolv.conf</filename>. However, make
|
into your <filename>/etc/resolv.conf</filename>. However, make
|
||||||
sure that the search order does not go beyond the
|
sure that the search order does not go beyond the
|
||||||
|
|
@ -196,8 +194,7 @@ domain foo.bar.edu</programlisting>
|
||||||
<answer>
|
<answer>
|
||||||
<para>This is answered in the sendmail FAQ as follows:</para>
|
<para>This is answered in the sendmail FAQ as follows:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||||
* I am getting <quote>Local configuration error</quote> messages, such as:
|
|
||||||
|
|
||||||
553 relay.domain.net config error: mail loops back to myself
|
553 relay.domain.net config error: mail loops back to myself
|
||||||
554 <user@domain.net>... Local configuration error
|
554 <user@domain.net>... Local configuration error
|
||||||
|
|
@ -235,8 +232,7 @@ to /etc/sendmail.cf.</programlisting>
|
||||||
<para>The key is to get a Internet site to provide secondary MX
|
<para>The key is to get a Internet site to provide secondary MX
|
||||||
service for your domain. For example:</para>
|
service for your domain. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bigco.com. MX 10 bigco.com.
|
||||||
bigco.com. MX 10 bigco.com.
|
|
||||||
MX 20 smalliap.com.</programlisting>
|
MX 20 smalliap.com.</programlisting>
|
||||||
|
|
||||||
<para>Only one host should be specified as the final recipient
|
<para>Only one host should be specified as the final recipient
|
||||||
|
|
@ -256,8 +252,7 @@ bigco.com. MX 10 bigco.com.
|
||||||
<para>You might want to use something like this as a login
|
<para>You might want to use something like this as a login
|
||||||
script.</para>
|
script.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
# Put me in /usr/local/bin/pppbigco
|
# Put me in /usr/local/bin/pppbigco
|
||||||
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
||||||
/usr/sbin/ppp -direct pppbigco</programlisting>
|
/usr/sbin/ppp -direct pppbigco</programlisting>
|
||||||
|
|
@ -271,8 +266,7 @@ bigco.com. MX 10 bigco.com.
|
||||||
|
|
||||||
<para>Message stolen from the &a.isp;.</para>
|
<para>Message stolen from the &a.isp;.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>> we provide the secondary MX for a customer. The customer connects to
|
||||||
> we provide the secondary MX for a customer. The customer connects to
|
|
||||||
> our services several times a day automatically to get the mails to
|
> our services several times a day automatically to get the mails to
|
||||||
> his primary MX (We do not call his site when a mail for his domains
|
> his primary MX (We do not call his site when a mail for his domains
|
||||||
> arrived). Our sendmail sends the mailqueue every 30 minutes. At the
|
> arrived). Our sendmail sends the mailqueue every 30 minutes. At the
|
||||||
|
|
@ -388,8 +382,7 @@ example.FreeBSD.org mail is handled (pri=10) by hub.FreeBSD.org</screen>
|
||||||
role="fqdn">freefall.FreeBSD.org</hostid> at one time looked like
|
role="fqdn">freefall.FreeBSD.org</hostid> at one time looked like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>freefall MX 30 mail.crl.net
|
||||||
freefall MX 30 mail.crl.net
|
|
||||||
freefall MX 40 agora.rdrop.com
|
freefall MX 40 agora.rdrop.com
|
||||||
freefall MX 10 freefall.FreeBSD.org
|
freefall MX 10 freefall.FreeBSD.org
|
||||||
freefall MX 20 who.cdrom.com</programlisting>
|
freefall MX 20 who.cdrom.com</programlisting>
|
||||||
|
|
@ -424,8 +417,7 @@ freefall MX 20 who.cdrom.com</programlisting>
|
||||||
exchange for each workstation on the network. This is done in
|
exchange for each workstation on the network. This is done in
|
||||||
your DNS configuration like so:</para>
|
your DNS configuration like so:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||||
example.FreeBSD.org A 204.216.27.XX ; Workstation
|
|
||||||
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
||||||
|
|
||||||
<para>This will redirect mail for the workstation to the mailhost no
|
<para>This will redirect mail for the workstation to the mailhost no
|
||||||
|
|
@ -445,8 +437,7 @@ example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||||
role="fqdn">mail.myhost.com</hostid>. The entry in your DNS
|
role="fqdn">mail.myhost.com</hostid>. The entry in your DNS
|
||||||
should look like this:</para>
|
should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>customer1.org MX 10 mail.myhost.com</programlisting>
|
||||||
customer1.org MX 10 mail.myhost.com</programlisting>
|
|
||||||
|
|
||||||
<para>You do <emphasis>not</emphasis> need an A record if you only
|
<para>You do <emphasis>not</emphasis> need an A record if you only
|
||||||
want to handle email for the domain.</para>
|
want to handle email for the domain.</para>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mirrors/chapter.sgml,v 1.109 2001/03/18 19:27:12 jdp Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/mirrors/chapter.sgml,v 1.110 2001/04/05 04:53:24 jdp Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="mirrors">
|
<appendix id="mirrors">
|
||||||
|
|
@ -1778,8 +1778,7 @@
|
||||||
simply list the collections, one per line (in this case,
|
simply list the collections, one per line (in this case,
|
||||||
only one line):</para>
|
only one line):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>src-all</programlisting>
|
||||||
src-all</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
@ -2016,8 +2015,7 @@ src-all</programlisting>
|
||||||
add this line at the beginning of our
|
add this line at the beginning of our
|
||||||
<filename>supfile</filename>:</para>
|
<filename>supfile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default tag=.</programlisting>
|
||||||
*default tag=.</programlisting>
|
|
||||||
|
|
||||||
<para>There is an important special case that comes into play
|
<para>There is an important special case that comes into play
|
||||||
if you specify neither a <literal>tag=</literal> field nor a
|
if you specify neither a <literal>tag=</literal> field nor a
|
||||||
|
|
@ -2044,8 +2042,7 @@ src-all</programlisting>
|
||||||
use a fictional FreeBSD distribution site,
|
use a fictional FreeBSD distribution site,
|
||||||
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default host=cvsup666.FreeBSD.org</programlisting>
|
||||||
*default host=cvsup666.FreeBSD.org</programlisting>
|
|
||||||
|
|
||||||
<para>You will need to change the host to one that actually
|
<para>You will need to change the host to one that actually
|
||||||
exists before running CVSup. On any particular run of
|
exists before running CVSup. On any particular run of
|
||||||
|
|
@ -2066,8 +2063,7 @@ src-all</programlisting>
|
||||||
the collections we have chosen to receive, so this is the
|
the collections we have chosen to receive, so this is the
|
||||||
correct specification:</para>
|
correct specification:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default prefix=/usr</programlisting>
|
||||||
*default prefix=/usr</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
@ -2081,8 +2077,7 @@ src-all</programlisting>
|
||||||
already received. We will use the standard base directory,
|
already received. We will use the standard base directory,
|
||||||
<filename>/usr/local/etc/cvsup</filename>:</para>
|
<filename>/usr/local/etc/cvsup</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default base=/usr/local/etc/cvsup</programlisting>
|
||||||
*default base=/usr/local/etc/cvsup</programlisting>
|
|
||||||
|
|
||||||
<para>This setting is used by default if it is not specified
|
<para>This setting is used by default if it is not specified
|
||||||
in the <filename>supfile</filename>, so we actually do not
|
in the <filename>supfile</filename>, so we actually do not
|
||||||
|
|
@ -2102,8 +2097,7 @@ src-all</programlisting>
|
||||||
needs to be present in the
|
needs to be present in the
|
||||||
<filename>supfile</filename>:</para>
|
<filename>supfile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||||
*default release=cvs delete use-rel-suffix compress</programlisting>
|
|
||||||
|
|
||||||
<para><literal>release=cvs</literal> indicates that the server
|
<para><literal>release=cvs</literal> indicates that the server
|
||||||
should get its information out of the main FreeBSD CVS
|
should get its information out of the main FreeBSD CVS
|
||||||
|
|
@ -2138,8 +2132,7 @@ src-all</programlisting>
|
||||||
<para>Here is the entire <filename>supfile</filename> for our
|
<para>Here is the entire <filename>supfile</filename> for our
|
||||||
example:</para>
|
example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>*default tag=.
|
||||||
*default tag=.
|
|
||||||
*default host=cvsup666.FreeBSD.org
|
*default host=cvsup666.FreeBSD.org
|
||||||
*default prefix=/usr
|
*default prefix=/usr
|
||||||
*default base=/usr/local/etc/cvsup
|
*default base=/usr/local/etc/cvsup
|
||||||
|
|
@ -3755,8 +3748,7 @@ src-all</programlisting>
|
||||||
<para>The path to the files are:
|
<para>The path to the files are:
|
||||||
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||||
stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
|
||||||
130.237.234.43 #hot.stacken.kth.se
|
130.237.234.43 #hot.stacken.kth.se
|
||||||
130.237.237.230 #fishburger.stacken.kth.se
|
130.237.237.230 #fishburger.stacken.kth.se
|
||||||
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/pgpkeys/chapter.sgml,v 1.65 2001/03/29 00:00:09 murray Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/pgpkeys/chapter.sgml,v 1.66 2001/03/29 15:46:56 will Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="pgpkeys">
|
<appendix id="pgpkeys">
|
||||||
|
|
@ -1187,8 +1187,7 @@ F/U/FPM/mYbWNUELgSmN/YkSwWLGgfjcCObTwgd0FOW7XZuJ71R7ytBEn5kDt3bc
|
||||||
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
||||||
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
||||||
=L8Lf
|
=L8Lf
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1414,8 +1413,7 @@ gVMMZjZ7QiiO1LGl6IIiKRtJIXi45PcHtYgSZlXKflqPHhEIrOhFwpV+C7uL5jnv
|
||||||
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
||||||
0E4T
|
0E4T
|
||||||
=Qwmg
|
=Qwmg
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1476,8 +1474,7 @@ cJowZeBj8Ss1QZsVzeyfAAQLA/0ZwjK242AXkXjibtzEfZqK7l22D9xIT+ajc6zP
|
||||||
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
||||||
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
||||||
=rQiL
|
=rQiL
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||||
</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.17 2000/06/14 20:30:36 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/policies/chapter.sgml,v 1.18 2000/08/20 17:18:43 chris Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="policies">
|
<chapter id="policies">
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
maintained by a person or group of persons, they can communicate this
|
maintained by a person or group of persons, they can communicate this
|
||||||
fact to the world by adding a
|
fact to the world by adding a
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||||
MAINTAINER= email-addresses</programlisting>
|
|
||||||
|
|
||||||
line to the <filename>Makefile</filename>s covering this portion of the
|
line to the <filename>Makefile</filename>s covering this portion of the
|
||||||
source tree.</para>
|
source tree.</para>
|
||||||
|
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
||||||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>This directory contains virgin sources of the original distribution files
|
||||||
This directory contains virgin sources of the original distribution files
|
|
||||||
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
||||||
the files in this directory via patches and a cvs commit. New versions or
|
the files in this directory via patches and a cvs commit. New versions or
|
||||||
official-patch versions must be imported. Please remember to import with
|
official-patch versions must be imported. Please remember to import with
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.29 2000/10/13 21:07:01 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.30 2000/11/11 19:24:47 ben Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="ppp-and-slip">
|
<chapter id="ppp-and-slip">
|
||||||
|
|
@ -133,8 +133,7 @@
|
||||||
configuration file. It should have the following line somewhere
|
configuration file. It should have the following line somewhere
|
||||||
in it:</para>
|
in it:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device tun 1</programlisting>
|
||||||
pseudo-device tun 1</programlisting>
|
|
||||||
|
|
||||||
<para>If this line is not present, you will need to add it to the
|
<para>If this line is not present, you will need to add it to the
|
||||||
configuration file and recompile your kernel. The stock
|
configuration file and recompile your kernel. The stock
|
||||||
|
|
@ -250,8 +249,7 @@ tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500</screen>
|
||||||
<para>This file should contain the following two lines (in this
|
<para>This file should contain the following two lines (in this
|
||||||
order):</para>
|
order):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hosts
|
||||||
hosts
|
|
||||||
bind</programlisting>
|
bind</programlisting>
|
||||||
|
|
||||||
<para>These instruct the resolver to first look in the file
|
<para>These instruct the resolver to first look in the file
|
||||||
|
|
@ -270,8 +268,7 @@ bind</programlisting>
|
||||||
role="ipaddr">10.0.0.1</hostid>,
|
role="ipaddr">10.0.0.1</hostid>,
|
||||||
<filename>/etc/hosts</filename> should contain:</para>
|
<filename>/etc/hosts</filename> should contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>127.0.0.1 localhost.bar.com localhost
|
||||||
127.0.0.1 localhost.bar.com localhost
|
|
||||||
127.0.0.1 localhost.bar.com.
|
127.0.0.1 localhost.bar.com.
|
||||||
10.0.0.1 foo.bar.com foo
|
10.0.0.1 foo.bar.com foo
|
||||||
10.0.0.1 foo.bar.com.</programlisting>
|
10.0.0.1 foo.bar.com.</programlisting>
|
||||||
|
|
@ -298,8 +295,7 @@ bind</programlisting>
|
||||||
may leave this file empty. Normally, you will need to enter
|
may leave this file empty. Normally, you will need to enter
|
||||||
the following line(s):</para>
|
the following line(s):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain <replaceable>bar.com</replaceable>
|
||||||
domain <replaceable>bar.com</replaceable>
|
|
||||||
nameserver <replaceable>x.x.x.x</replaceable>
|
nameserver <replaceable>x.x.x.x</replaceable>
|
||||||
nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
||||||
|
|
||||||
|
|
@ -351,8 +347,7 @@ nameserver <replaceable>y.y.y.y</replaceable></programlisting>
|
||||||
using spaces or tabs.</para>
|
using spaces or tabs.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 default:
|
||||||
1 default:
|
|
||||||
2 set device /dev/cuaa0
|
2 set device /dev/cuaa0
|
||||||
3 set speed 115200
|
3 set speed 115200
|
||||||
4 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\TTIMEOUT 40 CONNECT"
|
4 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\TTIMEOUT 40 CONNECT"
|
||||||
|
|
@ -545,8 +540,7 @@ protocol: ppp</screen>
|
||||||
<link linkend="userppp-staticIP">PPP and Static IP
|
<link linkend="userppp-staticIP">PPP and Static IP
|
||||||
Addresses</link>, with the following change:</para>
|
Addresses</link>, with the following change:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
||||||
9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
|
||||||
|
|
||||||
<para>Again, do not include the line numbers, they are just for
|
<para>Again, do not include the line numbers, they are just for
|
||||||
reference. Indentation of at least one space is
|
reference. Indentation of at least one space is
|
||||||
|
|
@ -583,8 +577,7 @@ protocol: ppp</screen>
|
||||||
used. The following entry will delete the existing bogus
|
used. The following entry will delete the existing bogus
|
||||||
routes, and create correct ones:</para>
|
routes, and create correct ones:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 provider:
|
||||||
1 provider:
|
|
||||||
2 delete ALL
|
2 delete ALL
|
||||||
3 add 0 0 HISADDR</programlisting>
|
3 add 0 0 HISADDR</programlisting>
|
||||||
|
|
||||||
|
|
@ -655,8 +648,7 @@ protocol: ppp</screen>
|
||||||
also confirm that the <filename>/etc/rc.conf</filename> file
|
also confirm that the <filename>/etc/rc.conf</filename> file
|
||||||
contains the following:</para>
|
contains the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>gateway="YES"</programlisting>
|
||||||
gateway="YES"</programlisting>
|
|
||||||
|
|
||||||
<sect5>
|
<sect5>
|
||||||
<title>Which getty?</title>
|
<title>Which getty?</title>
|
||||||
|
|
@ -702,8 +694,7 @@ gateway="YES"</programlisting>
|
||||||
sections of the configuration file using the
|
sections of the configuration file using the
|
||||||
<command>allow</command> command:</para>
|
<command>allow</command> command:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>allow users fred mary</programlisting>
|
||||||
allow users fred mary</programlisting>
|
|
||||||
|
|
||||||
<para>If this command is used in the <literal>default</literal>
|
<para>If this command is used in the <literal>default</literal>
|
||||||
section, it gives the specified users access to
|
section, it gives the specified users access to
|
||||||
|
|
@ -717,8 +708,7 @@ allow users fred mary</programlisting>
|
||||||
<filename>/etc/ppp/ppp-shell</filename> containing the
|
<filename>/etc/ppp/ppp-shell</filename> containing the
|
||||||
following:</para>
|
following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
||||||
CALLEDAS="$IDENT"
|
CALLEDAS="$IDENT"
|
||||||
TTY=`tty`
|
TTY=`tty`
|
||||||
|
|
@ -745,8 +735,7 @@ exec /usr/sbin/ppp -direct $IDENT</programlisting>
|
||||||
<username>pchilds</username> (remember don't directly edit
|
<username>pchilds</username> (remember don't directly edit
|
||||||
the password file, use <command>vipw</command>).</para>
|
the password file, use <command>vipw</command>).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||||
pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
|
||||||
|
|
||||||
<para>Create a <filename>/home/ppp</filename> directory that
|
<para>Create a <filename>/home/ppp</filename> directory that
|
||||||
is world readable containing the following 0 byte
|
is world readable containing the following 0 byte
|
||||||
|
|
@ -787,8 +776,7 @@ pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlistin
|
||||||
<para>The <filename>/etc/ppp/ppp.conf</filename> file should
|
<para>The <filename>/etc/ppp/ppp.conf</filename> file should
|
||||||
contain something along the lines of:</para>
|
contain something along the lines of:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>default:
|
||||||
default:
|
|
||||||
set debug phase lcp chat
|
set debug phase lcp chat
|
||||||
set timeout 0
|
set timeout 0
|
||||||
|
|
||||||
|
|
@ -823,8 +811,7 @@ ttyd1:
|
||||||
<username>sam</username>, and <username>mary</username>
|
<username>sam</username>, and <username>mary</username>
|
||||||
example.</para>
|
example.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fred:
|
||||||
fred:
|
|
||||||
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
||||||
|
|
||||||
sam:
|
sam:
|
||||||
|
|
@ -839,8 +826,7 @@ mary:
|
||||||
role="ipaddr">203.14.101.0</hostid> class C via the
|
role="ipaddr">203.14.101.0</hostid> class C via the
|
||||||
client's ppp link.</para>
|
client's ppp link.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>fred:
|
||||||
fred:
|
|
||||||
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
||||||
|
|
||||||
sam:
|
sam:
|
||||||
|
|
@ -876,8 +862,7 @@ mary:
|
||||||
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
||||||
file has the following in it:</para>
|
file has the following in it:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||||
/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
|
||||||
|
|
||||||
<para>This will tell <command>mgetty</command> to run the
|
<para>This will tell <command>mgetty</command> to run the
|
||||||
<filename>ppp-pap-dialup</filename> script for detected PPP
|
<filename>ppp-pap-dialup</filename> script for detected PPP
|
||||||
|
|
@ -887,8 +872,7 @@ mary:
|
||||||
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
||||||
following (the file should be executable):</para>
|
following (the file should be executable):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||||
|
|
||||||
<para>For each dialup line enabled in
|
<para>For each dialup line enabled in
|
||||||
|
|
@ -897,8 +881,7 @@ exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||||
happily co-exist with the definitions we created
|
happily co-exist with the definitions we created
|
||||||
above.</para>
|
above.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pap:
|
||||||
pap:
|
|
||||||
enable pap
|
enable pap
|
||||||
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
||||||
enable proxy</programlisting>
|
enable proxy</programlisting>
|
||||||
|
|
@ -909,8 +892,7 @@ pap:
|
||||||
alternatively add the following option to authenticate users
|
alternatively add the following option to authenticate users
|
||||||
via PAP from <filename>/etc/password</filename> file.</para>
|
via PAP from <filename>/etc/password</filename> file.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable passwdauth</programlisting>
|
||||||
enable passwdauth</programlisting>
|
|
||||||
|
|
||||||
<para>If you wish to assign some users a static IP number, you
|
<para>If you wish to assign some users a static IP number, you
|
||||||
can specify the number as the third argument in
|
can specify the number as the third argument in
|
||||||
|
|
@ -929,15 +911,13 @@ enable passwdauth</programlisting>
|
||||||
following lines might be added to the relevant section of
|
following lines might be added to the relevant section of
|
||||||
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>enable msext
|
||||||
enable msext
|
|
||||||
set ns 203.14.100.1 203.14.100.2
|
set ns 203.14.100.1 203.14.100.2
|
||||||
set nbns 203.14.100.5</programlisting>
|
set nbns 203.14.100.5</programlisting>
|
||||||
|
|
||||||
<para>And for PPP version 2 and above:</para>
|
<para>And for PPP version 2 and above:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>accept dns
|
||||||
accept dns
|
|
||||||
set dns 203.14.100.1 203.14.100.2
|
set dns 203.14.100.1 203.14.100.2
|
||||||
set nbns 203.14.100.5</programlisting>
|
set nbns 203.14.100.5</programlisting>
|
||||||
|
|
||||||
|
|
@ -970,8 +950,7 @@ set nbns 203.14.100.5</programlisting>
|
||||||
linkend="userppp-dynamicIP">PPP and Dynamic IP addresses</link>
|
linkend="userppp-dynamicIP">PPP and Dynamic IP addresses</link>
|
||||||
sections, the following alterations must be made:</para>
|
sections, the following alterations must be made:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>7 set login
|
||||||
7 set login
|
|
||||||
…
|
…
|
||||||
12 set authname <replaceable>MyUserName</replaceable>
|
12 set authname <replaceable>MyUserName</replaceable>
|
||||||
13 set authkey <replaceable>MyPassword</replaceable></programlisting>
|
13 set authkey <replaceable>MyPassword</replaceable></programlisting>
|
||||||
|
|
@ -1011,13 +990,11 @@ set nbns 203.14.100.5</programlisting>
|
||||||
<replaceable>MyPassword</replaceable>. You may want to
|
<replaceable>MyPassword</replaceable>. You may want to
|
||||||
add an additional line, such as:</para>
|
add an additional line, such as:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>15 accept PAP</programlisting>
|
||||||
15 accept PAP</programlisting>
|
|
||||||
|
|
||||||
<para>or</para>
|
<para>or</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>15 accept CHAP</programlisting>
|
||||||
15 accept CHAP</programlisting>
|
|
||||||
|
|
||||||
<para>to make it obvious that this is the intention, but
|
<para>to make it obvious that this is the intention, but
|
||||||
PAP and CHAP are both accepted by default.</para>
|
PAP and CHAP are both accepted by default.</para>
|
||||||
|
|
@ -1035,8 +1012,7 @@ set nbns 203.14.100.5</programlisting>
|
||||||
suitable diagnostic port has been set up. To do this, add the
|
suitable diagnostic port has been set up. To do this, add the
|
||||||
following line to your configuration:</para>
|
following line to your configuration:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||||
set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
|
||||||
|
|
||||||
<para>This will tell PPP to listen to the specified unix-domain
|
<para>This will tell PPP to listen to the specified unix-domain
|
||||||
socket, asking clients for the specified password before
|
socket, asking clients for the specified password before
|
||||||
|
|
@ -1061,8 +1037,7 @@ set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||||
<para>Working from the top down in this file, make sure the
|
<para>Working from the top down in this file, make sure the
|
||||||
<literal>hostname=</literal> line is set, e.g.:</para>
|
<literal>hostname=</literal> line is set, e.g.:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hostname="foo.bar.com"</programlisting>
|
||||||
hostname="foo.bar.com"</programlisting>
|
|
||||||
|
|
||||||
<para>If your ISP has supplied you with a static IP address and
|
<para>If your ISP has supplied you with a static IP address and
|
||||||
name, it's probably best that you use this name as your host
|
name, it's probably best that you use this name as your host
|
||||||
|
|
@ -1073,8 +1048,7 @@ hostname="foo.bar.com"</programlisting>
|
||||||
make sure the <devicename>tun0</devicename> device is added to
|
make sure the <devicename>tun0</devicename> device is added to
|
||||||
the list, otherwise remove it.</para>
|
the list, otherwise remove it.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||||
network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>The <literal>ifconfig_tun0</literal> variable should be
|
<para>The <literal>ifconfig_tun0</literal> variable should be
|
||||||
|
|
@ -1082,8 +1056,7 @@ network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||||
<filename>/etc/start_if.tun0</filename> should be created.
|
<filename>/etc/start_if.tun0</filename> should be created.
|
||||||
This file should contain the line:</para>
|
This file should contain the line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ppp -auto mysystem</programlisting>
|
||||||
ppp -auto mysystem</programlisting>
|
|
||||||
|
|
||||||
<para>This script is executed at network configuration time,
|
<para>This script is executed at network configuration time,
|
||||||
starting your ppp daemon in automatic mode. If you have a LAN
|
starting your ppp daemon in automatic mode. If you have a LAN
|
||||||
|
|
@ -1095,8 +1068,7 @@ ppp -auto mysystem</programlisting>
|
||||||
<para>Set the router program to <literal>NO</literal> with
|
<para>Set the router program to <literal>NO</literal> with
|
||||||
following line in your <filename>/etc/rc.conf</filename>:</para>
|
following line in your <filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>router_enable="NO"</programlisting>
|
||||||
router_enable="NO"</programlisting>
|
|
||||||
|
|
||||||
<para>It is important that the <command>routed</command> daemon is
|
<para>It is important that the <command>routed</command> daemon is
|
||||||
not started (it is started by default), as it
|
not started (it is started by default), as it
|
||||||
|
|
@ -1110,8 +1082,7 @@ router_enable="NO"</programlisting>
|
||||||
every now and then, possibly causing your machine to dial out.
|
every now and then, possibly causing your machine to dial out.
|
||||||
You may try:</para>
|
You may try:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>sendmail_flags="-bd"</programlisting>
|
||||||
sendmail_flags="-bd"</programlisting>
|
|
||||||
|
|
||||||
<para>The downside of this is that you must force
|
<para>The downside of this is that you must force
|
||||||
<command>sendmail</command> to re-examine the mail queue
|
<command>sendmail</command> to re-examine the mail queue
|
||||||
|
|
@ -1122,8 +1093,7 @@ sendmail_flags="-bd"</programlisting>
|
||||||
<para>You may wish to use the <command>!bg</command> command in
|
<para>You may wish to use the <command>!bg</command> command in
|
||||||
<filename>ppp.linkup</filename> to do this automatically:</para>
|
<filename>ppp.linkup</filename> to do this automatically:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>1 provider:
|
||||||
1 provider:
|
|
||||||
2 delete ALL
|
2 delete ALL
|
||||||
3 add 0 0 HISADDR
|
3 add 0 0 HISADDR
|
||||||
4 !bg sendmail -bd -q30m</programlisting>
|
4 !bg sendmail -bd -q30m</programlisting>
|
||||||
|
|
@ -1285,8 +1255,7 @@ sendmail_flags="-bd"</programlisting>
|
||||||
<para>I used the following <filename>/etc/ppp/options</filename> to
|
<para>I used the following <filename>/etc/ppp/options</filename> to
|
||||||
connect to CISCO terminal server PPP line.</para>
|
connect to CISCO terminal server PPP line.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>crtscts # enable hardware flow control
|
||||||
crtscts # enable hardware flow control
|
|
||||||
modem # modem control line
|
modem # modem control line
|
||||||
noipdefault # remote PPP server must supply your IP address.
|
noipdefault # remote PPP server must supply your IP address.
|
||||||
# if the remote host doesn't send your IP during IPCP
|
# if the remote host doesn't send your IP during IPCP
|
||||||
|
|
@ -1332,8 +1301,7 @@ defaultroute # put this if you want that PPP server will be your
|
||||||
<para>Following <filename>/etc/ppp/pppup</filename> script will make
|
<para>Following <filename>/etc/ppp/pppup</filename> script will make
|
||||||
all 3 stages automatically:</para>
|
all 3 stages automatically:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1361,8 +1329,7 @@ pppd /dev/tty01 19200</programlisting>
|
||||||
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
||||||
to disconnect the PPP line:</para>
|
to disconnect the PPP line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ X${pid} != "X" ] ; then
|
if [ X${pid} != "X" ] ; then
|
||||||
echo 'killing pppd, PID=' ${pid}
|
echo 'killing pppd, PID=' ${pid}
|
||||||
|
|
@ -1385,8 +1352,7 @@ kermit -y /etc/ppp/kermit.hup
|
||||||
<filename>/usr/etc/ppp/ppptest</filename>, which should look like
|
<filename>/usr/etc/ppp/ppptest</filename>, which should look like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ X${pid} != "X" ] ; then
|
if [ X${pid} != "X" ] ; then
|
||||||
echo 'pppd running: PID=' ${pid-NONE}
|
echo 'pppd running: PID=' ${pid-NONE}
|
||||||
|
|
@ -1401,8 +1367,7 @@ ifconfig ppp0</programlisting>
|
||||||
<filename>/etc/ppp/kermit.hup</filename>, which should
|
<filename>/etc/ppp/kermit.hup</filename>, which should
|
||||||
contain:</para>
|
contain:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set line /dev/tty01 ; put your modem device here
|
||||||
set line /dev/tty01 ; put your modem device here
|
|
||||||
set speed 19200
|
set speed 19200
|
||||||
set file type binary
|
set file type binary
|
||||||
set file names literal
|
set file names literal
|
||||||
|
|
@ -1429,8 +1394,7 @@ exit</programlisting>
|
||||||
|
|
||||||
<para><filename>/etc/ppp/options</filename>:</para>
|
<para><filename>/etc/ppp/options</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/dev/cuaa1 115200
|
||||||
/dev/cuaa1 115200
|
|
||||||
|
|
||||||
crtscts # enable hardware flow control
|
crtscts # enable hardware flow control
|
||||||
modem # modem control line
|
modem # modem control line
|
||||||
|
|
@ -1455,8 +1419,7 @@ defaultroute # put this if you want that PPP server will be
|
||||||
<para>The following should go on a single line.</para>
|
<para>The following should go on a single line.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||||
ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
|
||||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||||
TIMEOUT 5 sword: <password></programlisting>
|
TIMEOUT 5 sword: <password></programlisting>
|
||||||
|
|
||||||
|
|
@ -1476,8 +1439,7 @@ ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||||
<para><filename>/etc/ppp/options</filename> should contain something
|
<para><filename>/etc/ppp/options</filename> should contain something
|
||||||
similar to the following:</para>
|
similar to the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>crtscts # Hardware flow control
|
||||||
crtscts # Hardware flow control
|
|
||||||
netmask 255.255.255.0 # netmask ( not required )
|
netmask 255.255.255.0 # netmask ( not required )
|
||||||
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
||||||
# local ip must be different from one
|
# local ip must be different from one
|
||||||
|
|
@ -1493,8 +1455,7 @@ modem # modem line</programlisting>
|
||||||
will enable tell <application>pppd</application> to behave as a
|
will enable tell <application>pppd</application> to behave as a
|
||||||
server:</para>
|
server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1521,8 +1482,7 @@ pppd /dev/tty01 19200</programlisting>
|
||||||
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
||||||
stop the server:</para>
|
stop the server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
ps ax |grep pppd |grep -v grep
|
ps ax |grep pppd |grep -v grep
|
||||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||||
if [ "X${pid}" != "X" ] ; then
|
if [ "X${pid}" != "X" ] ; then
|
||||||
|
|
@ -1544,8 +1504,7 @@ kermit -y /etc/ppp/kermit.noans</programlisting>
|
||||||
(<filename>/etc/ppp/kermit.ans</filename>) will enable/disable
|
(<filename>/etc/ppp/kermit.ans</filename>) will enable/disable
|
||||||
autoanswer mode on your modem. It should look like this:</para>
|
autoanswer mode on your modem. It should look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>set line /dev/tty01
|
||||||
set line /dev/tty01
|
|
||||||
set speed 19200
|
set speed 19200
|
||||||
set file type binary
|
set file type binary
|
||||||
set file names literal
|
set file names literal
|
||||||
|
|
@ -1575,8 +1534,7 @@ exit</programlisting>
|
||||||
in this script; you will also need to change the input statement
|
in this script; you will also need to change the input statement
|
||||||
depending on responses from your modem and remote host.</para>
|
depending on responses from your modem and remote host.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>;
|
||||||
;
|
|
||||||
; put the com line attached to the modem here:
|
; put the com line attached to the modem here:
|
||||||
;
|
;
|
||||||
set line /dev/tty01
|
set line /dev/tty01
|
||||||
|
|
@ -1756,8 +1714,7 @@ exit 1
|
||||||
<para>Here is an example of a working
|
<para>Here is an example of a working
|
||||||
<filename>ppp.conf</filename>:</para>
|
<filename>ppp.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>default: # or name_of_service_provider
|
||||||
default: # or name_of_service_provider
|
|
||||||
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
||||||
set mru 1492
|
set mru 1492
|
||||||
set mtu 1492
|
set mtu 1492
|
||||||
|
|
@ -1797,8 +1754,7 @@ papchap:
|
||||||
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ppp_enable="YES"
|
||||||
ppp_enable="YES"
|
|
||||||
ppp_mode="ddial"
|
ppp_mode="ddial"
|
||||||
ppp_nat="YES"
|
ppp_nat="YES"
|
||||||
ppp_profile="default" # or your provider</programlisting>
|
ppp_profile="default" # or your provider</programlisting>
|
||||||
|
|
@ -1836,8 +1792,7 @@ ppp_profile="default" # or your provider</programlisting>
|
||||||
<para>Make sure you have the following in your kernel configuration
|
<para>Make sure you have the following in your kernel configuration
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 1</programlisting>
|
||||||
pseudo-device sl 1</programlisting>
|
|
||||||
|
|
||||||
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
||||||
this should not be a problem unless you have deleted it.</para>
|
this should not be a problem unless you have deleted it.</para>
|
||||||
|
|
@ -1851,8 +1806,7 @@ pseudo-device sl 1</programlisting>
|
||||||
your <filename>/etc/hosts</filename> file. Mine looks like
|
your <filename>/etc/hosts</filename> file. Mine looks like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>127.0.0.1 localhost loghost
|
||||||
127.0.0.1 localhost loghost
|
|
||||||
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
||||||
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
||||||
128.32.136.9 ns1.Berkeley.edu ns1
|
128.32.136.9 ns1.Berkeley.edu ns1
|
||||||
|
|
@ -1874,8 +1828,7 @@ pseudo-device sl 1</programlisting>
|
||||||
<para>Set your hostname by editing the line that
|
<para>Set your hostname by editing the line that
|
||||||
says:</para>
|
says:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>hostname=<quote>myname.my.domain</quote></programlisting>
|
||||||
hostname=<quote>myname.my.domain</quote></programlisting>
|
|
||||||
|
|
||||||
<para>You should give it your full Internet
|
<para>You should give it your full Internet
|
||||||
hostname.</para>
|
hostname.</para>
|
||||||
|
|
@ -1885,34 +1838,29 @@ hostname=<quote>myname.my.domain</quote></programlisting>
|
||||||
<para>Add sl0 to the list of network interfaces by
|
<para>Add sl0 to the list of network interfaces by
|
||||||
changing the line that says:</para>
|
changing the line that says:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces="lo0"</programlisting>
|
||||||
network_interfaces="lo0"</programlisting>
|
|
||||||
|
|
||||||
<para>to:</para>
|
<para>to:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||||
network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the startup flags of sl0 by adding a
|
<para>Set the startup flags of sl0 by adding a
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||||
ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Designate the default router by changing the
|
<para>Designate the default router by changing the
|
||||||
line:</para>
|
line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>defaultrouter=<quote>NO</quote></programlisting>
|
||||||
defaultrouter=<quote>NO</quote></programlisting>
|
|
||||||
|
|
||||||
<para>to:</para>
|
<para>to:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||||
defaultrouter=<quote>slip-gateway</quote></programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -1921,8 +1869,7 @@ defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||||
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
||||||
contains:</para>
|
contains:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>domain HIP.Berkeley.EDU
|
||||||
domain HIP.Berkeley.EDU
|
|
||||||
nameserver 128.32.136.9
|
nameserver 128.32.136.9
|
||||||
nameserver 128.32.136.12</programlisting>
|
nameserver 128.32.136.12</programlisting>
|
||||||
|
|
||||||
|
|
@ -1956,8 +1903,7 @@ nameserver 128.32.136.12</programlisting>
|
||||||
to enter depends on your environment. I use kermit, with a
|
to enter depends on your environment. I use kermit, with a
|
||||||
script like this:</para>
|
script like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># kermit setup
|
||||||
# kermit setup
|
|
||||||
set modem hayes
|
set modem hayes
|
||||||
set line /dev/modem
|
set line /dev/modem
|
||||||
set speed 115200
|
set speed 115200
|
||||||
|
|
@ -2142,8 +2088,7 @@ silvia.HIP.Berke localhost.Berkeley UGH 34 47641234 lo0 - 0.438
|
||||||
something like this (except it would be all on one
|
something like this (except it would be all on one
|
||||||
line):</para>
|
line):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||||
Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
|
||||||
|
|
||||||
<para>When <username>Shelmerg</username> logs in,
|
<para>When <username>Shelmerg</username> logs in,
|
||||||
<command>sliplogin</command> will search
|
<command>sliplogin</command> will search
|
||||||
|
|
@ -2152,16 +2097,14 @@ Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/s
|
||||||
<filename>/etc/sliphome/slip.hosts</filename> that
|
<filename>/etc/sliphome/slip.hosts</filename> that
|
||||||
reads:</para>
|
reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||||
Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
|
||||||
|
|
||||||
<para><command>sliplogin</command> will find that matching line,
|
<para><command>sliplogin</command> will find that matching line,
|
||||||
hook the serial line into the next available SLIP interface,
|
hook the serial line into the next available SLIP interface,
|
||||||
and then execute <filename>/etc/sliphome/slip.login</filename>
|
and then execute <filename>/etc/sliphome/slip.login</filename>
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||||
/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
|
||||||
|
|
||||||
<para>If all goes well,
|
<para>If all goes well,
|
||||||
<filename>/etc/sliphome/slip.login</filename> will issue an
|
<filename>/etc/sliphome/slip.login</filename> will issue an
|
||||||
|
|
@ -2230,8 +2173,7 @@ sl1* 296 <Link> 0 0 0 0
|
||||||
configuration file (<filename>/sys/i386/conf/GENERIC</filename>)
|
configuration file (<filename>/sys/i386/conf/GENERIC</filename>)
|
||||||
is a line that reads:</para>
|
is a line that reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pseudo-device sl 2</programlisting>
|
||||||
pseudo-device sl 2</programlisting>
|
|
||||||
|
|
||||||
<para>This is the line that defines the number of SLIP devices
|
<para>This is the line that defines the number of SLIP devices
|
||||||
available in the kernel; the number at the end of the line is
|
available in the kernel; the number at the end of the line is
|
||||||
|
|
@ -2293,8 +2235,7 @@ pseudo-device sl 2</programlisting>
|
||||||
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# login local-addr remote-addr mask opt1 opt2
|
# login local-addr remote-addr mask opt1 opt2
|
||||||
# (normal,compress,noicmp)
|
# (normal,compress,noicmp)
|
||||||
#
|
#
|
||||||
|
|
@ -2371,8 +2312,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
||||||
file looks like this:</para>
|
file looks like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||||
|
|
||||||
|
|
@ -2394,8 +2334,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
clients), your <filename>/etc/sliphome/slip.login</filename>
|
clients), your <filename>/etc/sliphome/slip.login</filename>
|
||||||
file will need to look something like this:</para>
|
file will need to look something like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||||
|
|
||||||
|
|
@ -2457,8 +2396,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
example of a basic
|
example of a basic
|
||||||
<filename>slip.logout</filename> script:</para>
|
<filename>slip.logout</filename> script:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# slip.logout
|
# slip.logout
|
||||||
|
|
||||||
|
|
@ -2474,8 +2412,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
||||||
ARP entry for the SLIP client:</para>
|
ARP entry for the SLIP client:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh -
|
||||||
#!/bin/sh -
|
|
||||||
#
|
#
|
||||||
# @(#)slip.logout
|
# @(#)slip.logout
|
||||||
|
|
||||||
|
|
@ -2550,8 +2487,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
||||||
gated; here is a sample, similar to what the author used on a
|
gated; here is a sample, similar to what the author used on a
|
||||||
FreeBSD SLIP server:</para>
|
FreeBSD SLIP server:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# gated configuration file for dc.dsu.edu; for gated version 3.5alpha5
|
# gated configuration file for dc.dsu.edu; for gated version 3.5alpha5
|
||||||
# Only broadcast RIP information for xxx.xxx.yy out the ed Ethernet interface
|
# Only broadcast RIP information for xxx.xxx.yy out the ed Ethernet interface
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/printing/chapter.sgml,v 1.29 2000/06/13 01:01:17 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/printing/chapter.sgml,v 1.30 2000/06/19 13:43:42 nik Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="printing">
|
<chapter id="printing">
|
||||||
|
|
@ -482,8 +482,7 @@ sio2: type 16550A</screen>
|
||||||
<para>If you want interrupt-driven mode, add the
|
<para>If you want interrupt-driven mode, add the
|
||||||
<literal>irq</literal> specifier:</para>
|
<literal>irq</literal> specifier:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||||
device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
|
||||||
|
|
||||||
<para>Where <replaceable>N</replaceable> is the IRQ
|
<para>Where <replaceable>N</replaceable> is the IRQ
|
||||||
number for your computer's parallel port.</para>
|
number for your computer's parallel port.</para>
|
||||||
|
|
@ -493,8 +492,7 @@ device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</p
|
||||||
<para>If you want polled mode, do not add the
|
<para>If you want polled mode, do not add the
|
||||||
<literal>irq</literal> specifier:</para>
|
<literal>irq</literal> specifier:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||||
device lpt0 at isa? port? tty vector lptintr</programlisting>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</step>
|
</step>
|
||||||
|
|
@ -553,8 +551,7 @@ device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||||
will need a more sophisticated test. A small PostScript
|
will need a more sophisticated test. A small PostScript
|
||||||
program, such as the following, will suffice:</para>
|
program, such as the following, will suffice:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>%!PS
|
||||||
%!PS
|
|
||||||
100 100 moveto 300 300 lineto stroke
|
100 100 moveto 300 300 lineto stroke
|
||||||
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
||||||
(Is this thing working?) show
|
(Is this thing working?) show
|
||||||
|
|
@ -650,8 +647,7 @@ showpage</programlisting>
|
||||||
<para>Edit the file <filename>/etc/remote</filename>. Add
|
<para>Edit the file <filename>/etc/remote</filename>. Add
|
||||||
the following entry:</para>
|
the following entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
||||||
printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
|
||||||
|
|
||||||
<para>Where <replaceable>port</replaceable> is the device
|
<para>Where <replaceable>port</replaceable> is the device
|
||||||
entry for the serial port (<literal>ttyd0</literal>,
|
entry for the serial port (<literal>ttyd0</literal>,
|
||||||
|
|
@ -667,8 +663,7 @@ printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replac
|
||||||
a serial line to the third serial port at 19200 bps with
|
a serial line to the third serial port at 19200 bps with
|
||||||
no parity:</para>
|
no parity:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||||
printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
|
|
@ -856,8 +851,7 @@ printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||||
(a Diablo 630 line printer and a Panasonic KX-P4455 PostScript
|
(a Diablo 630 line printer and a Panasonic KX-P4455 PostScript
|
||||||
laser printer):</para>
|
laser printer):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose
|
# /etc/printcap for host rose
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:
|
rattan|line|diablo|lp|Diablo 630 Line Printer:
|
||||||
|
|
@ -893,8 +887,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:</programlisting>
|
||||||
<filename>/etc/printcap</filename> with <literal>sh</literal>
|
<filename>/etc/printcap</filename> with <literal>sh</literal>
|
||||||
added:</para>
|
added:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - no header pages anywhere
|
# /etc/printcap for host rose - no header pages anywhere
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -959,8 +952,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
specify the pathname of the spooling directory with the
|
specify the pathname of the spooling directory with the
|
||||||
<literal>sd</literal> capability:</para>
|
<literal>sd</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added spooling directories
|
# /etc/printcap for host rose - added spooling directories
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1000,8 +992,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<hostid>bamboo</hostid> is on a sixth serial port; here are
|
<hostid>bamboo</hostid> is on a sixth serial port; here are
|
||||||
the additions to <filename>/etc/printcap</filename>:</para>
|
the additions to <filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - identified what devices to use
|
# /etc/printcap for host rose - identified what devices to use
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1129,8 +1120,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<literal>LITOUT</literal> and <literal>PASS8</literal>
|
<literal>LITOUT</literal> and <literal>PASS8</literal>
|
||||||
flags:</para>
|
flags:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|
||||||
:sh:sd=/var/spool/lpd/bamboo:\
|
:sh:sd=/var/spool/lpd/bamboo:\
|
||||||
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
||||||
</sect4>
|
</sect4>
|
||||||
|
|
@ -1169,8 +1159,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
text filter. Put the following text into that file with your
|
text filter. Put the following text into that file with your
|
||||||
favorite text editor:</para>
|
favorite text editor:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# if-simple - Simple text input filter for lpd
|
# if-simple - Simple text input filter for lpd
|
||||||
# Installed in /usr/local/libexec/if-simple
|
# Installed in /usr/local/libexec/if-simple
|
||||||
|
|
@ -1190,8 +1179,7 @@ exit 2</programlisting>
|
||||||
printers we have so far in the example
|
printers we have so far in the example
|
||||||
<filename>/etc/printcap</filename>:</para>
|
<filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added text filter
|
# /etc/printcap for host rose - added text filter
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1255,8 +1243,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
the program. If you are using &man.lptest.1;, then your
|
the program. If you are using &man.lptest.1;, then your
|
||||||
results should look like the following:</para>
|
results should look like the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>!"#$%&'()*+,-./01234
|
||||||
!"#$%&'()*+,-./01234
|
|
||||||
"#$%&'()*+,-./012345
|
"#$%&'()*+,-./012345
|
||||||
#$%&'()*+,-./0123456
|
#$%&'()*+,-./0123456
|
||||||
$%&'()*+,-./01234567
|
$%&'()*+,-./01234567
|
||||||
|
|
@ -1636,8 +1623,7 @@ $%&'()*+,-./01234567
|
||||||
PostScript printer's entry in
|
PostScript printer's entry in
|
||||||
<filename>/etc/printcap</filename>:</para>
|
<filename>/etc/printcap</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:if=/usr/local/libexec/psif:</programlisting>
|
||||||
:if=/usr/local/libexec/psif:</programlisting>
|
|
||||||
|
|
||||||
<para>You should also specify the <literal>rw</literal> capability;
|
<para>You should also specify the <literal>rw</literal> capability;
|
||||||
that tells LPD to open the printer in read-write mode.</para>
|
that tells LPD to open the printer in read-write mode.</para>
|
||||||
|
|
@ -1647,8 +1633,7 @@ $%&'()*+,-./01234567
|
||||||
<command>lprps</command> needs), you can use the following shell
|
<command>lprps</command> needs), you can use the following shell
|
||||||
script as the text filter:</para>
|
script as the text filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# psif - Print PostScript or plain text on a PostScript printer
|
# psif - Print PostScript or plain text on a PostScript printer
|
||||||
# Script version; NOT the version that comes with lprps
|
# Script version; NOT the version that comes with lprps
|
||||||
|
|
@ -1711,8 +1696,7 @@ fi</programlisting>
|
||||||
-h</command> to get a list of devices the current installation of
|
-h</command> to get a list of devices the current installation of
|
||||||
Ghostscript supports.)</para>
|
Ghostscript supports.)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
||||||
# Installed in /usr/local/libexec/hpif
|
# Installed in /usr/local/libexec/hpif
|
||||||
|
|
@ -1761,8 +1745,7 @@ exit 2</programlisting>
|
||||||
<para>Finally, you need to notify LPD of the filter via the
|
<para>Finally, you need to notify LPD of the filter via the
|
||||||
<literal>if</literal> capability:</para>
|
<literal>if</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:if=/usr/local/libexec/hpif:</programlisting>
|
||||||
:if=/usr/local/libexec/hpif:</programlisting>
|
|
||||||
|
|
||||||
<para>That is it. You can type <command>lpr plain.text</command> and
|
<para>That is it. You can type <command>lpr plain.text</command> and
|
||||||
<filename>lpr whatever.ps</filename> and both should print
|
<filename>lpr whatever.ps</filename> and both should print
|
||||||
|
|
@ -1924,8 +1907,7 @@ exit 2</programlisting>
|
||||||
the new <literal>df</literal> capability for the printer
|
the new <literal>df</literal> capability for the printer
|
||||||
<literal>bamboo</literal>.</para>
|
<literal>bamboo</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - added df filter for bamboo
|
# /etc/printcap for host rose - added df filter for bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -1943,8 +1925,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<filename>/usr/local/libexec/psdf</filename>. Here is that
|
<filename>/usr/local/libexec/psdf</filename>. Here is that
|
||||||
script:</para>
|
script:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!bin/sh
|
||||||
#!bin/sh
|
|
||||||
#
|
#
|
||||||
# psdf - DVI to PostScript printer filter
|
# psdf - DVI to PostScript printer filter
|
||||||
# Installed in /usr/local/libexec/psdf
|
# Installed in /usr/local/libexec/psdf
|
||||||
|
|
@ -1975,8 +1956,7 @@ exec /usr/local/bin/dvips -f | /usr/local/libexec/lprps "$@"</programlisting>
|
||||||
conversion filter for a Hewlett Packard LaserJet III-Si
|
conversion filter for a Hewlett Packard LaserJet III-Si
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpvf - Convert GIF files into HP/PCL, then print
|
# hpvf - Convert GIF files into HP/PCL, then print
|
||||||
# Installed in /usr/local/libexec/hpvf
|
# Installed in /usr/local/libexec/hpvf
|
||||||
|
|
@ -1994,8 +1974,7 @@ giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \
|
||||||
<para>Here is the <filename>/etc/printcap</filename> file with an
|
<para>Here is the <filename>/etc/printcap</filename> file with an
|
||||||
entry for a printer using the above filter:</para>
|
entry for a printer using the above filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -2007,8 +1986,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
from the groff typesetting system for the PostScript printer named
|
from the groff typesetting system for the PostScript printer named
|
||||||
<literal>bamboo</literal>:</para>
|
<literal>bamboo</literal>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# pstf - Convert groff's troff data into PS, then print.
|
# pstf - Convert groff's troff data into PS, then print.
|
||||||
# Installed in /usr/local/libexec/pstf
|
# Installed in /usr/local/libexec/pstf
|
||||||
|
|
@ -2019,8 +1997,7 @@ exec grops | /usr/local/libexec/lprps "$@"</programlisting>
|
||||||
to handle the communication with the printer. If the printer were
|
to handle the communication with the printer. If the printer were
|
||||||
on a parallel port, we would use this script instead:</para>
|
on a parallel port, we would use this script instead:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# pstf - Convert groff's troff data into PS, then print.
|
# pstf - Convert groff's troff data into PS, then print.
|
||||||
# Installed in /usr/local/libexec/pstf
|
# Installed in /usr/local/libexec/pstf
|
||||||
|
|
@ -2030,16 +2007,14 @@ exec grops</programlisting>
|
||||||
<para>That is it. Here is the entry we need to add to
|
<para>That is it. Here is the entry we need to add to
|
||||||
<filename>/etc/printcap</filename> to enable the filter:</para>
|
<filename>/etc/printcap</filename> to enable the filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:tf=/usr/local/libexec/pstf:</programlisting>
|
||||||
:tf=/usr/local/libexec/pstf:</programlisting>
|
|
||||||
|
|
||||||
<para>Here is an example that might make old hands at FORTRAN blush.
|
<para>Here is an example that might make old hands at FORTRAN blush.
|
||||||
It is a FORTRAN-text filter for any printer that can directly
|
It is a FORTRAN-text filter for any printer that can directly
|
||||||
print plain text. We will install it for the printer
|
print plain text. We will install it for the printer
|
||||||
<literal>teak</literal>:</para>
|
<literal>teak</literal>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hprf - FORTRAN text filter for LaserJet 3si:
|
# hprf - FORTRAN text filter for LaserJet 3si:
|
||||||
# Installed in /usr/local/libexec/hprf
|
# Installed in /usr/local/libexec/hprf
|
||||||
|
|
@ -2053,8 +2028,7 @@ exit 2</programlisting>
|
||||||
<filename>/etc/printcap</filename> for the printer
|
<filename>/etc/printcap</filename> for the printer
|
||||||
<literal>teak</literal> to enable this filter:</para>
|
<literal>teak</literal> to enable this filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:rf=/usr/local/libexec/hprf:</programlisting>
|
||||||
:rf=/usr/local/libexec/hprf:</programlisting>
|
|
||||||
|
|
||||||
<para>Here is one final, somewhat complex example. We will add a
|
<para>Here is one final, somewhat complex example. We will add a
|
||||||
DVI filter to the LaserJet printer <literal>teak</literal>
|
DVI filter to the LaserJet printer <literal>teak</literal>
|
||||||
|
|
@ -2062,8 +2036,7 @@ exit 2</programlisting>
|
||||||
<filename>/etc/printcap</filename> with the location of the DVI
|
<filename>/etc/printcap</filename> with the location of the DVI
|
||||||
filter:</para>
|
filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>:df=/usr/local/libexec/hpdf:</programlisting>
|
||||||
:df=/usr/local/libexec/hpdf:</programlisting>
|
|
||||||
|
|
||||||
<para>Now, for the hard part: making the filter. For that, we need
|
<para>Now, for the hard part: making the filter. For that, we need
|
||||||
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
||||||
|
|
@ -2103,8 +2076,7 @@ exit 2</programlisting>
|
||||||
|
|
||||||
<para>Here, finally, is the filter:</para>
|
<para>Here, finally, is the filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpdf - Print DVI data on HP/PCL printer
|
# hpdf - Print DVI data on HP/PCL printer
|
||||||
# Installed in /usr/local/libexec/hpdf
|
# Installed in /usr/local/libexec/hpdf
|
||||||
|
|
@ -2347,8 +2319,7 @@ exit 0</programlisting>
|
||||||
Here is an example output filter for Hewlett Packard PCL-compatible
|
Here is an example output filter for Hewlett Packard PCL-compatible
|
||||||
printers:</para>
|
printers:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
||||||
# Installed in /usr/local/libexec/hpof
|
# Installed in /usr/local/libexec/hpof
|
||||||
|
|
@ -2365,8 +2336,7 @@ exec /usr/libexec/lpr/lpf</programlisting>
|
||||||
the printer <literal>teak</literal> that we introduced earlier; we
|
the printer <literal>teak</literal> that we introduced earlier; we
|
||||||
enabled header pages and added the above output filter:</para>
|
enabled header pages and added the above output filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -2398,8 +2368,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
user, host, and job. Here is an example (kelly printed the job
|
user, host, and job. Here is an example (kelly printed the job
|
||||||
named outline from host rose):</para>
|
named outline from host rose):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> k ll ll
|
||||||
k ll ll
|
|
||||||
k l l
|
k l l
|
||||||
k l l
|
k l l
|
||||||
k k eeee l l y y
|
k k eeee l l y y
|
||||||
|
|
@ -2457,8 +2426,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
<filename>/etc/printcap</filename> file. The header page will look
|
<filename>/etc/printcap</filename> file. The header page will look
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||||
rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
|
||||||
|
|
||||||
<para>Also by default, LPD prints the header page first, then the job.
|
<para>Also by default, LPD prints the header page first, then the job.
|
||||||
To reverse that, specify <literal>hl</literal> (header last) in
|
To reverse that, specify <literal>hl</literal> (header last) in
|
||||||
|
|
@ -2553,8 +2521,7 @@ rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||||
arguments (user login name, host name, and job name) and makes a
|
arguments (user login name, host name, and job name) and makes a
|
||||||
simple PostScript header page:</para>
|
simple PostScript header page:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# make-ps-header - make a PostScript header page on stdout
|
# make-ps-header - make a PostScript header page on stdout
|
||||||
# Installed in /usr/local/libexec/make-ps-header
|
# Installed in /usr/local/libexec/make-ps-header
|
||||||
|
|
@ -2639,8 +2606,7 @@ EOF</programlisting>
|
||||||
user's job. Here is the DVI conversion filter from earlier in this
|
user's job. Here is the DVI conversion filter from earlier in this
|
||||||
document, modified to make a header page:</para>
|
document, modified to make a header page:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# psdf - DVI to PostScript printer filter
|
# psdf - DVI to PostScript printer filter
|
||||||
# Installed in /usr/local/libexec/psdf
|
# Installed in /usr/local/libexec/psdf
|
||||||
|
|
@ -2832,8 +2798,7 @@ done
|
||||||
<literal>teak</literal>; we have added entries for the two printers
|
<literal>teak</literal>; we have added entries for the two printers
|
||||||
on the host rose:</para>
|
on the host rose:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid - added (remote) printers on rose
|
# /etc/printcap for host orchid - added (remote) printers on rose
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -2911,8 +2876,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
want to take advantage of that (to get printer status, perform
|
want to take advantage of that (to get printer status, perform
|
||||||
accounting, etc.).</para>
|
accounting, etc.).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/usr/bin/perl
|
||||||
#!/usr/bin/perl
|
|
||||||
#
|
#
|
||||||
# netprint - Text filter for printer attached to network
|
# netprint - Text filter for printer attached to network
|
||||||
# Installed in /usr/local/libexec/netprint
|
# Installed in /usr/local/libexec/netprint
|
||||||
|
|
@ -2942,8 +2906,7 @@ exit 0;</programlisting>
|
||||||
printer is scrivener. Here is the text filter for the
|
printer is scrivener. Here is the text filter for the
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
||||||
# on port 5100. Installed in /usr/local/libexec/diablo-if-net
|
# on port 5100. Installed in /usr/local/libexec/diablo-if-net
|
||||||
|
|
@ -2993,8 +2956,7 @@ exec /usr/libexec/lpr/lpf "$@" | /usr/local/libexec/netprint scrivener 5100</pro
|
||||||
disable multiple copies by adding the <literal>sc</literal>
|
disable multiple copies by adding the <literal>sc</literal>
|
||||||
capability:</para>
|
capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -3014,8 +2976,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
disable multiple copies for the printer
|
disable multiple copies for the printer
|
||||||
<literal>teak</literal>):</para>
|
<literal>teak</literal>):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid - no multiple copies for local
|
# /etc/printcap for host orchid - no multiple copies for local
|
||||||
# printer teak or remote printer bamboo
|
# printer teak or remote printer bamboo
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -3070,8 +3031,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
is the familiar <filename>/etc/printcap</filename> for host
|
is the familiar <filename>/etc/printcap</filename> for host
|
||||||
<hostid>rose</hostid>:</para>
|
<hostid>rose</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose - restricted group for bamboo
|
# /etc/printcap for host rose - restricted group for bamboo
|
||||||
#
|
#
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
|
|
@ -3131,8 +3091,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
to five megabytes. We will put no limit on the plain text line
|
to five megabytes. We will put no limit on the plain text line
|
||||||
printer:</para>
|
printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host rose
|
# /etc/printcap for host rose
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -3196,8 +3155,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
<filename>/etc/hosts.lpd</filename> file on the host
|
<filename>/etc/hosts.lpd</filename> file on the host
|
||||||
<hostid>rose</hostid>:</para>
|
<hostid>rose</hostid>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>orchid
|
||||||
orchid
|
|
||||||
violet
|
violet
|
||||||
madrigal.fishbaum.de</programlisting>
|
madrigal.fishbaum.de</programlisting>
|
||||||
|
|
||||||
|
|
@ -3232,8 +3190,7 @@ madrigal.fishbaum.de</programlisting>
|
||||||
directory for this printer; here is <hostid>bamboo</hostid>'s
|
directory for this printer; here is <hostid>bamboo</hostid>'s
|
||||||
entry:</para>
|
entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|
||||||
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
||||||
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
||||||
:if=/usr/local/libexec/psif:\
|
:if=/usr/local/libexec/psif:\
|
||||||
|
|
@ -3363,8 +3320,7 @@ boo/minfree</userinput></screen>
|
||||||
the printer, it then writes an accounting entry in the accounting
|
the printer, it then writes an accounting entry in the accounting
|
||||||
file. The entries look like this:</para>
|
file. The entries look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>2.00 rose:andy
|
||||||
2.00 rose:andy
|
|
||||||
3.00 rose:kelly
|
3.00 rose:kelly
|
||||||
3.00 orchid:mary
|
3.00 orchid:mary
|
||||||
5.00 orchid:mary
|
5.00 orchid:mary
|
||||||
|
|
@ -4332,8 +4288,7 @@ cfA013rose dequeued
|
||||||
<filename>/usr/local/libexec/if-simple</filename> prints a
|
<filename>/usr/local/libexec/if-simple</filename> prints a
|
||||||
form feed after it sends the job to the printer:</para>
|
form feed after it sends the job to the printer:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# if-simple - Simple text input filter for lpd
|
# if-simple - Simple text input filter for lpd
|
||||||
# Installed in /usr/local/libexec/if-simple
|
# Installed in /usr/local/libexec/if-simple
|
||||||
|
|
@ -4352,8 +4307,7 @@ exit 2</programlisting>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>You got the following on paper:</para>
|
<para>You got the following on paper:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>!"#$%&'()*+,-./01234
|
||||||
!"#$%&'()*+,-./01234
|
|
||||||
"#$%&'()*+,-./012345
|
"#$%&'()*+,-./012345
|
||||||
#$%&'()*+,-./0123456</programlisting>
|
#$%&'()*+,-./0123456</programlisting>
|
||||||
|
|
||||||
|
|
@ -4435,8 +4389,7 @@ exit 2</programlisting>
|
||||||
eject the last page of the job. It should work with
|
eject the last page of the job. It should work with
|
||||||
nearly all Hewlett Packard printers.</para>
|
nearly all Hewlett Packard printers.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
||||||
# Installed in /usr/local/libexec/hpif
|
# Installed in /usr/local/libexec/hpif
|
||||||
|
|
@ -4453,8 +4406,7 @@ exit 2</programlisting>
|
||||||
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
||||||
above script as its text filter:</para>
|
above script as its text filter:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# /etc/printcap for host orchid
|
# /etc/printcap for host orchid
|
||||||
#
|
#
|
||||||
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
|
|
@ -4575,8 +4527,7 @@ teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\
|
||||||
the entry for <literal>rattan</literal>, with the
|
the entry for <literal>rattan</literal>, with the
|
||||||
<literal>lf</literal> capability:</para>
|
<literal>lf</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
|
||||||
:sh:sd=/var/spool/lpd/rattan:\
|
:sh:sd=/var/spool/lpd/rattan:\
|
||||||
:lp=/dev/lpt0:\
|
:lp=/dev/lpt0:\
|
||||||
:if=/usr/local/libexec/if-simple:\
|
:if=/usr/local/libexec/if-simple:\
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/security/chapter.sgml,v 1.39 2000/12/08 09:20:24 alex Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/security/chapter.sgml,v 1.40 2001/01/16 13:32:01 jedgar Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="security">
|
<chapter id="security">
|
||||||
|
|
@ -1094,8 +1094,7 @@ Enter secret password: <userinput><secret password></userinput>
|
||||||
<para>Here is a sample configuration file which illustrates the
|
<para>Here is a sample configuration file which illustrates the
|
||||||
three most common sorts of configuration statements:</para>
|
three most common sorts of configuration statements:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>permit internet 192.168.0.0 255.255.0.0
|
||||||
permit internet 192.168.0.0 255.255.0.0
|
|
||||||
permit user fnord
|
permit user fnord
|
||||||
permit port ttyd0</programlisting>
|
permit port ttyd0</programlisting>
|
||||||
|
|
||||||
|
|
@ -2353,8 +2352,7 @@ FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995</screen>
|
||||||
<para>Please be aware that in order to use this functionality, you
|
<para>Please be aware that in order to use this functionality, you
|
||||||
must have the following options compiled into your kernel:</para>
|
must have the following options compiled into your kernel:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>options IPSEC #IP security
|
||||||
options IPSEC #IP security
|
|
||||||
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/serialcomms/chapter.sgml,v 1.21 2001/01/18 01:14:34 brian Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/serialcomms/chapter.sgml,v 1.22 2001/03/12 17:42:05 nik Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="serialcomms">
|
<chapter id="serialcomms">
|
||||||
|
|
@ -490,8 +490,7 @@
|
||||||
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
||||||
we add the new entry:</para>
|
we add the new entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||||
ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
|
||||||
ttyd5</programlisting>
|
ttyd5</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -528,8 +527,7 @@ ttyd5</programlisting>
|
||||||
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
||||||
the two terminals in which we are interested):</para>
|
the two terminals in which we are interested):</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||||
|
|
||||||
<para>Note that the second field—where we specify what program
|
<para>Note that the second field—where we specify what program
|
||||||
|
|
@ -566,8 +564,7 @@ ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||||
Here are the pertinent yet unfinished entries from the
|
Here are the pertinent yet unfinished entries from the
|
||||||
<filename>/etc/ttys</filename> file:</para>
|
<filename>/etc/ttys</filename> file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -586,8 +583,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||||
Here again is the <filename>/etc/ttys</filename> file. We have
|
Here again is the <filename>/etc/ttys</filename> file. We have
|
||||||
turned each port <literal>on</literal>.</para>
|
turned each port <literal>on</literal>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -635,8 +631,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||||
<filename>/etc/ttys</filename> file, with comments added to describe
|
<filename>/etc/ttys</filename> file, with comments added to describe
|
||||||
where the terminals are:</para>
|
where the terminals are:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
|
||||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1054,8 +1049,7 @@ sio3: type 16550A</screen>
|
||||||
the name of your system, but in upper-case letters. Edit the file,
|
the name of your system, but in upper-case letters. Edit the file,
|
||||||
and change the device lines:</para>
|
and change the device lines:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
|
||||||
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
|
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
|
||||||
device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
||||||
device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr</programlisting>
|
device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr</programlisting>
|
||||||
|
|
@ -1235,8 +1229,7 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
|
||||||
<filename>gettytab</filename> file, so you do not need to add it
|
<filename>gettytab</filename> file, so you do not need to add it
|
||||||
unless it is missing under your version of FreeBSD:</para>
|
unless it is missing under your version of FreeBSD:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
||||||
#
|
#
|
||||||
D2400|d2400|Fast-Dial-2400:\
|
D2400|d2400|Fast-Dial-2400:\
|
||||||
|
|
@ -1251,8 +1244,7 @@ D2400|d2400|Fast-Dial-2400:\
|
||||||
entry you could use for a 14.4 Kbps modem with a top interface
|
entry you could use for a 14.4 Kbps modem with a top interface
|
||||||
speed of 19.2 Kbps:</para>
|
speed of 19.2 Kbps:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Additions for a V.32bis Modem
|
# Additions for a V.32bis Modem
|
||||||
#
|
#
|
||||||
um|V300|High Speed Modem at 300,8-bit:\
|
um|V300|High Speed Modem at 300,8-bit:\
|
||||||
|
|
@ -1287,8 +1279,7 @@ uq|V19200|High Speed Modem at 19200,8-bit:\
|
||||||
higher communications rate than 19.2 Kbps. Here is an example of
|
higher communications rate than 19.2 Kbps. Here is an example of
|
||||||
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#
|
||||||
#
|
|
||||||
# Additions for a V.32bis or V.34 Modem
|
# Additions for a V.32bis or V.34 Modem
|
||||||
# Starting at 57.6 Kbps
|
# Starting at 57.6 Kbps
|
||||||
#
|
#
|
||||||
|
|
@ -1327,8 +1318,7 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
|
||||||
line will be the same, whether you are using a locked-speed or
|
line will be the same, whether you are using a locked-speed or
|
||||||
matching-speed configuration:</para>
|
matching-speed configuration:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
|
||||||
|
|
||||||
<para>The first item in the above line is the device special file for
|
<para>The first item in the above line is the device special file for
|
||||||
this entry — <literal>ttyd0</literal> means
|
this entry — <literal>ttyd0</literal> means
|
||||||
|
|
@ -1377,8 +1367,7 @@ ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||||
speed is locked at 19.2 Kbps, the <filename>ttys</filename> entry
|
speed is locked at 19.2 Kbps, the <filename>ttys</filename> entry
|
||||||
might look like this:</para>
|
might look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
|
||||||
|
|
||||||
<para>If your modem is locked at a different data rate, substitute
|
<para>If your modem is locked at a different data rate, substitute
|
||||||
the appropriate name for the
|
the appropriate name for the
|
||||||
|
|
@ -1400,8 +1389,7 @@ ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||||
<literal>V19200</literal> starting point), your
|
<literal>V19200</literal> starting point), your
|
||||||
<filename>ttys</filename> entry might look like this:</para>
|
<filename>ttys</filename> entry might look like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||||
ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
|
||||||
</sect4>
|
</sect4>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1420,8 +1408,7 @@ ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||||
<para>For example, on a sample FreeBSD 1.1.5.1 system,
|
<para>For example, on a sample FreeBSD 1.1.5.1 system,
|
||||||
<filename>/etc/rc.serial</filename> reads:</para>
|
<filename>/etc/rc.serial</filename> reads:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#!/bin/sh
|
||||||
#!/bin/sh
|
|
||||||
#
|
#
|
||||||
# Serial port initial configuration
|
# Serial port initial configuration
|
||||||
|
|
||||||
|
|
@ -1437,8 +1424,7 @@ stty -f /dev/cuai01 crtscts</programlisting>
|
||||||
<filename>/etc/rc.local</filename> to set the
|
<filename>/etc/rc.local</filename> to set the
|
||||||
<literal>crtscts</literal> flag on the devices:</para>
|
<literal>crtscts</literal> flag on the devices:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># Set serial ports to use RTS/CTS flow control
|
||||||
# Set serial ports to use RTS/CTS flow control
|
|
||||||
stty -f /dev/ttyd0 crtscts
|
stty -f /dev/ttyd0 crtscts
|
||||||
stty -f /dev/ttyd1 crtscts
|
stty -f /dev/ttyd1 crtscts
|
||||||
stty -f /dev/ttyd2 crtscts
|
stty -f /dev/ttyd2 crtscts
|
||||||
|
|
@ -1498,8 +1484,7 @@ stty -f /dev/ttyd3 crtscts</programlisting>
|
||||||
Sportster 14,400 external modem, one could give these commands to
|
Sportster 14,400 external modem, one could give these commands to
|
||||||
the modem:</para>
|
the modem:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&C1&D2&H1&I0&R2&W</programlisting>
|
AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||||
|
|
||||||
<para>You might also want to take this opportunity to adjust other
|
<para>You might also want to take this opportunity to adjust other
|
||||||
|
|
@ -1561,8 +1546,7 @@ AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||||
modem, these commands will lock the modem-to-computer data rate at
|
modem, these commands will lock the modem-to-computer data rate at
|
||||||
the speed used to issue the commands:</para>
|
the speed used to issue the commands:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&B1&W</programlisting>
|
AT&B1&W</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1576,8 +1560,7 @@ AT&B1&W</programlisting>
|
||||||
issue the commands, but allow the serial port rate to vary for
|
issue the commands, but allow the serial port rate to vary for
|
||||||
non-error-corrected connections:</para>
|
non-error-corrected connections:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>ATZ
|
||||||
ATZ
|
|
||||||
AT&B2&W</programlisting>
|
AT&B2&W</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
|
@ -1793,8 +1776,7 @@ AT&B2&W</programlisting>
|
||||||
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
||||||
then put in the following line:</para>
|
then put in the following line:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||||
cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
|
||||||
|
|
||||||
<para>Use the highest bps rate your modem supports in the br capability.
|
<para>Use the highest bps rate your modem supports in the br capability.
|
||||||
Then, type <command>tip cuaa0</command> and you will be connected to
|
Then, type <command>tip cuaa0</command> and you will be connected to
|
||||||
|
|
@ -1827,8 +1809,7 @@ cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||||
capability files like <filename>/etc/remote</filename>. Escape it
|
capability files like <filename>/etc/remote</filename>. Escape it
|
||||||
with a backslash:</para>
|
with a backslash:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pn=\@</programlisting>
|
||||||
pn=\@</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1837,8 +1818,7 @@ pn=\@</programlisting>
|
||||||
<para>Put what is called a <quote>generic</quote> entry in your
|
<para>Put what is called a <quote>generic</quote> entry in your
|
||||||
<filename>/etc/remote</filename> file. For example:</para>
|
<filename>/etc/remote</filename> file. For example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>tip115200|Dial any phone number at 115200 bps:\
|
||||||
tip115200|Dial any phone number at 115200 bps:\
|
|
||||||
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
||||||
tip57600|Dial any phone number at 57600 bps:\
|
tip57600|Dial any phone number at 57600 bps:\
|
||||||
:dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:</programlisting>
|
:dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||||
|
|
@ -1850,8 +1830,7 @@ tip57600|Dial any phone number at 57600 bps:\
|
||||||
<para>If you prefer <command>cu</command> over <command>tip</command>,
|
<para>If you prefer <command>cu</command> over <command>tip</command>,
|
||||||
use a generic cu entry:</para>
|
use a generic cu entry:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
|
||||||
cu115200|Use cu to dial any number at 115200bps:\
|
|
||||||
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||||
|
|
||||||
<para>and type:</para>
|
<para>and type:</para>
|
||||||
|
|
@ -1878,8 +1857,7 @@ cu115200|Use cu to dial any number at 115200bps:\
|
||||||
<literal>cm</literal> capability. For example, these entries in
|
<literal>cm</literal> capability. For example, these entries in
|
||||||
<filename>/etc/remote</filename>:</para>
|
<filename>/etc/remote</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>pain|pain.deep13.com|Forrester's machine:\
|
||||||
pain|pain.deep13.com|Forrester's machine:\
|
|
||||||
:cm=CONNECT pain\n:tc=deep13:
|
:cm=CONNECT pain\n:tc=deep13:
|
||||||
muffin|muffin.deep13.com|Frank's machine:\
|
muffin|muffin.deep13.com|Frank's machine:\
|
||||||
:cm=CONNECT muffin\n:tc=deep13:
|
:cm=CONNECT muffin\n:tc=deep13:
|
||||||
|
|
@ -1901,8 +1879,7 @@ deep13:Gizmonics Institute terminal server:\
|
||||||
<filename>/etc/remote</filename> and use <literal>@</literal> for the
|
<filename>/etc/remote</filename> and use <literal>@</literal> for the
|
||||||
<literal>pn</literal> capability:</para>
|
<literal>pn</literal> capability:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>big-university:\
|
||||||
big-university:\
|
|
||||||
:pn=\@:tc=dialout
|
:pn=\@:tc=dialout
|
||||||
dialout:\
|
dialout:\
|
||||||
:dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:</programlisting>
|
:dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:</programlisting>
|
||||||
|
|
@ -1910,8 +1887,7 @@ dialout:\
|
||||||
<para>Then, list the phone numbers for the university in
|
<para>Then, list the phone numbers for the university in
|
||||||
<filename>/etc/phones</filename>:</para>
|
<filename>/etc/phones</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>big-university 5551111
|
||||||
big-university 5551111
|
|
||||||
big-university 5551112
|
big-university 5551112
|
||||||
big-university 5551113
|
big-university 5551113
|
||||||
big-university 5551114</programlisting>
|
big-university 5551114</programlisting>
|
||||||
|
|
@ -1944,8 +1920,7 @@ big-university 5551114</programlisting>
|
||||||
specifying the following in your <filename>$HOME/.tiprc</filename>
|
specifying the following in your <filename>$HOME/.tiprc</filename>
|
||||||
file:</para>
|
file:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>force=<single-char></programlisting>
|
||||||
force=<single-char></programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -1961,8 +1936,7 @@ force=<single-char></programlisting>
|
||||||
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
||||||
type CTRL+2 and CTRL+A a lot:</para>
|
type CTRL+2 and CTRL+A a lot:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>force=^^
|
||||||
force=^^
|
|
||||||
raisechar=^^</programlisting>
|
raisechar=^^</programlisting>
|
||||||
|
|
||||||
<para>The ^^ is SHIFT+CTRL+6.</para>
|
<para>The ^^ is SHIFT+CTRL+6.</para>
|
||||||
|
|
@ -2184,8 +2158,7 @@ raisechar=^^</programlisting>
|
||||||
|
|
||||||
<para>Example:</para>
|
<para>Example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||||
device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
|
||||||
|
|
||||||
<para>See &man.sio.4; for more details.</para>
|
<para>See &man.sio.4; for more details.</para>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.3 2000/12/03 02:36:39 kuriyama Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/sound/chapter.sgml,v 1.4 2000/12/06 21:27:12 dannyboy Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sound">
|
<chapter id="sound">
|
||||||
|
|
@ -101,8 +101,7 @@
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. Those are the default settings. You may
|
<para>to your kernel. Those are the default settings. You may
|
||||||
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
need to change the IRQ, etc. See the &man.sbc.4; man page for
|
||||||
|
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||||
|
|
||||||
<para>and</para>
|
<para>and</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel. You may need to change the IRQ, etc. See
|
<para>to your kernel. You may need to change the IRQ, etc. See
|
||||||
the &man.gusc.4; man page for more information.</para>
|
the &man.gusc.4; man page for more information.</para>
|
||||||
|
|
@ -166,8 +164,7 @@ device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||||
sound card that does not have a bridge driver, you will need
|
sound card that does not have a bridge driver, you will need
|
||||||
to add</para>
|
to add</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
|
||||||
|
|
||||||
<para>to your kernel configuration. You may need to change the
|
<para>to your kernel configuration. You may need to change the
|
||||||
IRQ, etc., to match your hardware configuration.</para>
|
IRQ, etc., to match your hardware configuration.</para>
|
||||||
|
|
@ -190,8 +187,7 @@ device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||||
/dev/sndstat</command>. You should see output similar to the
|
/dev/sndstat</command>. You should see output similar to the
|
||||||
following:</para>
|
following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
|
||||||
Installed devices:
|
Installed devices:
|
||||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.140 2001/02/24 10:53:53 kris Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.141 2001/03/24 21:45:57 asami Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||||
|
|
@ -92,8 +92,7 @@
|
||||||
<para>The minimal <filename>Makefile</filename> would look something
|
<para>The minimal <filename>Makefile</filename> would look something
|
||||||
like this:</para>
|
like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># New ports collection makefile for: oneko
|
||||||
# New ports collection makefile for: oneko
|
|
||||||
# Date created: 5 December 1994
|
# Date created: 5 December 1994
|
||||||
# Whom: asami
|
# Whom: asami
|
||||||
#
|
#
|
||||||
|
|
@ -140,8 +139,7 @@ USE_IMAKE= yes
|
||||||
should begin with a capital, and end without a period. Here
|
should begin with a capital, and end without a period. Here
|
||||||
is an example:</para>
|
is an example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>A cat chasing a mouse all over the screen</programlisting>
|
||||||
A cat chasing a mouse all over the screen</programlisting>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
@ -167,8 +165,7 @@ A cat chasing a mouse all over the screen</programlisting>
|
||||||
<para>It is recommended that you sign your name at the end of this
|
<para>It is recommended that you sign your name at the end of this
|
||||||
file, as in:</para>
|
file, as in:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>This is a port of oneko, in which a cat chases a poor mouse all over
|
||||||
This is a port of oneko, in which a cat chases a poor mouse all over
|
|
||||||
the screen.
|
the screen.
|
||||||
:
|
:
|
||||||
(etc.)
|
(etc.)
|
||||||
|
|
@ -193,8 +190,7 @@ asami@cs.berkeley.edu</programlisting>
|
||||||
|
|
||||||
<para>Here is a small example:</para>
|
<para>Here is a small example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>bin/oneko
|
||||||
bin/oneko
|
|
||||||
lib/X11/app-defaults/Oneko
|
lib/X11/app-defaults/Oneko
|
||||||
lib/X11/oneko/cat1.xpm
|
lib/X11/oneko/cat1.xpm
|
||||||
lib/X11/oneko/cat2.xpm
|
lib/X11/oneko/cat2.xpm
|
||||||
|
|
@ -836,8 +832,7 @@ lib/X11/oneko/mouse.xpm
|
||||||
<para>The gtkmumble port, version 0.10, is committed to the
|
<para>The gtkmumble port, version 0.10, is committed to the
|
||||||
ports collection.</para>
|
ports collection.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.10</programlisting>
|
PORTVERSION= 0.10</programlisting>
|
||||||
|
|
||||||
<para><makevar>PKGNAME</makevar> becomes
|
<para><makevar>PKGNAME</makevar> becomes
|
||||||
|
|
@ -847,8 +842,7 @@ PORTVERSION= 0.10</programlisting>
|
||||||
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
||||||
accordingly.</para>
|
accordingly.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSIOn= 0.10
|
PORTVERSIOn= 0.10
|
||||||
PORTREVISION= 1</programlisting>
|
PORTREVISION= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -868,8 +862,7 @@ PORTREVISION= 1</programlisting>
|
||||||
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
||||||
from the makefile).</para>
|
from the makefile).</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.2
|
PORTVERSION= 0.2
|
||||||
PORTEPOCH= 1</programlisting>
|
PORTEPOCH= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -880,8 +873,7 @@ PORTEPOCH= 1</programlisting>
|
||||||
<makevar>PORTEPOCH</makevar> never decreases, the version
|
<makevar>PORTEPOCH</makevar> never decreases, the version
|
||||||
variables are now:</para>
|
variables are now:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= gtkmumble
|
||||||
PORTNAME= gtkmumble
|
|
||||||
PORTVERSION= 0.3
|
PORTVERSION= 0.3
|
||||||
PORTEPOCH= 1</programlisting>
|
PORTEPOCH= 1</programlisting>
|
||||||
|
|
||||||
|
|
@ -1006,8 +998,7 @@ PORTEPOCH= 1</programlisting>
|
||||||
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
||||||
archive. Here is an example:</para>
|
archive. Here is an example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
|
||||||
MASTER_SITE_SUBDIR= applications</programlisting>
|
MASTER_SITE_SUBDIR= applications</programlisting>
|
||||||
|
|
||||||
<para>These variables are defined in
|
<para>These variables are defined in
|
||||||
|
|
@ -1136,8 +1127,7 @@ MASTER_SITE_SUBDIR= applications</programlisting>
|
||||||
|
|
||||||
<para>For example,</para>
|
<para>For example,</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||||
RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
|
||||||
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
||||||
|
|
||||||
<para>will check if the file or directory
|
<para>will check if the file or directory
|
||||||
|
|
@ -1260,8 +1250,7 @@ RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||||
compilation time by specifying the target too. For
|
compilation time by specifying the target too. For
|
||||||
instance
|
instance
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||||
BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
|
||||||
|
|
||||||
will always descend to the JPEG port and extract it.</para>
|
will always descend to the JPEG port and extract it.</para>
|
||||||
|
|
||||||
|
|
@ -1353,8 +1342,7 @@ BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlistin
|
||||||
you could use the following in your
|
you could use the following in your
|
||||||
<filename>Makefile</filename>:</para>
|
<filename>Makefile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>INSTALLS_SHLIB= yes
|
||||||
INSTALLS_SHLIB= yes
|
|
||||||
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||||
|
|
||||||
<para>Note that content of <makevar>LDCONFIG_DIRS</makevar> is passed
|
<para>Note that content of <makevar>LDCONFIG_DIRS</makevar> is passed
|
||||||
|
|
@ -1432,8 +1420,7 @@ LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||||
<para>The variable is set using this line in
|
<para>The variable is set using this line in
|
||||||
<filename>bsd.port.mk</filename>:</para>
|
<filename>bsd.port.mk</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
||||||
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
|
||||||
|
|
||||||
<para>Ports' make processes should use this variable to decide what to
|
<para>Ports' make processes should use this variable to decide what to
|
||||||
do. However, if the port's <filename>configure</filename> script
|
do. However, if the port's <filename>configure</filename> script
|
||||||
|
|
@ -1524,13 +1511,11 @@ PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</p
|
||||||
<para>The <literal>ldconfig</literal> line in Makefiles should
|
<para>The <literal>ldconfig</literal> line in Makefiles should
|
||||||
read:</para>
|
read:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||||
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
|
||||||
|
|
||||||
<para>In <filename>pkg-plist</filename> it should read;</para>
|
<para>In <filename>pkg-plist</filename> it should read;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||||
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
|
||||||
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
||||||
|
|
||||||
<para>This is to ensure that the correct <command>ldconfig</command>
|
<para>This is to ensure that the correct <command>ldconfig</command>
|
||||||
|
|
@ -1559,8 +1544,7 @@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||||
<para>This will be best demonstrated by an example. This is part of
|
<para>This will be best demonstrated by an example. This is part of
|
||||||
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>PORTNAME= xdvi
|
||||||
PORTNAME= xdvi
|
|
||||||
PORTVERSION= 17
|
PORTVERSION= 17
|
||||||
PKGNAMEPREFIX= ja-
|
PKGNAMEPREFIX= ja-
|
||||||
PKGNAMESUFFIX= ${RESOLUTION}
|
PKGNAMESUFFIX= ${RESOLUTION}
|
||||||
|
|
@ -1582,8 +1566,7 @@ RESOLUTION?= 300
|
||||||
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
||||||
<filename>xdvi118/Makefile</filename>:</para>
|
<filename>xdvi118/Makefile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>RESOLUTION= 118
|
||||||
RESOLUTION= 118
|
|
||||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
MASTERDIR= ${.CURDIR}/../xdvi300
|
||||||
|
|
||||||
.include ${MASTERDIR}/Makefile</programlisting>
|
.include ${MASTERDIR}/Makefile</programlisting>
|
||||||
|
|
@ -1688,8 +1671,7 @@ MASTERDIR= ${.CURDIR}/../xdvi300
|
||||||
|
|
||||||
<para>Here is an example that puts it all together.</para>
|
<para>Here is an example that puts it all together.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>MAN1= foo.1
|
||||||
MAN1= foo.1
|
|
||||||
MAN3= bar.3
|
MAN3= bar.3
|
||||||
MAN4= baz.4
|
MAN4= baz.4
|
||||||
MLINKS= foo.1 alt-name.8
|
MLINKS= foo.1 alt-name.8
|
||||||
|
|
@ -1699,8 +1681,7 @@ MANCOMPRESSED= yes</programlisting>
|
||||||
|
|
||||||
<para>This states that six files are installed by this port;</para>
|
<para>This states that six files are installed by this port;</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>${PREFIX}/man/man1/foo.1.gz
|
||||||
${PREFIX}/man/man1/foo.1.gz
|
|
||||||
${PREFIX}/man/ja/man1/foo.1.gz
|
${PREFIX}/man/ja/man1/foo.1.gz
|
||||||
${PREFIX}/share/foobar/man/man3/bar.3.gz
|
${PREFIX}/share/foobar/man/man3/bar.3.gz
|
||||||
${PREFIX}/share/foobar/man/ja/man3/bar.3.gz
|
${PREFIX}/share/foobar/man/ja/man3/bar.3.gz
|
||||||
|
|
@ -1825,8 +1806,7 @@ Options:
|
||||||
statements to files that do not have them. This is part of my
|
statements to files that do not have them. This is part of my
|
||||||
patch:</para>
|
patch:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||||
--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
|
||||||
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
||||||
@@ -2,6 +2,10 @@
|
@@ -2,6 +2,10 @@
|
||||||
|
|
||||||
|
|
@ -1884,8 +1864,7 @@ Options:
|
||||||
<filename>man</filename> subdirectory to rebuild the info
|
<filename>man</filename> subdirectory to rebuild the info
|
||||||
pages.</para>
|
pages.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
|
||||||
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
||||||
@@ -184,7 +184,7 @@
|
@@ -184,7 +184,7 @@
|
||||||
# Subdirectories to make recursively. `lisp' is not included
|
# Subdirectories to make recursively. `lisp' is not included
|
||||||
|
|
@ -1925,8 +1904,7 @@ Options:
|
||||||
otherwise mucking around with the <filename>dir</filename>
|
otherwise mucking around with the <filename>dir</filename>
|
||||||
file.</para>
|
file.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
|
||||||
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
||||||
@@ -368,14 +368,8 @@
|
@@ -368,14 +368,8 @@
|
||||||
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
||||||
|
|
@ -1953,8 +1931,7 @@ Options:
|
||||||
They may be in <filename>pkg-install</filename> or some other
|
They may be in <filename>pkg-install</filename> or some other
|
||||||
file, so search extensively.</para>
|
file, so search extensively.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: pkg-plist
|
||||||
Index: pkg-plist
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||||
retrieving revision 1.15
|
retrieving revision 1.15
|
||||||
|
|
@ -1982,8 +1959,7 @@ diff -u -r1.15 pkg-plist
|
||||||
<command>install-info</command> automatically creates this
|
<command>install-info</command> automatically creates this
|
||||||
file if it does not exist.)</para>
|
file if it does not exist.)</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: Makefile
|
||||||
Index: Makefile
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
||||||
retrieving revision 1.26
|
retrieving revision 1.26
|
||||||
|
|
@ -2008,8 +1984,7 @@ diff -u -r1.26 Makefile
|
||||||
<literal>@unexec</literal> for
|
<literal>@unexec</literal> for
|
||||||
<command>pkg_delete</command>.</para>
|
<command>pkg_delete</command>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>Index: pkg-plist
|
||||||
Index: pkg-plist
|
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||||
retrieving revision 1.15
|
retrieving revision 1.15
|
||||||
|
|
@ -2139,8 +2114,7 @@ diff -u -r1.15 pkg-plist
|
||||||
<para>For instance, if you have a port that installs many files in a
|
<para>For instance, if you have a port that installs many files in a
|
||||||
version-specific subdirectory, you can put something like
|
version-specific subdirectory, you can put something like
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>OCTAVE_VERSION= 2.0.13
|
||||||
OCTAVE_VERSION= 2.0.13
|
|
||||||
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||||
|
|
||||||
in the <filename>Makefile</filename> and use
|
in the <filename>Makefile</filename> and use
|
||||||
|
|
@ -2351,8 +2325,7 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||||
<literal>post-install</literal> rule to to it yourself. Here is an
|
<literal>post-install</literal> rule to to it yourself. Here is an
|
||||||
example:</para>
|
example:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>post-install:
|
||||||
post-install:
|
|
||||||
strip ${PREFIX}/bin/xdl</programlisting>
|
strip ${PREFIX}/bin/xdl</programlisting>
|
||||||
|
|
||||||
<para>Use the &man.file.1; command on the installed executable to
|
<para>Use the &man.file.1; command on the installed executable to
|
||||||
|
|
@ -2440,8 +2413,7 @@ post-install:
|
||||||
defined in <filename><sys/param.h></filename>. Hopefully that
|
defined in <filename><sys/param.h></filename>. Hopefully that
|
||||||
file is already included; if not, add the code:</para>
|
file is already included; if not, add the code:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif</programlisting>
|
#endif</programlisting>
|
||||||
|
|
||||||
|
|
@ -2454,8 +2426,7 @@ post-install:
|
||||||
<para>Another way is to use the GNU Autoconf style of doing
|
<para>Another way is to use the GNU Autoconf style of doing
|
||||||
this:</para>
|
this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#ifdef HAVE_SYS_PARAM_H
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif</programlisting>
|
#endif</programlisting>
|
||||||
|
|
||||||
|
|
@ -2466,8 +2437,7 @@ post-install:
|
||||||
<para>Once you have <filename>sys/param.h</filename> included, you may
|
<para>Once you have <filename>sys/param.h</filename> included, you may
|
||||||
use:</para>
|
use:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||||
#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
|
||||||
|
|
||||||
<para>to detect if the code is being compiled on a 4.3 Net2 code base
|
<para>to detect if the code is being compiled on a 4.3 Net2 code base
|
||||||
or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386
|
or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386
|
||||||
|
|
@ -2475,8 +2445,7 @@ post-install:
|
||||||
|
|
||||||
<para>Use:</para>
|
<para>Use:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||||
#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
|
||||||
|
|
||||||
<para>to detect if the code is being compiled on a 4.4 code base or
|
<para>to detect if the code is being compiled on a 4.4 code base or
|
||||||
newer (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or
|
newer (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or
|
||||||
|
|
@ -2519,8 +2488,7 @@ post-install:
|
||||||
system. If you need more granularity in detecting FreeBSD
|
system. If you need more granularity in detecting FreeBSD
|
||||||
systems since 2.0-RELEASE you can use the following:</para>
|
systems since 2.0-RELEASE you can use the following:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>#if __FreeBSD__ >= 2
|
||||||
#if __FreeBSD__ >= 2
|
|
||||||
#include <osreldate.h>
|
#include <osreldate.h>
|
||||||
# if __FreeBSD_version >= 199504
|
# if __FreeBSD_version >= 199504
|
||||||
/* 2.0.5+ release specific code here */
|
/* 2.0.5+ release specific code here */
|
||||||
|
|
@ -3156,8 +3124,7 @@ post-install:
|
||||||
<para>Here are some examples of things you can write after
|
<para>Here are some examples of things you can write after
|
||||||
<filename>bsd.port.pre.mk</filename>:</para>
|
<filename>bsd.port.pre.mk</filename>:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting># no need to compile lang/perl5 if perl5 is already in system
|
||||||
# no need to compile lang/perl5 if perl5 is already in system
|
|
||||||
.if ${OSVERSION} > 300003
|
.if ${OSVERSION} > 300003
|
||||||
BROKEN= perl is in system
|
BROKEN= perl is in system
|
||||||
.endif
|
.endif
|
||||||
|
|
@ -3196,8 +3163,7 @@ post-install:
|
||||||
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
||||||
<filename>/etc/make.conf</filename>, like this:</para>
|
<filename>/etc/make.conf</filename>, like this:</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>post-install:
|
||||||
post-install:
|
|
||||||
.if !defined(NOPORTDOCS)
|
.if !defined(NOPORTDOCS)
|
||||||
${MKDIR} ${PREFIX}/share/doc/xv
|
${MKDIR} ${PREFIX}/share/doc/xv
|
||||||
${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
|
${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
|
||||||
|
|
@ -3349,13 +3315,11 @@ post-install:
|
||||||
your port requires a macro <literal>PAGER</literal> to be the full
|
your port requires a macro <literal>PAGER</literal> to be the full
|
||||||
pathname of <command>less</command>, use the compiler flag:
|
pathname of <command>less</command>, use the compiler flag:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||||
-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||||
-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
|
||||||
|
|
||||||
if this is an X port, instead of
|
if this is an X port, instead of
|
||||||
<literal>-DPAGER=\"/usr/local/bin/less\".</literal> This way it will
|
<literal>-DPAGER=\"/usr/local/bin/less\".</literal> This way it will
|
||||||
|
|
@ -3395,8 +3359,7 @@ post-install:
|
||||||
specifically created by the port. You need to delete subdirectories
|
specifically created by the port. You need to delete subdirectories
|
||||||
before you can delete parent directories.</para>
|
before you can delete parent directories.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting> :
|
||||||
:
|
|
||||||
lib/X11/oneko/pixmaps/cat.xpm
|
lib/X11/oneko/pixmaps/cat.xpm
|
||||||
lib/X11/oneko/sounds/cat.au
|
lib/X11/oneko/sounds/cat.au
|
||||||
:
|
:
|
||||||
|
|
@ -3409,8 +3372,7 @@ lib/X11/oneko/sounds/cat.au
|
||||||
can call <command>rmdir</command> from <literal>@unexec</literal> to
|
can call <command>rmdir</command> from <literal>@unexec</literal> to
|
||||||
remove only empty directories without warning.</para>
|
remove only empty directories without warning.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||||
@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
|
||||||
|
|
||||||
<para>This will neither print any error messages nor cause
|
<para>This will neither print any error messages nor cause
|
||||||
<command>pkg_delete</command> to exit abnormally even if
|
<command>pkg_delete</command> to exit abnormally even if
|
||||||
|
|
@ -3435,8 +3397,7 @@ lib/X11/oneko/sounds/cat.au
|
||||||
other ports. This is the current list of UIDs between 50 and
|
other ports. This is the current list of UIDs between 50 and
|
||||||
99.</para>
|
99.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||||
majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
|
||||||
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
||||||
gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh
|
gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh
|
||||||
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
|
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
|
||||||
|
|
@ -3588,8 +3549,7 @@ vpopmail:*:89:89::0:0:User &:/usr/local/vpopmail:/nonexistent</programlisting>
|
||||||
linkend="porting-portlint">portlint</link> to check the
|
linkend="porting-portlint">portlint</link> to check the
|
||||||
<filename>Makefile</filename>.</para>
|
<filename>Makefile</filename>.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>[the header...just to make it easier for us to identify the ports.]
|
||||||
[the header...just to make it easier for us to identify the ports.]
|
|
||||||
# New ports collection makefile for: xdvi
|
# New ports collection makefile for: xdvi
|
||||||
[the "version required" line is only needed when the PORTVERSION
|
[the "version required" line is only needed when the PORTVERSION
|
||||||
variable is not specific enough to describe the port.]
|
variable is not specific enough to describe the port.]
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/ppp-primer/book.sgml,v 1.6 2001/01/17 07:22:10 brian Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/ppp-primer/book.sgml,v 1.7 2001/04/05 01:44:24 dd Exp $</pubdate>
|
||||||
|
|
||||||
<abstract><para>This is a step-by-step guide for configuring FreeBSD systems to act as
|
<abstract><para>This is a step-by-step guide for configuring FreeBSD systems to act as
|
||||||
a dial-up router/gateway in a Local Area Environment. All entries may
|
a dial-up router/gateway in a Local Area Environment. All entries may
|
||||||
|
|
@ -786,8 +786,7 @@ dial-out Internet gateway for our example LAN:
|
||||||
<emphasis>must</emphasis> be indented!</para>
|
<emphasis>must</emphasis> be indented!</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>################################################################
|
||||||
################################################################
|
|
||||||
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
||||||
#
|
#
|
||||||
# Default settings; These are always executed always when PPP
|
# Default settings; These are always executed always when PPP
|
||||||
|
|
@ -836,8 +835,7 @@ demand:
|
||||||
set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0
|
set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0
|
||||||
add 0 0 127.2.2.2
|
add 0 0 127.2.2.2
|
||||||
################################################################
|
################################################################
|
||||||
# End of /etc/ppp/ppp.conf
|
# End of /etc/ppp/ppp.conf</programlisting>
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
This file, taken verbatim from a working system, has three relevant
|
This file, taken verbatim from a working system, has three relevant
|
||||||
configuration sections:</para>
|
configuration sections:</para>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue