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
en_US.ISO8859-1
articles
books
arch-handbook
developers-handbook
driverbasics
kerneldebug
pci
policies
scsi
secure
tools
faq
fdp-primer
handbook
advanced-networking
backups
contrib
cutting-edge
disks
eresources
hw
install
kernelconfig
kerneldebug
kernelopts
l10n
linuxemu
mail
mirrors
multimedia
pgpkeys
policies
ppp-and-slip
printing
security
serialcomms
sound
porters-handbook
ppp-primer
en_US.ISO_8859-1
articles
books
developers-handbook
faq
fdp-primer
handbook
advanced-networking
backups
contrib
cutting-edge
disks
eresources
hw
install
internals
kernelconfig
kerneldebug
kernelopts
l10n
linuxemu
mail
mirrors
pgpkeys
policies
ppp-and-slip
printing
security
serialcomms
sound
porters-handbook
ppp-primer
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -592,8 +592,7 @@
|
|||
wish to protect, replacing the text between the <literal>%%</literal>
|
||||
with the appropriate information.</para>
|
||||
|
||||
<programlisting>
|
||||
Copyright (c) %%proper_years_here%%
|
||||
<programlisting>Copyright (c) %%proper_years_here%%
|
||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||
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 -->
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
||||
|
@ -230,8 +230,7 @@
|
|||
your locale):</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).
|
||||
</programlisting>
|
||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<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 -->
|
||||
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||
|
@ -899,8 +899,7 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls
|
||||
</programlisting>
|
||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<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 -->
|
||||
|
||||
<!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>
|
||||
|
||||
<programlisting>foo: foo.c
|
||||
cc -o foo foo.c
|
||||
</programlisting>
|
||||
cc -o foo foo.c</programlisting>
|
||||
|
||||
<para>It consists of two lines, a dependency line and a creation
|
||||
line.</para>
|
||||
|
@ -1114,8 +1113,7 @@ free(foo);
|
|||
cc -o foo foo.c
|
||||
|
||||
install:
|
||||
cp foo /home/me
|
||||
</programlisting>
|
||||
cp foo /home/me</programlisting>
|
||||
|
||||
<para>We can tell make which target we want to make by
|
||||
typing:</para>
|
||||
|
@ -1168,8 +1166,7 @@ install:
|
|||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||
|
||||
.include <bsd.port.mk>
|
||||
</programlisting>
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
||||
<para>Now, if we go to the directory for this port and type
|
||||
<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
|
||||
for it. This involves adding a line like</para>
|
||||
|
||||
<programlisting> * Make: (make). The GNU Make utility.
|
||||
</programlisting>
|
||||
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||
|
||||
<para>to the file. Once you have done this, you can type
|
||||
<userinput>info</userinput> and then select
|
||||
|
@ -1390,8 +1386,7 @@ main() {
|
|||
int bazz(int anint) {
|
||||
printf("You gave me %d\n", anint);
|
||||
return anint;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This program sets <symbol>i</symbol> to be
|
||||
<literal>5</literal> and passes it to a function
|
||||
|
@ -1447,8 +1442,7 @@ main() {
|
|||
|
||||
i = 5;
|
||||
printf("This is my program\n");
|
||||
<lineannotation>&hellip</>
|
||||
</programlisting>
|
||||
<lineannotation>&hellip</></programlisting>
|
||||
|
||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||
|
@ -2170,8 +2164,7 @@ in font-lock-auto-mode-list"
|
|||
("\\.lsp$" . lisp-mode)
|
||||
("\\.wiz$" . whizbang-mode)
|
||||
("\\.scm$" . scheme-mode)
|
||||
<lineannotation>…</>
|
||||
</programlisting>
|
||||
<lineannotation>…</></programlisting>
|
||||
|
||||
<para>This means that Emacs will automatically go into
|
||||
<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
|
||||
(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 of modes to always start in font-lock-mode")
|
||||
</programlisting>
|
||||
"List of modes to always start in font-lock-mode")</programlisting>
|
||||
|
||||
<para>This means that Emacs will always enable
|
||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -60,8 +60,7 @@
|
|||
</para>
|
||||
|
||||
<para>Skeleton Layout of a kernel module</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* KLD Skeleton
|
||||
* 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_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
||||
</programlisting>
|
||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||
|
||||
|
||||
<sect2>
|
||||
<title>Makefile</title>
|
||||
<para>FreeBSD provides a makefile include that you can use
|
||||
to quickly compile your kernel addition.</para>
|
||||
<programlisting>
|
||||
SRCS=skeleton.c
|
||||
<programlisting>SRCS=skeleton.c
|
||||
KMOD=skeleton
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
</programlisting>
|
||||
.include <bsd.kmod.mk></programlisting>
|
||||
|
||||
|
||||
<para>Simply running <command>make</command> with
|
||||
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
|||
<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
|
||||
it.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple `echo' pseudo-device KLD
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
|||
return(err);
|
||||
}
|
||||
|
||||
DEV_MODULE(echo,echo_loader,NULL);
|
||||
</programlisting>
|
||||
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||
|
||||
<para>To install this driver you will first need to make a node on
|
||||
your filesystem with a command such as : </para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -15,8 +15,7 @@
|
|||
<para>Information here about how the PCI bus code iterates
|
||||
through the unattached devices and see if a newly loaded kld
|
||||
will attach to any of them.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple KLD to play with the PCI functions.
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
|||
|
||||
static devclass_t mypci_devclass;
|
||||
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
||||
</programlisting>
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||
|
||||
<para>Additional Resources
|
||||
<itemizedlist>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -89,14 +89,12 @@
|
|||
<para>A typical SIM driver needs to include the following
|
||||
CAM-related header files:</para>
|
||||
|
||||
<programlisting>
|
||||
#include <cam/cam.h>
|
||||
<programlisting>#include <cam/cam.h>
|
||||
#include <cam/cam_ccb.h>
|
||||
#include <cam/cam_sim.h>
|
||||
#include <cam/cam_xpt_sim.h>
|
||||
#include <cam/cam_debug.h>
|
||||
#include <cam/scsi/scsi_all.h>
|
||||
</programlisting>
|
||||
#include <cam/scsi/scsi_all.h></programlisting>
|
||||
|
||||
<para>The first thing each SIM driver must do is register itself
|
||||
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
|
||||
allocate the queue of requests associated with this SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_devq *devq;
|
||||
<programlisting> struct cam_devq *devq;
|
||||
|
||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
that the SIM driver can handle in parallel on one SCSI
|
||||
card. Commonly it can be calculated as:</para>
|
||||
|
||||
<programlisting>
|
||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||
</programlisting>
|
||||
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||
|
||||
<para>Next we create a descriptor of our SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_sim *sim;
|
||||
<programlisting> struct cam_sim *sim;
|
||||
|
||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||
softc, unit, max_dev_transactions,
|
||||
max_tagged_dev_transactions, devq) )==NULL) {
|
||||
cam_simq_free(devq);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Note that if we are not able to create a SIM descriptor we
|
||||
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
|
||||
adapter:</para>
|
||||
|
||||
<programlisting>
|
||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If there is one <structName>devq</structName> structure per
|
||||
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
|
||||
and avoid problems with the future memory shortage:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_path *path;
|
||||
<programlisting> struct cam_path *path;
|
||||
|
||||
if(xpt_create_path(&path, /*periph*/NULL,
|
||||
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->sim = sim;
|
||||
</programlisting>
|
||||
softc->sim = sim;</programlisting>
|
||||
|
||||
<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
|
||||
control block for this type of request:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_setasync csa;
|
||||
<programlisting> struct ccb_setasync csa;
|
||||
|
||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||
csa.event_enable = AC_LOST_DEVICE;
|
||||
csa.callback = xxx_async;
|
||||
csa.callback_arg = sim;
|
||||
xpt_action((union ccb *)&csa);
|
||||
</programlisting>
|
||||
xpt_action((union ccb *)&csa);</programlisting>
|
||||
|
||||
<para>Now we take a look at the <function>xxx_action()</function>
|
||||
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
|
||||
switch:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||
int unit = cam_sim_unit(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;
|
||||
xpt_done(ccb);
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>As can be seen from the default case (if an unknown command
|
||||
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
|
||||
meaningful names in the driver, like:</para>
|
||||
|
||||
<programlisting>
|
||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
||||
</programlisting>
|
||||
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||
|
||||
<para>The most common initiator mode requests are:</para>
|
||||
<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
|
||||
sitting in the queue:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_scsiio *csio = &ccb->csio;
|
||||
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||
|
||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Also we check that the device is supported at all by our
|
||||
controller:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||
ccb_h->status = CAM_TID_INVALID;
|
||||
xpt_done(ccb);
|
||||
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
ccb_h->status = CAM_LUN_INVALID;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then allocate whatever data structures (such as
|
||||
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
|
||||
mark it as queued.</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
|
||||
if(hcb == NULL) {
|
||||
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;
|
||||
ccb_h->status |= CAM_SIM_QUEUED;
|
||||
</programlisting>
|
||||
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
devices to set the maximal mutually supported bus width,
|
||||
synchronous rate and offset.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
generate_identify_message(hcb);
|
||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||
if( !target_negotiated(hcb) )
|
||||
generate_negotiation_messages(hcb);
|
||||
</programlisting>
|
||||
generate_negotiation_messages(hcb);</programlisting>
|
||||
|
||||
<para>Then set up the SCSI command. The command storage may be
|
||||
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
|
||||
that.</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
/* CDB is a pointer */
|
||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||
/* CDB pointer is virtual */
|
||||
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
/* CDB is in the ccb (buffer) */
|
||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||
}
|
||||
hcb->cmdlen = csio->cdb_len;
|
||||
</programlisting>
|
||||
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||
|
||||
<para>Now it's time to set up the data. Again, the data storage
|
||||
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
|
||||
transfer:</para>
|
||||
|
||||
<programlisting>
|
||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
|
||||
if (dir == CAM_DIR_NONE)
|
||||
goto end_data;
|
||||
</programlisting>
|
||||
goto end_data;</programlisting>
|
||||
|
||||
<para>Then we check if the data is in one chunk or in a
|
||||
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
|
||||
implemented, it's actively used by CAM.</para>
|
||||
|
||||
<programlisting>
|
||||
int rv;
|
||||
<programlisting> int rv;
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
end_data:
|
||||
</programlisting>
|
||||
end_data:</programlisting>
|
||||
|
||||
<para>If disconnection is disabled for this CCB we pass this
|
||||
information to the hcb:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);</programlisting>
|
||||
|
||||
<para>If the controller is able to run REQUEST SENSE command all
|
||||
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
|
||||
interrupt handler (or timeout handler).</para>
|
||||
|
||||
<programlisting>
|
||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||
put_hcb_into_hardware_queue(hcb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>And here is a possible implementation of the function
|
||||
returning CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||
{
|
||||
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 & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||
xpt_done(ccb);
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
</listitem>
|
||||
|
||||
<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
|
||||
CAM_SCSI_BUS_RESET. Like:</para>
|
||||
|
||||
<programlisting>
|
||||
int targ, lun;
|
||||
<programlisting> int targ, lun;
|
||||
struct xxx_hcb *h, *hh;
|
||||
struct ccb_trans_settings neg;
|
||||
struct cam_path *path;
|
||||
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
|
||||
/* report the event */
|
||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
check that abort applies to a SCSI transaction:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb *abort_ccb;
|
||||
<programlisting> struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
in search for one associated with this CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h;
|
||||
<programlisting> struct xxx_hcb *hcb, *h;
|
||||
|
||||
hcb = NULL;
|
||||
|
||||
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
return;
|
||||
}
|
||||
|
||||
hcb=found_hcb;
|
||||
</programlisting>
|
||||
hcb=found_hcb;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
it.</para>
|
||||
|
||||
<programlisting>
|
||||
int hstatus;
|
||||
<programlisting> int hstatus;
|
||||
|
||||
/* shown as a function, in case special action is needed to make
|
||||
* this flag visible to hardware
|
||||
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
case HCB_COMPLETED:
|
||||
/* this is an easy case */
|
||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the CCB is being transferred right now we would like to
|
||||
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
|
||||
yet).</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_BEING_TRANSFERRED:
|
||||
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
}
|
||||
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<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
|
||||
queue. Reset the timeout and report the abort request to be
|
||||
completed.</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_DISCONNECTED:
|
||||
<programlisting> case HCB_DISCONNECTED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>That's all for the ABORT request, although there is one more
|
||||
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
|
||||
that:</para>
|
||||
|
||||
<programlisting>
|
||||
case XPT_ABORT:
|
||||
<programlisting> case XPT_ABORT:
|
||||
struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
else
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
|||
|
||||
<para>The code looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_trans_settings *cts;
|
||||
<programlisting> struct ccb_trans_settings *cts;
|
||||
int targ, lun;
|
||||
int flags;
|
||||
|
||||
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
|||
}
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
function target_negotiated(hcb). It can be implemented like
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
int
|
||||
<programlisting> int
|
||||
target_negotiated(struct xxx_hcb *hcb)
|
||||
{
|
||||
struct softc *softc = hcb->softc;
|
||||
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
|||
return 0; /* FALSE */
|
||||
else
|
||||
return 1; /* TRUE */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>After the values are re-negotiated the resulting values must
|
||||
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
|
||||
is:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_calc_geometry *ccg;
|
||||
<programlisting> struct ccb_calc_geometry *ccg;
|
||||
u_int32_t size_mb;
|
||||
u_int32_t secs_per_cylinder;
|
||||
int extended;
|
||||
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
|||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This gives the general idea, the exact calculation depends
|
||||
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
|
||||
are:</para>
|
||||
|
||||
<programlisting>
|
||||
128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers
|
||||
</programlisting>
|
||||
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers</programlisting>
|
||||
|
||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||
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
|
||||
strncpy, like:</para>
|
||||
|
||||
<programlisting>
|
||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
||||
</programlisting>
|
||||
<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
|
||||
CCB as done.</para>
|
||||
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
|||
gets just the the device unit number. So the poll routine would
|
||||
normally look as:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>or</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
|||
<para>If an asynchronous event callback has been set up then the
|
||||
callback function should be defined.</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
</programlisting>
|
||||
<programlisting>static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||
|
||||
<itemizedlist>
|
||||
<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,
|
||||
looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc;
|
||||
<programlisting> struct xxx_softc *softc;
|
||||
struct cam_sim *sim;
|
||||
int targ;
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</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
|
||||
restored a wrapper function can be defined, like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||
{
|
||||
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)
|
||||
{
|
||||
... process the request ...
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This approach is simple and robust but the problem with it
|
||||
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
|
||||
the status of the connections with the SCSI devices.</para>
|
||||
|
||||
<programlisting>
|
||||
int fatal=0;
|
||||
<programlisting> int fatal=0;
|
||||
struct ccb_trans_settings neg;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If interrupt is not caused by a controller-wide condition
|
||||
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
|
||||
we analyze what happened to this HCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h, *hh;
|
||||
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||
int hcb_status, scsi_status;
|
||||
int ccb_status;
|
||||
int targ;
|
||||
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|||
}
|
||||
|
||||
targ = hcb->target;
|
||||
hcb_status = get_status_of_current_hcb(softc);
|
||||
</programlisting>
|
||||
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||
|
||||
<para>First we check if the HCB has completed and if so we check
|
||||
the returned SCSI status.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);</programlisting>
|
||||
|
||||
<para>Then look if this status is related to the REQUEST SENSE
|
||||
command and if so handle it in a simple way.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE) {
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||
if(scsi_status == GOOD) { /* autosense was successful */
|
||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Else the command itself has completed, pay more attention to
|
||||
details. If auto-sense is not disabled for this CCB and the
|
||||
command has failed with sense data then run REQUEST SENSE
|
||||
command to receive that data.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->ccb->csio.scsi_status = scsi_status;
|
||||
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||
calculate_residue(hcb);
|
||||
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>One typical thing would be negotiation events: negotiation
|
||||
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
|
||||
not answer them).</para>
|
||||
|
||||
<programlisting>
|
||||
switch(hcb_status) {
|
||||
<programlisting> switch(hcb_status) {
|
||||
case TARGET_REJECTED_WIDE_NEG:
|
||||
/* revert to 8-bit bus */
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then we handle any errors that could have happened during
|
||||
auto-sense in the same simple-minded way as before. Otherwise we
|
||||
look closer at the details again.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE)
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||
goto autosense_failed;
|
||||
|
||||
switch(hcb_status) {
|
||||
</programlisting>
|
||||
switch(hcb_status) {</programlisting>
|
||||
|
||||
<para>The next event we consider is unexpected disconnect. Which
|
||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||
and abnormal in other cases.</para>
|
||||
|
||||
<programlisting>
|
||||
case UNEXPECTED_DISCONNECT:
|
||||
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||
if(requested_abort(hcb)) {
|
||||
/* abort affects all commands on that target+LUN, so
|
||||
* 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;
|
||||
lun_to_freeze = hcb->lun;
|
||||
}
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the target refuses to accept tags we notify CAM about
|
||||
that and return back all commands for this LUN:</para>
|
||||
|
||||
<programlisting>
|
||||
case TAGS_REJECTED:
|
||||
<programlisting> case TAGS_REJECTED:
|
||||
/* report the event */
|
||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||
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 */
|
||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||
lun_to_freeze = hcb->lun;
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>Then we check a number of other conditions, with processing
|
||||
basically limited to setting the CCB status:</para>
|
||||
|
||||
<programlisting>
|
||||
case SELECTION_TIMEOUT:
|
||||
<programlisting> case SELECTION_TIMEOUT:
|
||||
ccb_status = CAM_SEL_TIMEOUT;
|
||||
/* request the further code to freeze the queue */
|
||||
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;
|
||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
/* freeze the queue */
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This concludes the generic interrupt handling although
|
||||
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
|
||||
function would look like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_timeout(void *arg)
|
||||
{
|
||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
|||
} else {
|
||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>When we abort a request all the other disconnected requests
|
||||
to the same target/LUN get aborted too. So there appears a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -60,8 +60,7 @@
|
|||
</para>
|
||||
|
||||
<para>Skeleton Layout of a kernel module</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* KLD Skeleton
|
||||
* 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_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
||||
</programlisting>
|
||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||
|
||||
|
||||
<sect2>
|
||||
<title>Makefile</title>
|
||||
<para>FreeBSD provides a makefile include that you can use
|
||||
to quickly compile your kernel addition.</para>
|
||||
<programlisting>
|
||||
SRCS=skeleton.c
|
||||
<programlisting>SRCS=skeleton.c
|
||||
KMOD=skeleton
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
</programlisting>
|
||||
.include <bsd.kmod.mk></programlisting>
|
||||
|
||||
|
||||
<para>Simply running <command>make</command> with
|
||||
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
|||
<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
|
||||
it.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple `echo' pseudo-device KLD
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
|||
return(err);
|
||||
}
|
||||
|
||||
DEV_MODULE(echo,echo_loader,NULL);
|
||||
</programlisting>
|
||||
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||
|
||||
<para>To install this driver you will first need to make a node on
|
||||
your filesystem with a command such as : </para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -272,8 +272,7 @@
|
|||
and edit your configuration file. Uncomment (or add, if it does not
|
||||
exist) the following line</para>
|
||||
|
||||
<programlisting>
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||
<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,
|
||||
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
|
||||
|
||||
<programlisting>
|
||||
options DDB</programlisting>
|
||||
<programlisting>options DDB</programlisting>
|
||||
|
||||
to your config file, and rebuild. (See <link
|
||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -15,8 +15,7 @@
|
|||
<para>Information here about how the PCI bus code iterates
|
||||
through the unattached devices and see if a newly loaded kld
|
||||
will attach to any of them.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple KLD to play with the PCI functions.
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
|||
|
||||
static devclass_t mypci_devclass;
|
||||
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
||||
</programlisting>
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||
|
||||
<para>Additional Resources
|
||||
<itemizedlist>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -21,8 +21,7 @@
|
|||
maintained by a person or group of persons, they can communicate this
|
||||
fact to the world by adding a
|
||||
|
||||
<programlisting>
|
||||
MAINTAINER= email-addresses</programlisting>
|
||||
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||
|
||||
line to the <filename>Makefile</filename>s covering this portion of the
|
||||
source tree.</para>
|
||||
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
|||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||
|
||||
<programlisting>
|
||||
This directory contains virgin sources of the original distribution files
|
||||
<programlisting>This directory contains virgin sources of the original distribution files
|
||||
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
|
||||
official-patch versions must be imported. Please remember to import with
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -89,14 +89,12 @@
|
|||
<para>A typical SIM driver needs to include the following
|
||||
CAM-related header files:</para>
|
||||
|
||||
<programlisting>
|
||||
#include <cam/cam.h>
|
||||
<programlisting>#include <cam/cam.h>
|
||||
#include <cam/cam_ccb.h>
|
||||
#include <cam/cam_sim.h>
|
||||
#include <cam/cam_xpt_sim.h>
|
||||
#include <cam/cam_debug.h>
|
||||
#include <cam/scsi/scsi_all.h>
|
||||
</programlisting>
|
||||
#include <cam/scsi/scsi_all.h></programlisting>
|
||||
|
||||
<para>The first thing each SIM driver must do is register itself
|
||||
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
|
||||
allocate the queue of requests associated with this SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_devq *devq;
|
||||
<programlisting> struct cam_devq *devq;
|
||||
|
||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
that the SIM driver can handle in parallel on one SCSI
|
||||
card. Commonly it can be calculated as:</para>
|
||||
|
||||
<programlisting>
|
||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||
</programlisting>
|
||||
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||
|
||||
<para>Next we create a descriptor of our SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_sim *sim;
|
||||
<programlisting> struct cam_sim *sim;
|
||||
|
||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||
softc, unit, max_dev_transactions,
|
||||
max_tagged_dev_transactions, devq) )==NULL) {
|
||||
cam_simq_free(devq);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Note that if we are not able to create a SIM descriptor we
|
||||
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
|
||||
adapter:</para>
|
||||
|
||||
<programlisting>
|
||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If there is one <structName>devq</structName> structure per
|
||||
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
|
||||
and avoid problems with the future memory shortage:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_path *path;
|
||||
<programlisting> struct cam_path *path;
|
||||
|
||||
if(xpt_create_path(&path, /*periph*/NULL,
|
||||
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->sim = sim;
|
||||
</programlisting>
|
||||
softc->sim = sim;</programlisting>
|
||||
|
||||
<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
|
||||
control block for this type of request:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_setasync csa;
|
||||
<programlisting> struct ccb_setasync csa;
|
||||
|
||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||
csa.event_enable = AC_LOST_DEVICE;
|
||||
csa.callback = xxx_async;
|
||||
csa.callback_arg = sim;
|
||||
xpt_action((union ccb *)&csa);
|
||||
</programlisting>
|
||||
xpt_action((union ccb *)&csa);</programlisting>
|
||||
|
||||
<para>Now we take a look at the <function>xxx_action()</function>
|
||||
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
|
||||
switch:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||
int unit = cam_sim_unit(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;
|
||||
xpt_done(ccb);
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>As can be seen from the default case (if an unknown command
|
||||
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
|
||||
meaningful names in the driver, like:</para>
|
||||
|
||||
<programlisting>
|
||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
||||
</programlisting>
|
||||
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||
|
||||
<para>The most common initiator mode requests are:</para>
|
||||
<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
|
||||
sitting in the queue:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_scsiio *csio = &ccb->csio;
|
||||
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||
|
||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Also we check that the device is supported at all by our
|
||||
controller:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||
ccb_h->status = CAM_TID_INVALID;
|
||||
xpt_done(ccb);
|
||||
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
ccb_h->status = CAM_LUN_INVALID;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then allocate whatever data structures (such as
|
||||
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
|
||||
mark it as queued.</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
|
||||
if(hcb == NULL) {
|
||||
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;
|
||||
ccb_h->status |= CAM_SIM_QUEUED;
|
||||
</programlisting>
|
||||
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
devices to set the maximal mutually supported bus width,
|
||||
synchronous rate and offset.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
generate_identify_message(hcb);
|
||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||
if( !target_negotiated(hcb) )
|
||||
generate_negotiation_messages(hcb);
|
||||
</programlisting>
|
||||
generate_negotiation_messages(hcb);</programlisting>
|
||||
|
||||
<para>Then set up the SCSI command. The command storage may be
|
||||
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
|
||||
that.</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
/* CDB is a pointer */
|
||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||
/* CDB pointer is virtual */
|
||||
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
/* CDB is in the ccb (buffer) */
|
||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||
}
|
||||
hcb->cmdlen = csio->cdb_len;
|
||||
</programlisting>
|
||||
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||
|
||||
<para>Now it's time to set up the data. Again, the data storage
|
||||
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
|
||||
transfer:</para>
|
||||
|
||||
<programlisting>
|
||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
|
||||
if (dir == CAM_DIR_NONE)
|
||||
goto end_data;
|
||||
</programlisting>
|
||||
goto end_data;</programlisting>
|
||||
|
||||
<para>Then we check if the data is in one chunk or in a
|
||||
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
|
||||
implemented, it's actively used by CAM.</para>
|
||||
|
||||
<programlisting>
|
||||
int rv;
|
||||
<programlisting> int rv;
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
end_data:
|
||||
</programlisting>
|
||||
end_data:</programlisting>
|
||||
|
||||
<para>If disconnection is disabled for this CCB we pass this
|
||||
information to the hcb:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);</programlisting>
|
||||
|
||||
<para>If the controller is able to run REQUEST SENSE command all
|
||||
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
|
||||
interrupt handler (or timeout handler).</para>
|
||||
|
||||
<programlisting>
|
||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||
put_hcb_into_hardware_queue(hcb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>And here is a possible implementation of the function
|
||||
returning CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||
{
|
||||
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 & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||
xpt_done(ccb);
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
</listitem>
|
||||
|
||||
<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
|
||||
CAM_SCSI_BUS_RESET. Like:</para>
|
||||
|
||||
<programlisting>
|
||||
int targ, lun;
|
||||
<programlisting> int targ, lun;
|
||||
struct xxx_hcb *h, *hh;
|
||||
struct ccb_trans_settings neg;
|
||||
struct cam_path *path;
|
||||
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
|
||||
/* report the event */
|
||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
check that abort applies to a SCSI transaction:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb *abort_ccb;
|
||||
<programlisting> struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
in search for one associated with this CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h;
|
||||
<programlisting> struct xxx_hcb *hcb, *h;
|
||||
|
||||
hcb = NULL;
|
||||
|
||||
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
return;
|
||||
}
|
||||
|
||||
hcb=found_hcb;
|
||||
</programlisting>
|
||||
hcb=found_hcb;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
it.</para>
|
||||
|
||||
<programlisting>
|
||||
int hstatus;
|
||||
<programlisting> int hstatus;
|
||||
|
||||
/* shown as a function, in case special action is needed to make
|
||||
* this flag visible to hardware
|
||||
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
case HCB_COMPLETED:
|
||||
/* this is an easy case */
|
||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the CCB is being transferred right now we would like to
|
||||
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
|
||||
yet).</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_BEING_TRANSFERRED:
|
||||
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
}
|
||||
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<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
|
||||
queue. Reset the timeout and report the abort request to be
|
||||
completed.</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_DISCONNECTED:
|
||||
<programlisting> case HCB_DISCONNECTED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>That's all for the ABORT request, although there is one more
|
||||
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
|
||||
that:</para>
|
||||
|
||||
<programlisting>
|
||||
case XPT_ABORT:
|
||||
<programlisting> case XPT_ABORT:
|
||||
struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
else
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
|||
|
||||
<para>The code looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_trans_settings *cts;
|
||||
<programlisting> struct ccb_trans_settings *cts;
|
||||
int targ, lun;
|
||||
int flags;
|
||||
|
||||
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
|||
}
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
function target_negotiated(hcb). It can be implemented like
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
int
|
||||
<programlisting> int
|
||||
target_negotiated(struct xxx_hcb *hcb)
|
||||
{
|
||||
struct softc *softc = hcb->softc;
|
||||
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
|||
return 0; /* FALSE */
|
||||
else
|
||||
return 1; /* TRUE */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>After the values are re-negotiated the resulting values must
|
||||
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
|
||||
is:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_calc_geometry *ccg;
|
||||
<programlisting> struct ccb_calc_geometry *ccg;
|
||||
u_int32_t size_mb;
|
||||
u_int32_t secs_per_cylinder;
|
||||
int extended;
|
||||
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
|||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This gives the general idea, the exact calculation depends
|
||||
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
|
||||
are:</para>
|
||||
|
||||
<programlisting>
|
||||
128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers
|
||||
</programlisting>
|
||||
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers</programlisting>
|
||||
|
||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||
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
|
||||
strncpy, like:</para>
|
||||
|
||||
<programlisting>
|
||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
||||
</programlisting>
|
||||
<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
|
||||
CCB as done.</para>
|
||||
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
|||
gets just the the device unit number. So the poll routine would
|
||||
normally look as:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>or</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
|||
<para>If an asynchronous event callback has been set up then the
|
||||
callback function should be defined.</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
</programlisting>
|
||||
<programlisting>static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||
|
||||
<itemizedlist>
|
||||
<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,
|
||||
looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc;
|
||||
<programlisting> struct xxx_softc *softc;
|
||||
struct cam_sim *sim;
|
||||
int targ;
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</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
|
||||
restored a wrapper function can be defined, like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||
{
|
||||
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)
|
||||
{
|
||||
... process the request ...
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This approach is simple and robust but the problem with it
|
||||
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
|
||||
the status of the connections with the SCSI devices.</para>
|
||||
|
||||
<programlisting>
|
||||
int fatal=0;
|
||||
<programlisting> int fatal=0;
|
||||
struct ccb_trans_settings neg;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If interrupt is not caused by a controller-wide condition
|
||||
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
|
||||
we analyze what happened to this HCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h, *hh;
|
||||
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||
int hcb_status, scsi_status;
|
||||
int ccb_status;
|
||||
int targ;
|
||||
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|||
}
|
||||
|
||||
targ = hcb->target;
|
||||
hcb_status = get_status_of_current_hcb(softc);
|
||||
</programlisting>
|
||||
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||
|
||||
<para>First we check if the HCB has completed and if so we check
|
||||
the returned SCSI status.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);</programlisting>
|
||||
|
||||
<para>Then look if this status is related to the REQUEST SENSE
|
||||
command and if so handle it in a simple way.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE) {
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||
if(scsi_status == GOOD) { /* autosense was successful */
|
||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Else the command itself has completed, pay more attention to
|
||||
details. If auto-sense is not disabled for this CCB and the
|
||||
command has failed with sense data then run REQUEST SENSE
|
||||
command to receive that data.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->ccb->csio.scsi_status = scsi_status;
|
||||
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||
calculate_residue(hcb);
|
||||
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>One typical thing would be negotiation events: negotiation
|
||||
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
|
||||
not answer them).</para>
|
||||
|
||||
<programlisting>
|
||||
switch(hcb_status) {
|
||||
<programlisting> switch(hcb_status) {
|
||||
case TARGET_REJECTED_WIDE_NEG:
|
||||
/* revert to 8-bit bus */
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then we handle any errors that could have happened during
|
||||
auto-sense in the same simple-minded way as before. Otherwise we
|
||||
look closer at the details again.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE)
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||
goto autosense_failed;
|
||||
|
||||
switch(hcb_status) {
|
||||
</programlisting>
|
||||
switch(hcb_status) {</programlisting>
|
||||
|
||||
<para>The next event we consider is unexpected disconnect. Which
|
||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||
and abnormal in other cases.</para>
|
||||
|
||||
<programlisting>
|
||||
case UNEXPECTED_DISCONNECT:
|
||||
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||
if(requested_abort(hcb)) {
|
||||
/* abort affects all commands on that target+LUN, so
|
||||
* 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;
|
||||
lun_to_freeze = hcb->lun;
|
||||
}
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the target refuses to accept tags we notify CAM about
|
||||
that and return back all commands for this LUN:</para>
|
||||
|
||||
<programlisting>
|
||||
case TAGS_REJECTED:
|
||||
<programlisting> case TAGS_REJECTED:
|
||||
/* report the event */
|
||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||
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 */
|
||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||
lun_to_freeze = hcb->lun;
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>Then we check a number of other conditions, with processing
|
||||
basically limited to setting the CCB status:</para>
|
||||
|
||||
<programlisting>
|
||||
case SELECTION_TIMEOUT:
|
||||
<programlisting> case SELECTION_TIMEOUT:
|
||||
ccb_status = CAM_SEL_TIMEOUT;
|
||||
/* request the further code to freeze the queue */
|
||||
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;
|
||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
/* freeze the queue */
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This concludes the generic interrupt handling although
|
||||
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
|
||||
function would look like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_timeout(void *arg)
|
||||
{
|
||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
|||
} else {
|
||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>When we abort a request all the other disconnected requests
|
||||
to the same target/LUN get aborted too. So there appears a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -121,8 +121,7 @@
|
|||
instruction immediately following the function call. (Inspired
|
||||
by <xref linkend="Phrack">)</para>
|
||||
|
||||
<programlisting>
|
||||
#include <sgmltag>stdio.h</sgmltag>
|
||||
<programlisting>#include <sgmltag>stdio.h</sgmltag>
|
||||
|
||||
void manipulate(char *buffer) {
|
||||
char newbuffer[80];
|
||||
|
@ -140,8 +139,7 @@ int main() {
|
|||
i=2;
|
||||
printf("The value of i is : %d\n",i);
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1060,8 +1060,7 @@ free(foo);
|
|||
<para>Here's a very simple make file:</para>
|
||||
|
||||
<programlisting>foo: foo.c
|
||||
cc -o foo foo.c
|
||||
</programlisting>
|
||||
cc -o foo foo.c</programlisting>
|
||||
|
||||
<para>It consists of two lines, a dependency line and a creation
|
||||
line.</para>
|
||||
|
@ -1105,8 +1104,7 @@ free(foo);
|
|||
cc -o foo foo.c
|
||||
|
||||
install:
|
||||
cp foo /home/me
|
||||
</programlisting>
|
||||
cp foo /home/me</programlisting>
|
||||
|
||||
<para>We can tell make which target we want to make by
|
||||
typing:</para>
|
||||
|
@ -1159,8 +1157,7 @@ install:
|
|||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||
|
||||
.include <bsd.port.mk>
|
||||
</programlisting>
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
||||
<para>Now, if we go to the directory for this port and type
|
||||
<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
|
||||
for it. This involves adding a line like</para>
|
||||
|
||||
<programlisting> * Make: (make). The GNU Make utility.
|
||||
</programlisting>
|
||||
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||
|
||||
<para>to the file. Once you have done this, you can type
|
||||
<userinput>info</userinput> and then select
|
||||
|
@ -1381,8 +1377,7 @@ main() {
|
|||
int bazz(int anint) {
|
||||
printf("You gave me %d\n", anint);
|
||||
return anint;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This program sets <symbol>i</symbol> to be
|
||||
<literal>5</literal> and passes it to a function
|
||||
|
@ -1438,8 +1433,7 @@ main() {
|
|||
|
||||
i = 5;
|
||||
printf("This is my program\n");
|
||||
<lineannotation>&hellip</>
|
||||
</programlisting>
|
||||
<lineannotation>&hellip</></programlisting>
|
||||
|
||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||
|
@ -2162,8 +2156,7 @@ in font-lock-auto-mode-list"
|
|||
("\\.lsp$" . lisp-mode)
|
||||
("\\.wiz$" . whizbang-mode)
|
||||
("\\.scm$" . scheme-mode)
|
||||
<lineannotation>…</>
|
||||
</programlisting>
|
||||
<lineannotation>…</></programlisting>
|
||||
|
||||
<para>This means that Emacs will automatically go into
|
||||
<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
|
||||
(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 of modes to always start in font-lock-mode")
|
||||
</programlisting>
|
||||
"List of modes to always start in font-lock-mode")</programlisting>
|
||||
|
||||
<para>This means that Emacs will always enable
|
||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<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>
|
||||
<year>1995</year>
|
||||
|
@ -2763,8 +2763,7 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on
|
|||
<para>Add the following lines to your kernel configuration
|
||||
file, and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
device uhci
|
||||
<programlisting>device uhci
|
||||
device ohci
|
||||
device usb
|
||||
device ukbd
|
||||
|
@ -2773,8 +2772,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
|||
<para>In versions of FreeBSD before 4.0, use this
|
||||
instead:</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
<programlisting>controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
controller ukbd0
|
||||
|
@ -2794,8 +2792,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
|||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||
following lines:</para>
|
||||
|
||||
<programlisting>
|
||||
usbd_enable="YES"
|
||||
<programlisting>usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
|
||||
</listitem>
|
||||
|
@ -3024,8 +3021,7 @@ moused_flags=""</programlisting>
|
|||
<para>Add the following lines to your kernel configuration
|
||||
file, and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
device uhci
|
||||
<programlisting>device uhci
|
||||
device ohci
|
||||
device usb
|
||||
device ums</programlisting>
|
||||
|
@ -3033,8 +3029,7 @@ device ums</programlisting>
|
|||
<para>In versions of FreeBSD before 4.0, use this
|
||||
instead:</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
<programlisting>controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
device ums0</programlisting>
|
||||
|
@ -3052,8 +3047,7 @@ device ums0</programlisting>
|
|||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||
following lines:</para>
|
||||
|
||||
<programlisting>
|
||||
moused_enable="YES"
|
||||
<programlisting>moused_enable="YES"
|
||||
moused_type="auto"
|
||||
moused_port="/dev/ums0"
|
||||
moused_flags=""
|
||||
|
@ -3070,16 +3064,14 @@ usbd_flags=""</programlisting>
|
|||
3.3.2 or later, be sure to have the following lines in the
|
||||
<emphasis>Pointer</emphasis> section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
<programlisting>Device "/dev/sysmouse"
|
||||
Protocol "Auto"</programlisting>
|
||||
|
||||
<para>If you are using earlier versions of XFree86, be sure to
|
||||
have the following lines in the <emphasis>Pointer</emphasis>
|
||||
section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
<programlisting>Device "/dev/sysmouse"
|
||||
Protocol "SysMouse"</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -3127,8 +3119,7 @@ Protocol "SysMouse"</programlisting>
|
|||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||
kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: psm.c
|
||||
<programlisting>Index: psm.c
|
||||
===================================================================
|
||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||
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>
|
||||
from the output of &man.pnpinfo.8;:</para>
|
||||
|
||||
<programlisting>
|
||||
{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||
<programlisting>{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
||||
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
||||
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
|
||||
</programlisting>
|
||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
|
||||
|
||||
<para>Add the hexadecimal Vendor ID for your device in the
|
||||
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
|
||||
sure you have the following lines.</para>
|
||||
|
||||
<programlisting>
|
||||
Section Pointer
|
||||
<programlisting>Section Pointer
|
||||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
.....</programlisting>
|
||||
|
@ -7328,8 +7316,7 @@ Device "/dev/sysmouse"
|
|||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
Buttons 5
|
||||
EndSection
|
||||
</programlisting>
|
||||
EndSection</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
|
@ -7398,8 +7385,7 @@ EndSection</programlisting>
|
|||
Protocol "IntelliMouse"
|
||||
Device "/dev/psm0"
|
||||
ZAxisMapping 4 5
|
||||
EndSection
|
||||
</programlisting>
|
||||
EndSection</programlisting>
|
||||
</example>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -7454,8 +7440,7 @@ EndSection
|
|||
(scroll-up imwheel-scroll-interval))
|
||||
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||
;;; end imwheel section
|
||||
</programlisting>
|
||||
;;; end imwheel section</programlisting>
|
||||
</example>
|
||||
|
||||
<para>For <application>Xemacs</application>, add the
|
||||
|
@ -7476,8 +7461,7 @@ EndSection
|
|||
(scroll-up imwheel-scroll-interval))
|
||||
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||
;;; end imwheel section
|
||||
</programlisting>
|
||||
;;; end imwheel section</programlisting>
|
||||
</example>
|
||||
</listitem>
|
||||
|
||||
|
@ -8478,8 +8462,7 @@ SMC EtherPower (Model 8432)
|
|||
TopWare TE-3500P
|
||||
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
||||
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)
|
||||
</programlisting>
|
||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)</programlisting>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||
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">
|
||||
|
@ -215,8 +215,7 @@
|
|||
the element is a paragraph, called <literal>p</literal>. This
|
||||
element has both start and end tags.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
||||
<programlisting><![ 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'
|
||||
element.</p>
|
||||
|
||||
|
@ -235,8 +234,7 @@
|
|||
<literal>hr</literal>. This element does not wrap content, so only
|
||||
has a start tag.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a paragraph.</p>
|
||||
<programlisting><![ CDATA [<p>This is a paragraph.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
@ -252,8 +250,7 @@
|
|||
<example>
|
||||
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||
<programlisting><![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
||||
</example>
|
||||
|
||||
|
@ -303,8 +300,7 @@
|
|||
<example>
|
||||
<title>Using an element with an attribute</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p align="left">The inclusion of the align attribute
|
||||
<programlisting><![ CDATA [<p align="left">The inclusion of the align attribute
|
||||
on this paragraph was superfluous, since the default is left.</p>
|
||||
|
||||
<p align="center">This may appear in the center.</p>]]></programlisting>
|
||||
|
@ -319,8 +315,7 @@
|
|||
<example>
|
||||
<title>Single quotes around attributes</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||
<programlisting><![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||
</example>
|
||||
|
||||
<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
|
||||
&man.bash.1; users</title>
|
||||
|
||||
<programlisting>
|
||||
SGML_ROOT=/usr/local/share/sgml
|
||||
<programlisting>SGML_ROOT=/usr/local/share/sgml
|
||||
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
||||
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/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
|
||||
&man.tcsh.1; users</title>
|
||||
|
||||
<programlisting>
|
||||
setenv SGML_ROOT /usr/local/share/sgml
|
||||
<programlisting>setenv SGML_ROOT /usr/local/share/sgml
|
||||
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}/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
|
||||
following text;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<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
|
||||
4.0 of the HTML DTD looks like this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||
|
||||
<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
|
||||
follows;</para>
|
||||
|
||||
<programlisting>
|
||||
"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||
<programlisting>"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||
|
||||
<variablelist>
|
||||
<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
|
||||
the line;</para>
|
||||
|
||||
<programlisting>
|
||||
PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||
<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
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||
<programlisting><![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||
|
||||
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
||||
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>
|
||||
<title>SGML generic comment</title>
|
||||
|
||||
<programlisting>
|
||||
<!-- test comment --></programlisting>
|
||||
<programlisting><!-- test comment --></programlisting>
|
||||
|
||||
<programlisting><![ CDATA [
|
||||
<!-- 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>
|
||||
|
||||
<programlisting>
|
||||
<!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||
<programlisting><!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||
|
||||
<para>This is not valid SGML, and may give confusing error
|
||||
messages.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||
<programlisting><![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||
|
||||
<para>As the example suggests, <emphasis>do not</emphasis> write
|
||||
comments like that.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!--===================================================-->]]></programlisting>
|
||||
<programlisting><![ CDATA [<!--===================================================-->]]></programlisting>
|
||||
|
||||
<para>That is a (slightly) better approach, but it still potentially
|
||||
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
|
||||
version number of your product. You could write;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<para>The current version of our product is
|
||||
<programlisting><![ CDATA [<para>The current version of our product is
|
||||
¤t.version;.</para>]]></programlisting>
|
||||
|
||||
<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>
|
||||
<title>Defining general entities</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY current.version "3.0-RELEASE">
|
||||
<!ENTITY last.version "2.2.7-RELEASE">
|
||||
]>]]></programlisting>
|
||||
|
@ -998,8 +980,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Defining parameter entities</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY % param.some "some">
|
||||
<!ENTITY % param.text "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
|
||||
<filename>example.sgml</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||
<!ENTITY version "1.1">
|
||||
]>
|
||||
|
||||
|
@ -1118,8 +1098,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Using general entities to include files</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<!ENTITY chapter.2 SYSTEM "chapter2.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
|
||||
following;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<programlisting><![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||
<!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
|
||||
for use. Then use the general entities as before;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!-- Define a parameter entity to load in the chapter general entities -->
|
||||
<!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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||
<programlisting><![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||
this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY version "1.1">
|
||||
<!ENTITY para1 SYSTEM "para1.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
|
||||
this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!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
|
||||
this content:</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!ENTITY version "1.1">
|
||||
<programlisting><![ CDATA [<!ENTITY version "1.1">
|
||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
||||
|
@ -1332,8 +1305,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Structure of a marked section</title>
|
||||
|
||||
<programlisting>
|
||||
<![ <replaceable>KEYWORD</replaceable> [
|
||||
<programlisting><![ <replaceable>KEYWORD</replaceable> [
|
||||
Contents of marked section
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
@ -1399,8 +1371,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Using a CDATA marked section</title>
|
||||
|
||||
<programlisting>
|
||||
<para>Here is an example of how you would include some text
|
||||
<programlisting><para>Here is an example of how you would include some text
|
||||
that contained many &lt; and &amp; symbols. The sample
|
||||
text is a fragment of HTML. The surrounding text (<para> and
|
||||
<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
|
||||
<literal>IGNORE</literal> in marked sections</title>
|
||||
|
||||
<programlisting>
|
||||
<![ INCLUDE [
|
||||
<programlisting><![ INCLUDE [
|
||||
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
|
||||
section</title>
|
||||
|
||||
<programlisting>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!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
|
||||
definition to;</para>
|
||||
|
||||
<programlisting>
|
||||
<!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||
<programlisting><!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||
|
||||
<para>On reprocessing the document, the marked sections that use
|
||||
<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
|
||||
contains the following;</para>
|
||||
|
||||
<programlisting>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY % text.output "INCLUDE">
|
||||
]>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||
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">
|
||||
|
@ -182,8 +182,7 @@
|
|||
<para>For example, the source for this section looks something
|
||||
like:</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [+--- This is column 0
|
||||
<programlisting><![ CDATA [+--- This is column 0
|
||||
V
|
||||
<chapter>
|
||||
<title>...</title>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -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>
|
||||
|
||||
<programlisting>
|
||||
portmap_enable="YES"
|
||||
<programlisting>portmap_enable="YES"
|
||||
nfs_server_enable="YES"
|
||||
nfs_server_flags="-u -t -n 4"
|
||||
mountd_flags="-r"</programlisting>
|
||||
|
@ -588,8 +587,7 @@ mountd_flags="-r"</programlisting>
|
|||
|
||||
<para>On the client, make sure you have:</para>
|
||||
|
||||
<programlisting>
|
||||
nfs_client_enable="YES"
|
||||
<programlisting>nfs_client_enable="YES"
|
||||
nfs_client_flags="-n 4"</programlisting>
|
||||
|
||||
<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
|
||||
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
||||
|
||||
<programlisting>
|
||||
fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||
<programlisting>fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||
<programlisting>freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||
|
||||
<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,
|
||||
netmask.</para>
|
||||
|
||||
<programlisting>
|
||||
diskless:\
|
||||
<programlisting>diskless:\
|
||||
:ht=ether:\
|
||||
:ha=0000c01f848a:\
|
||||
:sm=255.255.255.0:\
|
||||
|
@ -960,16 +955,14 @@ diskless:\
|
|||
|
||||
<para>A typical completely diskless cfg file might contain:</para>
|
||||
|
||||
<programlisting>
|
||||
rootfs 192.1.2.3:/rootfs/myclient
|
||||
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||
swapfs 192.1.2.3:/swapfs
|
||||
swapsize 20000
|
||||
hostname myclient.mydomain</programlisting>
|
||||
|
||||
<para>A cfg file for a machine with local swap might contain:</para>
|
||||
|
||||
<programlisting>
|
||||
rootfs 192.1.2.3:/rootfs/myclient
|
||||
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||
hostname myclient.mydomain</programlisting>
|
||||
</step>
|
||||
|
||||
|
@ -980,14 +973,12 @@ hostname myclient.mydomain</programlisting>
|
|||
<filename>/etc/exports</filename> file on FreeBSD might look
|
||||
like:</para>
|
||||
|
||||
<programlisting>
|
||||
/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||
<programlisting>/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
||||
|
||||
<para>And on HP-UX:</para>
|
||||
|
||||
<programlisting>
|
||||
/rootfs/myclient -root=myclient.mydomain
|
||||
<programlisting>/rootfs/myclient -root=myclient.mydomain
|
||||
/swapfs -root=myclient.mydomain</programlisting>
|
||||
</step>
|
||||
|
||||
|
@ -1139,8 +1130,7 @@ hostname myclient.mydomain</programlisting>
|
|||
list, send mail to &a.majordomo; and
|
||||
specify:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-isdn</programlisting>
|
||||
<programlisting>subscribe freebsd-isdn</programlisting>
|
||||
|
||||
<para>in the body of your message.</para>
|
||||
</sect2>
|
||||
|
@ -1262,8 +1252,7 @@ subscribe freebsd-isdn</programlisting>
|
|||
with AUI/10BT transceiver, if necessary.</para>
|
||||
|
||||
<!-- This should be a graphic -->
|
||||
<programlisting>
|
||||
---Sun workstation
|
||||
<programlisting>---Sun workstation
|
||||
|
|
||||
---FreeBSD box
|
||||
|
|
||||
|
@ -1284,8 +1273,7 @@ ISDN BRI line</programlisting>
|
|||
<para>Network is Twisted Pair Ethernet.</para>
|
||||
|
||||
<!-- This should be a graphic -->
|
||||
<programlisting>
|
||||
-------Novell Server
|
||||
<programlisting> -------Novell Server
|
||||
| H |
|
||||
| ---Sun
|
||||
| |
|
||||
|
@ -1805,8 +1793,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
|||
<filename>/etc/crontab</filename> entries on your slave
|
||||
servers should do the job:</para>
|
||||
|
||||
<programlisting>
|
||||
20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||
<programlisting>20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
||||
|
||||
<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
|
||||
startup:</para>
|
||||
|
||||
<programlisting>
|
||||
nisdomainname="test-domain"
|
||||
<programlisting>nisdomainname="test-domain"
|
||||
nis_client_enable="YES"</programlisting>
|
||||
</listitem>
|
||||
|
||||
|
@ -1923,8 +1909,7 @@ nis_client_enable="YES"</programlisting>
|
|||
like this:</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
# allow connections from local host -- mandatory
|
||||
<programlisting># allow connections from local host -- mandatory
|
||||
127.0.0.1 255.255.255.255
|
||||
# allow connections from any host
|
||||
# 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
|
||||
employees and interns.</para>
|
||||
|
||||
<programlisting>
|
||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
<programlisting>IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
||||
(,golf,test-domain)
|
||||
INTERNS (,able,test-domain) (,baker,test-domain)
|
||||
</programlisting>
|
||||
INTERNS (,able,test-domain) (,baker,test-domain)</programlisting>
|
||||
|
||||
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
||||
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
|
||||
sub-netgroups:</para>
|
||||
|
||||
<programlisting>
|
||||
BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||
<programlisting>BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
||||
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3
|
||||
</programlisting>
|
||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3</programlisting>
|
||||
|
||||
<para>You can repeat this process if you need more than 225
|
||||
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
|
||||
&man.vipw.8; and replace the line</para>
|
||||
|
||||
<programlisting>
|
||||
+:::::::::
|
||||
</programlisting>
|
||||
<programlisting>+:::::::::</programlisting>
|
||||
|
||||
<para>with</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
</programlisting>
|
||||
<programlisting>+@IT_EMP:::::::::</programlisting>
|
||||
|
||||
<para>Now, only the data for the users defined in the netgroup
|
||||
<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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
<programlisting>+@IT_EMP:::::::::
|
||||
+@IT_APP:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>The corresponding lines for the normal workstations
|
||||
could be:</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
<programlisting>+@IT_EMP:::::::::
|
||||
+@USERS:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>And everything would be fine until there is a policy
|
||||
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
|
||||
entries for your NIS map netgroup should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
BIGSRV IT_EMP IT_APP
|
||||
<programlisting>BIGSRV IT_EMP IT_APP
|
||||
SMALLSRV IT_EMP IT_APP ITINTERN
|
||||
USERBOX IT_EMP ITINTERN USERS
|
||||
</programlisting>
|
||||
USERBOX IT_EMP ITINTERN USERS</programlisting>
|
||||
|
||||
<para>This method of defining login restrictions works
|
||||
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
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
<programlisting>+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>Once you have completed this task for all your machines,
|
||||
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
|
||||
scenario with some additional goodies.</para>
|
||||
|
||||
<programlisting>
|
||||
# Define groups of users first
|
||||
<programlisting># Define groups of users first
|
||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
||||
|
@ -2429,8 +2397,7 @@ ONE SECURITY
|
|||
#
|
||||
# Restrict a machine to a single user
|
||||
TWO (,hotel,test-domain)
|
||||
# [...more groups to follow]
|
||||
</programlisting>
|
||||
# [...more groups to follow]</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
include the following:</para>
|
||||
|
||||
<programlisting>
|
||||
ifconfig_fxp0="DHCP"
|
||||
</programlisting>
|
||||
<programlisting>ifconfig_fxp0="DHCP"</programlisting>
|
||||
|
||||
<note>
|
||||
<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
|
||||
following (editing as necessary):</para>
|
||||
|
||||
<programlisting>
|
||||
dhcp_program="/sbin/dhclient"
|
||||
dhcp_flags=""
|
||||
</programlisting>
|
||||
<programlisting>dhcp_program="/sbin/dhclient"
|
||||
dhcp_flags=""</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [#!/bin/sh
|
||||
<programlisting><![ CDATA [#!/bin/sh
|
||||
#
|
||||
# create a restore floppy
|
||||
#
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -592,8 +592,7 @@
|
|||
wish to protect, replacing the text between the <literal>%%</literal>
|
||||
with the appropriate information.</para>
|
||||
|
||||
<programlisting>
|
||||
Copyright (c) %%proper_years_here%%
|
||||
<programlisting>Copyright (c) %%proper_years_here%%
|
||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -139,8 +139,7 @@
|
|||
<para>To join these lists, send mail to &a.majordomo; and
|
||||
specify the following in the body of your message:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-current
|
||||
<programlisting>subscribe freebsd-current
|
||||
subscribe cvs-all</programlisting>
|
||||
|
||||
<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
|
||||
specify the following in the body of your message:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-stable
|
||||
<programlisting>subscribe freebsd-stable
|
||||
subscribe cvs-all</programlisting>
|
||||
|
||||
<para>Optionally, you can also say <literal>help</literal>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -662,8 +662,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
|
|||
adding the following line to your kernel configuration
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
options QUOTA</programlisting>
|
||||
<programlisting>options QUOTA</programlisting>
|
||||
|
||||
<para>The stock <filename>GENERIC</filename> kernel does not have
|
||||
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
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
enable_quotas=<quote>YES</quote></programlisting>
|
||||
<programlisting>enable_quotas=<quote>YES</quote></programlisting>
|
||||
|
||||
<para>For finer control over your quota startup, there is an
|
||||
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
|
||||
purpose:</para>
|
||||
|
||||
<programlisting>
|
||||
check_quotas=<quote>NO</quote></programlisting>
|
||||
<programlisting>check_quotas=<quote>NO</quote></programlisting>
|
||||
|
||||
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
||||
configuration is simpler, and consists of only one variable. Set
|
||||
the following in your <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
check_quotas=<quote>YES</quote></programlisting>
|
||||
<programlisting>check_quotas=<quote>YES</quote></programlisting>
|
||||
|
||||
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
||||
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
|
||||
to to enable quotas on. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||
<programlisting>/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||
|
||||
<para>Similarly, to enable group quotas, use the
|
||||
<literal>groupquota</literal> option instead of the
|
||||
<literal>userquota</literal> keyword. To enable both user and
|
||||
group quotas, change the entry as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||
<programlisting>/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||
|
||||
<para>By default the quota files are stored in the root directory of
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
Quotas for user test:
|
||||
<programlisting>Quotas for user test:
|
||||
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
||||
inodes in use: 7, limits (soft = 50, hard = 60)
|
||||
/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
|
||||
limits on two file systems.</para>
|
||||
|
||||
<programlisting>
|
||||
Disk quotas for user test (uid 1002):
|
||||
<programlisting>Disk quotas for user test (uid 1002):
|
||||
Filesystem blocks quota limit grace files quota limit grace
|
||||
/usr 65* 50 75 5days 7 50 60
|
||||
/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
|
||||
<filename>/etc/inetd.conf</filename> like so:</para>
|
||||
|
||||
<programlisting>
|
||||
rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||
<programlisting>rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||
|
||||
<para>Now restart <command>inetd</command>:</para>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -482,8 +482,7 @@
|
|||
|
||||
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
||||
|
||||
<programlisting>
|
||||
subscribe <listname> [<optional address>]</programlisting>
|
||||
<programlisting>subscribe <listname> [<optional address>]</programlisting>
|
||||
|
||||
in the body of your message. For example, to subscribe yourself to
|
||||
<literal>freebsd-announce</literal>, you'd do:</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1364,8 +1364,7 @@
|
|||
below.</para>
|
||||
|
||||
<!-- This should really be a graphic -->
|
||||
<programlisting>
|
||||
INS8250 -> INS8250B
|
||||
<programlisting>INS8250 -> INS8250B
|
||||
\
|
||||
\
|
||||
\-> INS8250A -> INS82C50A
|
||||
|
@ -2609,8 +2608,7 @@ INS8250 -> INS8250B
|
|||
<literal>options COM_MULTIPORT</literal> or it will not work very
|
||||
well!</para>
|
||||
|
||||
<programlisting>
|
||||
device sio4 at isa? port 0x100 tty flags 0xb05
|
||||
<programlisting>device sio4 at isa? port 0x100 tty flags 0xb05
|
||||
device sio5 at isa? port 0x108 tty flags 0xb05
|
||||
device sio6 at isa? port 0x110 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>
|
||||
<para>Add the line
|
||||
|
||||
<programlisting>
|
||||
options COM_MULTIPORT</programlisting>
|
||||
<programlisting>options COM_MULTIPORT</programlisting>
|
||||
|
||||
to the config file.</para>
|
||||
</step>
|
||||
|
@ -2684,8 +2681,7 @@ options COM_MULTIPORT</programlisting>
|
|||
for Each port is +8 hexadecimal from the previous port, thus
|
||||
the 100h, 108h, 110h... addresses.</para>
|
||||
|
||||
<programlisting>
|
||||
device sio1 at isa? port 0x100 tty flags 0x1005
|
||||
<programlisting>device sio1 at isa? port 0x100 tty flags 0x1005
|
||||
device sio2 at isa? port 0x108 tty flags 0x1005
|
||||
device sio3 at isa? port 0x110 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>
|
||||
(note that your irq and iomem settings may differ).</para>
|
||||
|
||||
<programlisting>
|
||||
device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||
<programlisting>device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||
</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
|
||||
<literal>ttyd</literal>. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
||||
<programlisting>ttyc0 "/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
|
||||
…
|
||||
|
@ -3005,16 +2999,14 @@ ttyc7 "/usr/libexec/getty std.38400" unknown on insecure</programlisting>
|
|||
<link linkend="kernelconfig-config">kernel configuration
|
||||
file</link>, changing the numbers as appropriate:</para>
|
||||
|
||||
<programlisting>
|
||||
device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
||||
<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
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
device si0</programlisting>
|
||||
<programlisting>device si0</programlisting>
|
||||
|
||||
<para>After adding the configuration entry, <link
|
||||
linkend="kernelconfig-building"> rebuild and install</link> your
|
||||
|
@ -3035,8 +3027,7 @@ device si0</programlisting>
|
|||
need to add lines like this to <link
|
||||
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||
<programlisting>ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||
</programlisting>
|
||||
|
||||
<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
|
||||
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
||||
|
||||
<programlisting>
|
||||
# First WD compatible controller
|
||||
<programlisting># First WD compatible controller
|
||||
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
||||
disk wd0 at wdc0 drive 0
|
||||
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
|
||||
(between []):</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
<programlisting># SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
#
|
||||
# aha: Adaptec 154x
|
||||
# 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
|
||||
this out.</para>
|
||||
|
||||
<programlisting>
|
||||
[driver for Adaptec 174x]
|
||||
<programlisting>[driver for Adaptec 174x]
|
||||
controller ahb0 at isa? bio irq 11 vector ahbintr
|
||||
|
||||
[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
|
||||
configuration file using a line like:</para>
|
||||
|
||||
<programlisting>
|
||||
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
||||
<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
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
<programlisting>{
|
||||
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
||||
"mx1", SC_ONE_LU
|
||||
}</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
|
||||
something like:</para>
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
<programlisting>{
|
||||
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
||||
"sd", SC_MORE_LUS
|
||||
}</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
|
||||
disabled by default:</para>
|
||||
|
||||
<programlisting>
|
||||
options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||
<programlisting>options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||
|
||||
<para>Check the man pages for the host adapter that you use. Or
|
||||
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).
|
||||
Build and install a new kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
*** 4831,4835 ****
|
||||
<programlisting>*** 4831,4835 ****
|
||||
};
|
||||
|
||||
! 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
|
||||
change tapes:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
||||
|
||||
usage()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -253,8 +253,7 @@
|
|||
need to add the following line to the password file (using the
|
||||
<command>vipw</command> command):</para>
|
||||
|
||||
<programlisting>
|
||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||
<programlisting>ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||
|
||||
<para>Anyone with network connectivity to your machine can now
|
||||
chose a media type of FTP and type in
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -253,8 +253,7 @@
|
|||
closely. For details of all the possible kernel options, see
|
||||
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
||||
#
|
||||
# For more information on this file, please read the handbook section on
|
||||
|
@ -282,8 +281,7 @@
|
|||
<literal>i386</literal>, <literal>alpha</literal>, or
|
||||
<literal>pc98</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
cpu I386_CPU
|
||||
<programlisting>cpu I386_CPU
|
||||
cpu I486_CPU
|
||||
cpu I586_CPU
|
||||
cpu I686_CPU</programlisting>
|
||||
|
@ -299,8 +297,7 @@ cpu I686_CPU</programlisting>
|
|||
<para>The Alpha architecture has different values for
|
||||
<literal>cpu_type</literal>. They include:</para>
|
||||
|
||||
<programlisting>
|
||||
cpu EV4
|
||||
<programlisting>cpu EV4
|
||||
cpu EV5</programlisting>
|
||||
|
||||
<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
|
||||
underneath or next to each option for more information.</para>
|
||||
|
||||
<programlisting>
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
<programlisting>#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||
|
||||
<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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
options INET #InterNETworking</programlisting>
|
||||
<programlisting>options INET #InterNETworking</programlisting>
|
||||
|
||||
<para>Networking support. Leave this in, even if you do not plan to
|
||||
be connected to a network. Most programs require at least loopback
|
||||
networking (i.e., making network connections within your PC), so
|
||||
this is essentially mandatory.</para>
|
||||
|
||||
<programlisting>
|
||||
options INET6 #IPv6 communications protocols</programlisting>
|
||||
<programlisting>options INET6 #IPv6 communications protocols</programlisting>
|
||||
|
||||
<para>This enables the IPv6 communication protocols.</para>
|
||||
|
||||
<programlisting>
|
||||
options FFS #Berkeley Fast Filesystem
|
||||
<programlisting>options FFS #Berkeley Fast Filesystem
|
||||
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
||||
|
||||
<para>This is the basic hard drive filesystem. Leave it in if you
|
||||
boot from the hard disk.</para>
|
||||
|
||||
<programlisting>
|
||||
options MFS #Memory Filesystem
|
||||
<programlisting>options MFS #Memory Filesystem
|
||||
options MD_ROOT #MD is a potential root device</programlisting>
|
||||
|
||||
<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
|
||||
<command>mount /tmp</command>.</para>
|
||||
|
||||
<programlisting>
|
||||
options NFS #Network Filesystem
|
||||
<programlisting>options NFS #Network Filesystem
|
||||
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
||||
|
||||
<para>The network filesystem. Unless you plan to mount partitions
|
||||
from a UNIX file server over TCP/IP, you can comment these
|
||||
out.</para>
|
||||
|
||||
<programlisting>
|
||||
options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||
<programlisting>options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||
|
||||
<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.
|
||||
|
@ -433,8 +423,7 @@ options MSDOSFS #MSDOS Filesystem</programlisting>
|
|||
unmount them (and does not require <literal>MSDOSFS</literal> at
|
||||
all).</para>
|
||||
|
||||
<programlisting>
|
||||
options CD9660 #ISO 9660 Filesystem
|
||||
<programlisting>options CD9660 #ISO 9660 Filesystem
|
||||
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
||||
|
||||
<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).
|
||||
Audio CDs do not need this filesystem.</para>
|
||||
|
||||
<programlisting>
|
||||
options PROCFS #Process filesystem</programlisting>
|
||||
<programlisting>options PROCFS #Process filesystem</programlisting>
|
||||
|
||||
<para>The process filesystem. This is a <quote>pretend</quote>
|
||||
filesystem mounted on <filename>/proc</filename> which allows
|
||||
programs like &man.ps.1; to give you more information on what
|
||||
processes are running.</para>
|
||||
|
||||
<programlisting>
|
||||
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||
<programlisting>options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||
|
||||
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
||||
act strangely if you comment this out.</para>
|
||||
|
||||
<programlisting>
|
||||
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||
<programlisting>options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||
|
||||
<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,
|
||||
|
@ -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 will have to raise it back up.</para>
|
||||
|
||||
<programlisting>
|
||||
options UCONSOLE #Allow users to grab the console</programlisting>
|
||||
<programlisting>options UCONSOLE #Allow users to grab the console</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -475,26 +460,22 @@ options UCONSOLE #Allow users to grab the console</programli
|
|||
<command>talk</command>, and any other messages you receive, as well
|
||||
as any console messages sent by the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
options USERCONFIG #boot -c editor</programlisting>
|
||||
<programlisting>options USERCONFIG #boot -c editor</programlisting>
|
||||
|
||||
<para>This option allows you to boot the configuration editor from the
|
||||
boot menu.</para>
|
||||
|
||||
<programlisting>
|
||||
options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||
<programlisting>options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||
|
||||
<para>This option allows you to boot the visual configuration editor
|
||||
from the boot menu.</para>
|
||||
|
||||
<programlisting>
|
||||
options KTRACE #ktrace(1) support</programlisting>
|
||||
<programlisting>options KTRACE #ktrace(1) support</programlisting>
|
||||
|
||||
<para>This enables kernel process tracing, which is useful in
|
||||
debugging.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||
<programlisting>options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||
|
||||
<para>This option provides for System V shared memory. The most
|
||||
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
|
||||
this.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||
<programlisting>options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||
|
||||
<para>Support for System V semaphores. Less commonly used but only
|
||||
adds a few hundred bytes to the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVMSG #SYSV-style message queues</programlisting>
|
||||
<programlisting>options SYSVMSG #SYSV-style message queues</programlisting>
|
||||
|
||||
<para>Support for System V messages. Again, only adds a few hundred
|
||||
bytes to the kernel.</para>
|
||||
|
@ -519,30 +498,26 @@ options SYSVMSG #SYSV-style message queues</programlisting>
|
|||
these System V facilities.</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
options P1003_1B #Posix P1003_1B real-time extentions
|
||||
<programlisting>options P1003_1B #Posix P1003_1B real-time extentions
|
||||
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
||||
|
||||
<para>Real-time extensions added in the 1993 POSIX. Certain
|
||||
applications in the ports collection use these (such as Star
|
||||
Office).</para>
|
||||
|
||||
<programlisting>
|
||||
options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||
<programlisting>options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||
|
||||
<para>This option enables ICMP error response bandwidth limiting. You
|
||||
typically want this option as it will help protect the machine from
|
||||
denial of service packet attacks.</para>
|
||||
|
||||
<programlisting>
|
||||
# To make an SMP kernel, the next two are needed
|
||||
<programlisting># To make an SMP kernel, the next two are needed
|
||||
#options SMP # Symmetric MultiProcessor Kernel
|
||||
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
||||
|
||||
<para>The above are both required for SMP support.</para>
|
||||
|
||||
<programlisting>
|
||||
# Optionally these may need tweaked, (defaults shown):
|
||||
<programlisting># Optionally these may need tweaked, (defaults shown):
|
||||
#options NCPU=2 # number of CPUs
|
||||
#options NBUS=4 # number of busses
|
||||
#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
|
||||
bus.</para>
|
||||
|
||||
<programlisting>
|
||||
# Floppy drives
|
||||
<programlisting># Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
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
|
||||
PCI ATA/ATAPI devices on modern machines.</para>
|
||||
|
||||
<programlisting>
|
||||
device atadisk # ATA disk drives</programlisting>
|
||||
<programlisting>device atadisk # ATA disk drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
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
|
||||
ATAPI CDROM drives.</para>
|
||||
|
||||
<programlisting>
|
||||
device atapifd # ATAPI floppy drives</programlisting>
|
||||
<programlisting>device atapifd # ATAPI floppy drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
ATAPI floppy drives.</para>
|
||||
|
||||
<programlisting>
|
||||
device atapist # ATAPI tape drives</programlisting>
|
||||
<programlisting>device atapist # ATAPI tape drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
ATAPI tape drives.</para>
|
||||
|
||||
<programlisting>
|
||||
options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||
<programlisting>options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||
|
||||
<para>This makes the controller number static (like the old driver) or
|
||||
else the device numbers are dynamically allocated.</para>
|
||||
|
||||
<programlisting>
|
||||
#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||
<programlisting>#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||
|
||||
<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
|
||||
off by default.</para>
|
||||
|
||||
<programlisting>
|
||||
# ATA and ATAPI devices
|
||||
<programlisting># ATA and ATAPI devices
|
||||
device ata0 at isa? port IO_WD1 irq 14
|
||||
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
||||
|
||||
<para>Use the above for older, non-PCI systems.</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI Controllers
|
||||
<programlisting># SCSI Controllers
|
||||
device ahb # EISA AHA1742 family
|
||||
device ahc # AHA2940 and onboard AIC7xxx devices
|
||||
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
|
||||
altogether.</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI peripherals
|
||||
<programlisting># SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
device da # Direct Access (disks)
|
||||
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
|
||||
you have only IDE hardware, you can remove them completely.</para>
|
||||
|
||||
<programlisting>
|
||||
# RAID controllers
|
||||
<programlisting># RAID controllers
|
||||
device ida # Compaq Smart RAID
|
||||
device amr # AMI MegaRAID
|
||||
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,
|
||||
you can comment them out or remove them.</para>
|
||||
|
||||
<programlisting>
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
<programlisting># atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||
|
||||
<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>psm</literal>).</para>
|
||||
|
||||
<programlisting>
|
||||
device atkbd0 at atkbdc? irq 1</programlisting>
|
||||
<programlisting>device atkbd0 at atkbdc? irq 1</programlisting>
|
||||
|
||||
<para>The <literal>atkbd</literal> driver, together with
|
||||
<literal>atkbdc</literal> controller, provides access to the AT 84
|
||||
keyboard or the AT enhanced keyboard which is connected to the AT
|
||||
keyboard controller.</para>
|
||||
|
||||
<programlisting>
|
||||
device psm0 at atkbdc? irq 12</programlisting>
|
||||
<programlisting>device psm0 at atkbdc? irq 12</programlisting>
|
||||
|
||||
<para>Use this device if your mouse plugs into the PS/2 mouse
|
||||
port.</para>
|
||||
|
@ -698,15 +660,13 @@ device psm0 at atkbdc? irq 12</programlisting>
|
|||
|
||||
<para>The video card driver.</para>
|
||||
|
||||
<programlisting>
|
||||
# splash screen/screen saver
|
||||
<programlisting># splash screen/screen saver
|
||||
pseudo-device splash</programlisting>
|
||||
|
||||
<para>Splash screen at start up! Screen savers require this
|
||||
too.</para>
|
||||
|
||||
<programlisting>
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
<programlisting># syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?</programlisting>
|
||||
|
||||
<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
|
||||
full-screen programs have trouble running under this console.</para>
|
||||
|
||||
<programlisting>
|
||||
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||
<programlisting># Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||
#device vt0 at isa?
|
||||
#options XSERVER # support for X server on a vt console
|
||||
#options FAT_CURSOR # start with block cursor
|
||||
|
@ -737,8 +696,7 @@ device sc0 at isa?</programlisting>
|
|||
device are often not available — <literal>vt100</literal>
|
||||
should be available on virtually any platform.</para>
|
||||
|
||||
<programlisting>
|
||||
# Floating point support - do not disable.
|
||||
<programlisting># Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||
|
||||
<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>
|
||||
optional.</para>
|
||||
|
||||
<programlisting>
|
||||
# Power management support (see LINT for more options)
|
||||
<programlisting># Power management support (see LINT for more options)
|
||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
||||
|
||||
<para>Advanced Power Management support. Useful for laptops.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCCARD (PCMCIA) support
|
||||
<programlisting># PCCARD (PCMCIA) support
|
||||
device card
|
||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||
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
|
||||
laptop.</para>
|
||||
|
||||
<programlisting>
|
||||
# Serial (COM) ports
|
||||
<programlisting># Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
# Parallel port
|
||||
<programlisting># Parallel port
|
||||
device ppc0 at isa? irq 7</programlisting>
|
||||
|
||||
<para>This is the ISA-bus parallel port interface.</para>
|
||||
|
||||
<programlisting>
|
||||
device ppbus # Parallel port bus (required)</programlisting>
|
||||
<programlisting>device ppbus # Parallel port bus (required)</programlisting>
|
||||
|
||||
<para>Provides support for the parallel port bus.</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt # Printer</programlisting>
|
||||
<programlisting>device lpt # Printer</programlisting>
|
||||
|
||||
<para>Support for parallel port printers.</para>
|
||||
|
||||
|
@ -810,26 +762,22 @@ device lpt # Printer</programlisting>
|
|||
support.</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
device plip # TCP/IP over parallel</programlisting>
|
||||
<programlisting>device plip # TCP/IP over parallel</programlisting>
|
||||
|
||||
<para>This is the driver for the parallel network interface.</para>
|
||||
|
||||
<programlisting>
|
||||
device ppi # Parallel port interface device</programlisting>
|
||||
<programlisting>device ppi # Parallel port interface device</programlisting>
|
||||
|
||||
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
||||
I/O.</para>
|
||||
|
||||
<programlisting>
|
||||
#device vpo # Requires scbus and da</programlisting>
|
||||
<programlisting>#device vpo # Requires scbus and da</programlisting>
|
||||
|
||||
<para>This is for an Iomega Zip drive. It requires
|
||||
<literal>scbus</literal> and <literal>da</literal> support. Best
|
||||
performance is achieved with ports in EPP 1.9 mode.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCI Ethernet NICs.
|
||||
<programlisting># PCI Ethernet NICs.
|
||||
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
||||
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
||||
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
|
||||
these not present in your system.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
||||
<programlisting># PCI Ethernet NICs that use the common MII bus controller code.
|
||||
device miibus # MII bus support</programlisting>
|
||||
|
||||
<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
|
||||
by an individual driver</para>
|
||||
|
||||
<programlisting>
|
||||
device dc # DEC/Intel 21143 and various workalikes
|
||||
<programlisting>device dc # DEC/Intel 21143 and various workalikes
|
||||
device rl # RealTek 8129/8139
|
||||
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
# ISA Ethernet NICs.
|
||||
<programlisting># ISA Ethernet NICs.
|
||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||
device ex
|
||||
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
|
||||
supported by which driver.</para>
|
||||
|
||||
<programlisting>
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
<programlisting># Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback</programlisting>
|
||||
|
||||
<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
|
||||
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device ether # Ethernet support</programlisting>
|
||||
<programlisting>pseudo-device ether # Ethernet support</programlisting>
|
||||
|
||||
<para><literal>ether</literal> is only needed if you have an Ethernet
|
||||
card. It includes generic Ethernet protocol code.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||
<programlisting>pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||
|
||||
<para><literal>sl</literal> is for SLIP support. This has been almost
|
||||
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>
|
||||
specifies how many simultaneous SLIP sessions to support.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||
<programlisting>pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||
|
||||
<para>This is for kernel PPP support for dial-up connections. There
|
||||
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
|
||||
connections to support.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device tun # Packet tunnel.</programlisting>
|
||||
<programlisting>pseudo-device tun # Packet tunnel.</programlisting>
|
||||
|
||||
<para>This is used by the userland PPP software. The
|
||||
<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,
|
||||
up to a maximum of 256.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||
<programlisting>pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||
|
||||
<para>Memory disk pseudo-devices.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||
<programlisting>pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||
|
||||
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
||||
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
||||
tunneling.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||
<programlisting>pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||
|
||||
<para>This pseudo-device captures packets that are sent to it and
|
||||
diverts them to the IPv4/IPv6 translation daemon.</para>
|
||||
|
||||
<programlisting>
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
<programlisting># The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
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;
|
||||
program.</para>
|
||||
|
||||
<programlisting>
|
||||
# USB support
|
||||
<programlisting># USB support
|
||||
#device uhci # UHCI PCI->USB interface
|
||||
#device ohci # OHCI PCI->USB interface
|
||||
#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
|
||||
to add is:</para>
|
||||
|
||||
<programlisting>
|
||||
device acd0</programlisting>
|
||||
<programlisting>device acd0</programlisting>
|
||||
|
||||
<para>This means that you should look for some entries that start with
|
||||
<filename>acd0</filename> in the <filename>/dev</filename>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -272,8 +272,7 @@
|
|||
and edit your configuration file. Uncomment (or add, if it does not
|
||||
exist) the following line</para>
|
||||
|
||||
<programlisting>
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||
<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,
|
||||
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
|
||||
|
||||
<programlisting>
|
||||
options DDB</programlisting>
|
||||
<programlisting>options DDB</programlisting>
|
||||
|
||||
to your config file, and rebuild. (See <link
|
||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -37,8 +37,7 @@
|
|||
concept in mind, i.e., the default can be overridden by the
|
||||
config option. This is usually done with something like:</para>
|
||||
|
||||
<programlisting>
|
||||
#ifndef THIS_OPTION
|
||||
<programlisting>#ifndef THIS_OPTION
|
||||
#define THIS_OPTION (some_default_value)
|
||||
#endif /* THIS_OPTION */</programlisting>
|
||||
|
||||
|
@ -52,8 +51,7 @@
|
|||
<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>
|
||||
|
||||
<programlisting>
|
||||
#ifdef THAT_OPTION
|
||||
<programlisting>#ifdef THAT_OPTION
|
||||
|
||||
[your code here]
|
||||
|
||||
|
@ -68,8 +66,7 @@
|
|||
is at least a single <literal>#ifdef</literal> referencing it...
|
||||
However, it's unlikely that many people would put</para>
|
||||
|
||||
<programlisting>
|
||||
options notyet,notdef</programlisting>
|
||||
<programlisting>options notyet,notdef</programlisting>
|
||||
|
||||
<para>in their config file, and then wonder why the kernel compilation
|
||||
falls over. <!-- smiley -->:-)</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -79,8 +79,7 @@
|
|||
Language Code, Country Code, and Encoding. Locale names are
|
||||
constructed from these parts as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||
<programlisting><replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||
|
||||
<sect2>
|
||||
<title>Language and Country Codes</title>
|
||||
|
@ -231,8 +230,7 @@
|
|||
directory which has both variables set for Latin-1
|
||||
encoding:</para>
|
||||
|
||||
<programlisting>
|
||||
german:German User:\
|
||||
<programlisting>german:German User:\
|
||||
:charset=ISO-8859-1:\
|
||||
:lang=de_DE.ISO_8859-1:</programlisting>
|
||||
|
||||
|
@ -242,8 +240,7 @@ german:German User:\
|
|||
more variables set because some software does not respect
|
||||
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
||||
|
||||
<programlisting>
|
||||
#Users who do not wish to use monetary units or time formats
|
||||
<programlisting>#Users who do not wish to use monetary units or time formats
|
||||
#of Taiwan can manually change each variable
|
||||
taiwan:Taiwanese User:\
|
||||
lang=zh_TW.Big5:\
|
||||
|
@ -268,8 +265,7 @@ taiwan:Taiwanese User:\
|
|||
correct language user's class. Make sure these settings
|
||||
appear in <filename>/etc/login.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||
<programlisting><replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||
:charset=<replaceable>MIME_charset</replaceable>:\
|
||||
:lang=<replaceable>locale_name</replaceable>:\
|
||||
:tc=default:</programlisting>
|
||||
|
@ -277,8 +273,7 @@ taiwan:Taiwanese User:\
|
|||
<para>So sticking with our previous example using Latin-1, it
|
||||
would look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
german:German Users Accounts:\
|
||||
<programlisting>german:German Users Accounts:\
|
||||
:charset=ISO-8859-1:\
|
||||
:lang=de_DE.ISO_8859-1:\
|
||||
:tc=default:</programlisting>
|
||||
|
@ -288,8 +283,7 @@ german:German Users Accounts:\
|
|||
<para>Use <command>vipw</command> to add new users, and make
|
||||
the entry look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
||||
<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>
|
||||
|
||||
|
@ -348,14 +342,12 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
|||
|
||||
<para>In <filename>/etc/profile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
||||
|
||||
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
||||
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||
|
||||
<para>Or:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||
|
||||
<para>Depending on your shell (see above).</para>
|
||||
</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
|
||||
language in question with:</para>
|
||||
|
||||
<programlisting>
|
||||
font8x16=<replaceable>font_name</replaceable>
|
||||
<programlisting>font8x16=<replaceable>font_name</replaceable>
|
||||
font8x14=<replaceable>font_name</replaceable>
|
||||
font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||
|
||||
|
@ -405,8 +394,7 @@ font8x8=<replaceable>font_name</replaceable></programlisting>
|
|||
<literal>Console</literal>. Alternatively, you can add the
|
||||
following to <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
scrnmap=<replaceable>screenmap_name</replaceable>
|
||||
<programlisting>scrnmap=<replaceable>screenmap_name</replaceable>
|
||||
keymap=<replaceable>keymap_name</replaceable>
|
||||
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,
|
||||
insert the following line into the kernel config.</para>
|
||||
|
||||
<programlisting>
|
||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
|
||||
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
<envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||
<programlisting><envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||
|
||||
<para>In <literal>C</literal>-based shells:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||
<programlisting><envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
@ -701,8 +686,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
|||
<para>Put the following lines into your
|
||||
<filename>~/.login_conf</filename> file:</para>
|
||||
|
||||
<programlisting>
|
||||
me:My Account:\
|
||||
<programlisting>me:My Account:\
|
||||
:charset=KOI8-R:\
|
||||
:lang=ru_RU.KOI8-R:</programlisting>
|
||||
|
||||
|
@ -718,16 +702,14 @@ me:My Account:\
|
|||
<para>Add the following to your kernel configuration
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Use following settings in
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
keymap="ru.koi8-r"
|
||||
<programlisting>keymap="ru.koi8-r"
|
||||
scrnmap="koi8-r2cp866"
|
||||
font8x16="cp866b-8x16"
|
||||
font8x14="cp866-8x14"
|
||||
|
@ -756,8 +738,7 @@ font8x8="cp866-8x8"</programlisting>
|
|||
A Russian printer <filename>/etc/printcap</filename> entry
|
||||
should look like:</para>
|
||||
|
||||
<programlisting>
|
||||
lp|Russian local line printer:\
|
||||
<programlisting>lp|Russian local line printer:\
|
||||
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
||||
: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
|
||||
for Russian filenames in mounted MS-DOS filesystems:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
||||
<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
|
||||
<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
|
||||
<literal>FontPath</literal> entries:</para>
|
||||
|
||||
<programlisting>
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
XkbLayout "ru"
|
||||
<programlisting>XkbLayout "ru"
|
||||
XkbOptions "grp:caps_toggle"</programlisting>
|
||||
|
||||
<para>For XFree86 v4.*:</para>
|
||||
|
||||
<programlisting>
|
||||
Option "XkbLayout" "ru"
|
||||
<programlisting>Option "XkbLayout" "ru"
|
||||
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||
|
||||
<para>Also make sure that <literal>XkbDisable</literal> is
|
||||
|
@ -855,13 +832,11 @@ Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
|||
|
||||
<para>For XFree86 v3.*:</para>
|
||||
|
||||
<programlisting>
|
||||
XkbVariant "winkeys"</programlisting>
|
||||
<programlisting>XkbVariant "winkeys"</programlisting>
|
||||
|
||||
<para>For XFree86 v4.*:</para>
|
||||
|
||||
<programlisting>
|
||||
Option "XkbVariant" "winkeys"</programlisting>
|
||||
<programlisting>Option "XkbVariant" "winkeys"</programlisting>
|
||||
|
||||
<note>
|
||||
<para>The Russian XKB keyboard may not work with old XFree86
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -68,8 +68,7 @@
|
|||
<para>This, in turn, triggers the following action in
|
||||
<filename>/etc/rc.i386</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
# Start the Linux binary compatibility if requested.
|
||||
<programlisting># Start the Linux binary compatibility if requested.
|
||||
#
|
||||
case ${linux_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
|
@ -261,8 +260,7 @@ Abort</screen>
|
|||
<filename>/compat/linux/etc/host.conf</filename> file
|
||||
containing:</para>
|
||||
|
||||
<programlisting>
|
||||
order hosts, bind
|
||||
<programlisting>order hosts, bind
|
||||
multi on</programlisting>
|
||||
|
||||
<para>The order here specifies that <filename>/etc/hosts</filename>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -172,13 +172,11 @@
|
|||
|
||||
<para>As a good workaround, you can place the line:
|
||||
|
||||
<programlisting>
|
||||
search foo.bar.edu bar.edu</programlisting>
|
||||
<programlisting>search foo.bar.edu bar.edu</programlisting>
|
||||
|
||||
instead of the previous:
|
||||
|
||||
<programlisting>
|
||||
domain foo.bar.edu</programlisting>
|
||||
<programlisting>domain foo.bar.edu</programlisting>
|
||||
|
||||
into your <filename>/etc/resolv.conf</filename>. However, make
|
||||
sure that the search order does not go beyond the
|
||||
|
@ -196,8 +194,7 @@ domain foo.bar.edu</programlisting>
|
|||
<answer>
|
||||
<para>This is answered in the sendmail FAQ as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||
<programlisting>* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||
|
||||
553 relay.domain.net config error: mail loops back to myself
|
||||
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
|
||||
service for your domain. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
bigco.com. MX 10 bigco.com.
|
||||
<programlisting>bigco.com. MX 10 bigco.com.
|
||||
MX 20 smalliap.com.</programlisting>
|
||||
|
||||
<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
|
||||
script.</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
# Put me in /usr/local/bin/pppbigco
|
||||
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
||||
/usr/sbin/ppp -direct pppbigco</programlisting>
|
||||
|
@ -271,8 +266,7 @@ bigco.com. MX 10 bigco.com.
|
|||
|
||||
<para>Message stolen from the &a.isp;.</para>
|
||||
|
||||
<programlisting>
|
||||
> we provide the secondary MX for a customer. The customer connects to
|
||||
<programlisting>> we provide the secondary MX for a customer. The customer connects 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
|
||||
> 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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
freefall MX 30 mail.crl.net
|
||||
<programlisting>freefall MX 30 mail.crl.net
|
||||
freefall MX 40 agora.rdrop.com
|
||||
freefall MX 10 freefall.FreeBSD.org
|
||||
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
|
||||
your DNS configuration like so:</para>
|
||||
|
||||
<programlisting>
|
||||
example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||
<programlisting>example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
||||
|
||||
<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
|
||||
should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
customer1.org MX 10 mail.myhost.com</programlisting>
|
||||
<programlisting>customer1.org MX 10 mail.myhost.com</programlisting>
|
||||
|
||||
<para>You do <emphasis>not</emphasis> need an A record if you only
|
||||
want to handle email for the domain.</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1778,8 +1778,7 @@
|
|||
simply list the collections, one per line (in this case,
|
||||
only one line):</para>
|
||||
|
||||
<programlisting>
|
||||
src-all</programlisting>
|
||||
<programlisting>src-all</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2016,8 +2015,7 @@ src-all</programlisting>
|
|||
add this line at the beginning of our
|
||||
<filename>supfile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default tag=.</programlisting>
|
||||
<programlisting>*default tag=.</programlisting>
|
||||
|
||||
<para>There is an important special case that comes into play
|
||||
if you specify neither a <literal>tag=</literal> field nor a
|
||||
|
@ -2044,8 +2042,7 @@ src-all</programlisting>
|
|||
use a fictional FreeBSD distribution site,
|
||||
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default host=cvsup666.FreeBSD.org</programlisting>
|
||||
<programlisting>*default host=cvsup666.FreeBSD.org</programlisting>
|
||||
|
||||
<para>You will need to change the host to one that actually
|
||||
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
|
||||
correct specification:</para>
|
||||
|
||||
<programlisting>
|
||||
*default prefix=/usr</programlisting>
|
||||
<programlisting>*default prefix=/usr</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2081,8 +2077,7 @@ src-all</programlisting>
|
|||
already received. We will use the standard base directory,
|
||||
<filename>/usr/local/etc/cvsup</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default base=/usr/local/etc/cvsup</programlisting>
|
||||
<programlisting>*default base=/usr/local/etc/cvsup</programlisting>
|
||||
|
||||
<para>This setting is used by default if it is not specified
|
||||
in the <filename>supfile</filename>, so we actually do not
|
||||
|
@ -2102,8 +2097,7 @@ src-all</programlisting>
|
|||
needs to be present in the
|
||||
<filename>supfile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||
<programlisting>*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||
|
||||
<para><literal>release=cvs</literal> indicates that the server
|
||||
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
|
||||
example:</para>
|
||||
|
||||
<programlisting>
|
||||
*default tag=.
|
||||
<programlisting>*default tag=.
|
||||
*default host=cvsup666.FreeBSD.org
|
||||
*default prefix=/usr
|
||||
*default base=/usr/local/etc/cvsup
|
||||
|
@ -3755,8 +3748,7 @@ src-all</programlisting>
|
|||
<para>The path to the files are:
|
||||
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
||||
|
||||
<programlisting>
|
||||
stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||
<programlisting>stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||
130.237.234.43 #hot.stacken.kth.se
|
||||
130.237.237.230 #fishburger.stacken.kth.se
|
||||
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -101,8 +101,7 @@
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||
<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
|
||||
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
|
||||
to add</para>
|
||||
|
||||
<programlisting>
|
||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
|
||||
<para>to your kernel configuration. You may need to change the
|
||||
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
|
||||
following:</para>
|
||||
|
||||
<programlisting>
|
||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
Installed devices:
|
||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1187,8 +1187,7 @@ F/U/FPM/mYbWNUELgSmN/YkSwWLGgfjcCObTwgd0FOW7XZuJ71R7ytBEn5kDt3bc
|
|||
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
||||
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
||||
=L8Lf
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1414,8 +1413,7 @@ gVMMZjZ7QiiO1LGl6IIiKRtJIXi45PcHtYgSZlXKflqPHhEIrOhFwpV+C7uL5jnv
|
|||
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
||||
0E4T
|
||||
=Qwmg
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1476,8 +1474,7 @@ cJowZeBj8Ss1QZsVzeyfAAQLA/0ZwjK242AXkXjibtzEfZqK7l22D9xIT+ajc6zP
|
|||
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
||||
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
||||
=rQiL
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -21,8 +21,7 @@
|
|||
maintained by a person or group of persons, they can communicate this
|
||||
fact to the world by adding a
|
||||
|
||||
<programlisting>
|
||||
MAINTAINER= email-addresses</programlisting>
|
||||
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||
|
||||
line to the <filename>Makefile</filename>s covering this portion of the
|
||||
source tree.</para>
|
||||
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
|||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||
|
||||
<programlisting>
|
||||
This directory contains virgin sources of the original distribution files
|
||||
<programlisting>This directory contains virgin sources of the original distribution files
|
||||
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
|
||||
official-patch versions must be imported. Please remember to import with
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -133,8 +133,7 @@
|
|||
configuration file. It should have the following line somewhere
|
||||
in it:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device tun 1</programlisting>
|
||||
<programlisting>pseudo-device tun 1</programlisting>
|
||||
|
||||
<para>If this line is not present, you will need to add it to the
|
||||
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
|
||||
order):</para>
|
||||
|
||||
<programlisting>
|
||||
hosts
|
||||
<programlisting>hosts
|
||||
bind</programlisting>
|
||||
|
||||
<para>These instruct the resolver to first look in the file
|
||||
|
@ -270,8 +268,7 @@ bind</programlisting>
|
|||
role="ipaddr">10.0.0.1</hostid>,
|
||||
<filename>/etc/hosts</filename> should contain:</para>
|
||||
|
||||
<programlisting>
|
||||
127.0.0.1 localhost.bar.com localhost
|
||||
<programlisting>127.0.0.1 localhost.bar.com localhost
|
||||
127.0.0.1 localhost.bar.com.
|
||||
10.0.0.1 foo.bar.com foo
|
||||
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
|
||||
the following line(s):</para>
|
||||
|
||||
<programlisting>
|
||||
domain <replaceable>bar.com</replaceable>
|
||||
<programlisting>domain <replaceable>bar.com</replaceable>
|
||||
nameserver <replaceable>x.x.x.x</replaceable>
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
1 default:
|
||||
<programlisting>1 default:
|
||||
2 set device /dev/cuaa0
|
||||
3 set speed 115200
|
||||
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
|
||||
Addresses</link>, with the following change:</para>
|
||||
|
||||
<programlisting>
|
||||
9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
||||
<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
|
||||
reference. Indentation of at least one space is
|
||||
|
@ -583,8 +577,7 @@ protocol: ppp</screen>
|
|||
used. The following entry will delete the existing bogus
|
||||
routes, and create correct ones:</para>
|
||||
|
||||
<programlisting>
|
||||
1 provider:
|
||||
<programlisting>1 provider:
|
||||
2 delete ALL
|
||||
3 add 0 0 HISADDR</programlisting>
|
||||
|
||||
|
@ -655,8 +648,7 @@ protocol: ppp</screen>
|
|||
also confirm that the <filename>/etc/rc.conf</filename> file
|
||||
contains the following:</para>
|
||||
|
||||
<programlisting>
|
||||
gateway="YES"</programlisting>
|
||||
<programlisting>gateway="YES"</programlisting>
|
||||
|
||||
<sect5>
|
||||
<title>Which getty?</title>
|
||||
|
@ -702,8 +694,7 @@ gateway="YES"</programlisting>
|
|||
sections of the configuration file using the
|
||||
<command>allow</command> command:</para>
|
||||
|
||||
<programlisting>
|
||||
allow users fred mary</programlisting>
|
||||
<programlisting>allow users fred mary</programlisting>
|
||||
|
||||
<para>If this command is used in the <literal>default</literal>
|
||||
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
|
||||
following:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
||||
CALLEDAS="$IDENT"
|
||||
TTY=`tty`
|
||||
|
@ -745,8 +735,7 @@ exec /usr/sbin/ppp -direct $IDENT</programlisting>
|
|||
<username>pchilds</username> (remember don't directly edit
|
||||
the password file, use <command>vipw</command>).</para>
|
||||
|
||||
<programlisting>
|
||||
pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||
<programlisting>pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||
|
||||
<para>Create a <filename>/home/ppp</filename> directory that
|
||||
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
|
||||
contain something along the lines of:</para>
|
||||
|
||||
<programlisting>
|
||||
default:
|
||||
<programlisting>default:
|
||||
set debug phase lcp chat
|
||||
set timeout 0
|
||||
|
||||
|
@ -823,8 +811,7 @@ ttyd1:
|
|||
<username>sam</username>, and <username>mary</username>
|
||||
example.</para>
|
||||
|
||||
<programlisting>
|
||||
fred:
|
||||
<programlisting>fred:
|
||||
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
||||
|
||||
sam:
|
||||
|
@ -839,8 +826,7 @@ mary:
|
|||
role="ipaddr">203.14.101.0</hostid> class C via the
|
||||
client's ppp link.</para>
|
||||
|
||||
<programlisting>
|
||||
fred:
|
||||
<programlisting>fred:
|
||||
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
||||
|
||||
sam:
|
||||
|
@ -876,8 +862,7 @@ mary:
|
|||
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
||||
file has the following in it:</para>
|
||||
|
||||
<programlisting>
|
||||
/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||
<programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||
|
||||
<para>This will tell <command>mgetty</command> to run the
|
||||
<filename>ppp-pap-dialup</filename> script for detected PPP
|
||||
|
@ -887,8 +872,7 @@ mary:
|
|||
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
||||
following (the file should be executable):</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||
|
||||
<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
|
||||
above.</para>
|
||||
|
||||
<programlisting>
|
||||
pap:
|
||||
<programlisting>pap:
|
||||
enable pap
|
||||
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
||||
enable proxy</programlisting>
|
||||
|
@ -909,8 +892,7 @@ pap:
|
|||
alternatively add the following option to authenticate users
|
||||
via PAP from <filename>/etc/password</filename> file.</para>
|
||||
|
||||
<programlisting>
|
||||
enable passwdauth</programlisting>
|
||||
<programlisting>enable passwdauth</programlisting>
|
||||
|
||||
<para>If you wish to assign some users a static IP number, you
|
||||
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
|
||||
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
enable msext
|
||||
<programlisting>enable msext
|
||||
set ns 203.14.100.1 203.14.100.2
|
||||
set nbns 203.14.100.5</programlisting>
|
||||
|
||||
<para>And for PPP version 2 and above:</para>
|
||||
|
||||
<programlisting>
|
||||
accept dns
|
||||
<programlisting>accept dns
|
||||
set dns 203.14.100.1 203.14.100.2
|
||||
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>
|
||||
sections, the following alterations must be made:</para>
|
||||
|
||||
<programlisting>
|
||||
7 set login
|
||||
<programlisting>7 set login
|
||||
…
|
||||
12 set authname <replaceable>MyUserName</replaceable>
|
||||
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
|
||||
add an additional line, such as:</para>
|
||||
|
||||
<programlisting>
|
||||
15 accept PAP</programlisting>
|
||||
<programlisting>15 accept PAP</programlisting>
|
||||
|
||||
<para>or</para>
|
||||
|
||||
<programlisting>
|
||||
15 accept CHAP</programlisting>
|
||||
<programlisting>15 accept CHAP</programlisting>
|
||||
|
||||
<para>to make it obvious that this is the intention, but
|
||||
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
|
||||
following line to your configuration:</para>
|
||||
|
||||
<programlisting>
|
||||
set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||
<programlisting>set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||
|
||||
<para>This will tell PPP to listen to the specified unix-domain
|
||||
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
|
||||
<literal>hostname=</literal> line is set, e.g.:</para>
|
||||
|
||||
<programlisting>
|
||||
hostname="foo.bar.com"</programlisting>
|
||||
<programlisting>hostname="foo.bar.com"</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -1073,8 +1048,7 @@ hostname="foo.bar.com"</programlisting>
|
|||
make sure the <devicename>tun0</devicename> device is added to
|
||||
the list, otherwise remove it.</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||
<programlisting>network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||
|
||||
<note>
|
||||
<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.
|
||||
This file should contain the line:</para>
|
||||
|
||||
<programlisting>
|
||||
ppp -auto mysystem</programlisting>
|
||||
<programlisting>ppp -auto mysystem</programlisting>
|
||||
|
||||
<para>This script is executed at network configuration time,
|
||||
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
|
||||
following line in your <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
router_enable="NO"</programlisting>
|
||||
<programlisting>router_enable="NO"</programlisting>
|
||||
|
||||
<para>It is important that the <command>routed</command> daemon is
|
||||
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.
|
||||
You may try:</para>
|
||||
|
||||
<programlisting>
|
||||
sendmail_flags="-bd"</programlisting>
|
||||
<programlisting>sendmail_flags="-bd"</programlisting>
|
||||
|
||||
<para>The downside of this is that you must force
|
||||
<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
|
||||
<filename>ppp.linkup</filename> to do this automatically:</para>
|
||||
|
||||
<programlisting>
|
||||
1 provider:
|
||||
<programlisting>1 provider:
|
||||
2 delete ALL
|
||||
3 add 0 0 HISADDR
|
||||
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
|
||||
connect to CISCO terminal server PPP line.</para>
|
||||
|
||||
<programlisting>
|
||||
crtscts # enable hardware flow control
|
||||
<programlisting>crtscts # enable hardware flow control
|
||||
modem # modem control line
|
||||
noipdefault # remote PPP server must supply your IP address.
|
||||
# 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
|
||||
all 3 stages automatically:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
|
@ -1361,8 +1329,7 @@ pppd /dev/tty01 19200</programlisting>
|
|||
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
||||
to disconnect the PPP line:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
echo 'pppd running: PID=' ${pid-NONE}
|
||||
|
@ -1401,8 +1367,7 @@ ifconfig ppp0</programlisting>
|
|||
<filename>/etc/ppp/kermit.hup</filename>, which should
|
||||
contain:</para>
|
||||
|
||||
<programlisting>
|
||||
set line /dev/tty01 ; put your modem device here
|
||||
<programlisting>set line /dev/tty01 ; put your modem device here
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
|
@ -1429,8 +1394,7 @@ exit</programlisting>
|
|||
|
||||
<para><filename>/etc/ppp/options</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/cuaa1 115200
|
||||
<programlisting>/dev/cuaa1 115200
|
||||
|
||||
crtscts # enable hardware flow control
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||
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
|
||||
similar to the following:</para>
|
||||
|
||||
<programlisting>
|
||||
crtscts # Hardware flow control
|
||||
<programlisting>crtscts # Hardware flow control
|
||||
netmask 255.255.255.0 # netmask ( not required )
|
||||
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
||||
# 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
|
||||
server:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
|
@ -1521,8 +1482,7 @@ pppd /dev/tty01 19200</programlisting>
|
|||
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
||||
stop the server:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
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
|
||||
autoanswer mode on your modem. It should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
set line /dev/tty01
|
||||
<programlisting>set line /dev/tty01
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
|
@ -1575,8 +1534,7 @@ exit</programlisting>
|
|||
in this script; you will also need to change the input statement
|
||||
depending on responses from your modem and remote host.</para>
|
||||
|
||||
<programlisting>
|
||||
;
|
||||
<programlisting>;
|
||||
; put the com line attached to the modem here:
|
||||
;
|
||||
set line /dev/tty01
|
||||
|
@ -1756,8 +1714,7 @@ exit 1
|
|||
<para>Here is an example of a working
|
||||
<filename>ppp.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
default: # or name_of_service_provider
|
||||
<programlisting>default: # or name_of_service_provider
|
||||
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
||||
set mru 1492
|
||||
set mtu 1492
|
||||
|
@ -1797,8 +1754,7 @@ papchap:
|
|||
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
ppp_enable="YES"
|
||||
<programlisting>ppp_enable="YES"
|
||||
ppp_mode="ddial"
|
||||
ppp_nat="YES"
|
||||
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
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 1</programlisting>
|
||||
<programlisting>pseudo-device sl 1</programlisting>
|
||||
|
||||
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
||||
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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
127.0.0.1 localhost loghost
|
||||
<programlisting>127.0.0.1 localhost loghost
|
||||
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
||||
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
||||
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
|
||||
says:</para>
|
||||
|
||||
<programlisting>
|
||||
hostname=<quote>myname.my.domain</quote></programlisting>
|
||||
<programlisting>hostname=<quote>myname.my.domain</quote></programlisting>
|
||||
|
||||
<para>You should give it your full Internet
|
||||
hostname.</para>
|
||||
|
@ -1885,34 +1838,29 @@ hostname=<quote>myname.my.domain</quote></programlisting>
|
|||
<para>Add sl0 to the list of network interfaces by
|
||||
changing the line that says:</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces="lo0"</programlisting>
|
||||
<programlisting>network_interfaces="lo0"</programlisting>
|
||||
|
||||
<para>to:</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||
<programlisting>network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Set the startup flags of sl0 by adding a
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||
<programlisting>ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Designate the default router by changing the
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
defaultrouter=<quote>NO</quote></programlisting>
|
||||
<programlisting>defaultrouter=<quote>NO</quote></programlisting>
|
||||
|
||||
<para>to:</para>
|
||||
|
||||
<programlisting>
|
||||
defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||
<programlisting>defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</step>
|
||||
|
@ -1921,8 +1869,7 @@ defaultrouter=<quote>slip-gateway</quote></programlisting>
|
|||
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
||||
contains:</para>
|
||||
|
||||
<programlisting>
|
||||
domain HIP.Berkeley.EDU
|
||||
<programlisting>domain HIP.Berkeley.EDU
|
||||
nameserver 128.32.136.9
|
||||
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
|
||||
script like this:</para>
|
||||
|
||||
<programlisting>
|
||||
# kermit setup
|
||||
<programlisting># kermit setup
|
||||
set modem hayes
|
||||
set line /dev/modem
|
||||
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
|
||||
line):</para>
|
||||
|
||||
<programlisting>
|
||||
Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||
<programlisting>Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||
|
||||
<para>When <username>Shelmerg</username> logs in,
|
||||
<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
|
||||
reads:</para>
|
||||
|
||||
<programlisting>
|
||||
Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
<programlisting>Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
|
||||
<para><command>sliplogin</command> will find that matching line,
|
||||
hook the serial line into the next available SLIP interface,
|
||||
and then execute <filename>/etc/sliphome/slip.login</filename>
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
<programlisting>/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
|
||||
<para>If all goes well,
|
||||
<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>)
|
||||
is a line that reads:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 2</programlisting>
|
||||
<programlisting>pseudo-device sl 2</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2293,8 +2235,7 @@ pseudo-device sl 2</programlisting>
|
|||
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# login local-addr remote-addr mask opt1 opt2
|
||||
# (normal,compress,noicmp)
|
||||
#
|
||||
|
@ -2371,8 +2312,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
||||
file looks like this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)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>
|
||||
file will need to look something like this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||
|
||||
|
@ -2457,8 +2396,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
example of a basic
|
||||
<filename>slip.logout</filename> script:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# slip.logout
|
||||
|
||||
|
@ -2474,8 +2412,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
||||
ARP entry for the SLIP client:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)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
|
||||
FreeBSD SLIP server:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# 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
|
||||
#
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -482,8 +482,7 @@ sio2: type 16550A</screen>
|
|||
<para>If you want interrupt-driven mode, add the
|
||||
<literal>irq</literal> specifier:</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||
<programlisting>device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||
|
||||
<para>Where <replaceable>N</replaceable> is the IRQ
|
||||
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
|
||||
<literal>irq</literal> specifier:</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||
<programlisting>device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</step>
|
||||
|
@ -553,8 +551,7 @@ device lpt0 at isa? port? tty vector lptintr</programlisting>
|
|||
will need a more sophisticated test. A small PostScript
|
||||
program, such as the following, will suffice:</para>
|
||||
|
||||
<programlisting>
|
||||
%!PS
|
||||
<programlisting>%!PS
|
||||
100 100 moveto 300 300 lineto stroke
|
||||
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
||||
(Is this thing working?) show
|
||||
|
@ -650,8 +647,7 @@ showpage</programlisting>
|
|||
<para>Edit the file <filename>/etc/remote</filename>. Add
|
||||
the following entry:</para>
|
||||
|
||||
<programlisting>
|
||||
printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
||||
<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
|
||||
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
|
||||
no parity:</para>
|
||||
|
||||
<programlisting>
|
||||
printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||
<programlisting>printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||
</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
|
||||
laser printer):</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose
|
||||
#
|
||||
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>
|
||||
added:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - no header pages anywhere
|
||||
#
|
||||
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
|
||||
<literal>sd</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added spooling directories
|
||||
#
|
||||
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
|
||||
the additions to <filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - identified what devices to use
|
||||
#
|
||||
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>
|
||||
flags:</para>
|
||||
|
||||
<programlisting>
|
||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
:sh:sd=/var/spool/lpd/bamboo:\
|
||||
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
||||
</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
|
||||
favorite text editor:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# if-simple - Simple text input filter for lpd
|
||||
# Installed in /usr/local/libexec/if-simple
|
||||
|
@ -1190,8 +1179,7 @@ exit 2</programlisting>
|
|||
printers we have so far in the example
|
||||
<filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added text filter
|
||||
#
|
||||
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
|
||||
results should look like the following:</para>
|
||||
|
||||
<programlisting>
|
||||
!"#$%&'()*+,-./01234
|
||||
<programlisting>!"#$%&'()*+,-./01234
|
||||
"#$%&'()*+,-./012345
|
||||
#$%&'()*+,-./0123456
|
||||
$%&'()*+,-./01234567
|
||||
|
@ -1636,8 +1623,7 @@ $%&'()*+,-./01234567
|
|||
PostScript printer's entry in
|
||||
<filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
:if=/usr/local/libexec/psif:</programlisting>
|
||||
<programlisting>:if=/usr/local/libexec/psif:</programlisting>
|
||||
|
||||
<para>You should also specify the <literal>rw</literal> capability;
|
||||
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
|
||||
script as the text filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# psif - Print PostScript or plain text on a PostScript printer
|
||||
# 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
|
||||
Ghostscript supports.)</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
||||
# 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
|
||||
<literal>if</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
:if=/usr/local/libexec/hpif:</programlisting>
|
||||
<programlisting>:if=/usr/local/libexec/hpif:</programlisting>
|
||||
|
||||
<para>That is it. You can type <command>lpr plain.text</command> and
|
||||
<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
|
||||
<literal>bamboo</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added df filter for bamboo
|
||||
#
|
||||
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
|
||||
script:</para>
|
||||
|
||||
<programlisting>
|
||||
#!bin/sh
|
||||
<programlisting>#!bin/sh
|
||||
#
|
||||
# psdf - DVI to PostScript printer filter
|
||||
# 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
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpvf - Convert GIF files into HP/PCL, then print
|
||||
# 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
|
||||
entry for a printer using the above filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
<literal>bamboo</literal>:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# pstf - Convert groff's troff data into PS, then print.
|
||||
# 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
|
||||
on a parallel port, we would use this script instead:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# pstf - Convert groff's troff data into PS, then print.
|
||||
# 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
|
||||
<filename>/etc/printcap</filename> to enable the filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:tf=/usr/local/libexec/pstf:</programlisting>
|
||||
<programlisting>:tf=/usr/local/libexec/pstf:</programlisting>
|
||||
|
||||
<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
|
||||
print plain text. We will install it for the printer
|
||||
<literal>teak</literal>:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hprf - FORTRAN text filter for LaserJet 3si:
|
||||
# Installed in /usr/local/libexec/hprf
|
||||
|
@ -2053,8 +2028,7 @@ exit 2</programlisting>
|
|||
<filename>/etc/printcap</filename> for the printer
|
||||
<literal>teak</literal> to enable this filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:rf=/usr/local/libexec/hprf:</programlisting>
|
||||
<programlisting>:rf=/usr/local/libexec/hprf:</programlisting>
|
||||
|
||||
<para>Here is one final, somewhat complex example. We will add a
|
||||
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
|
||||
filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:df=/usr/local/libexec/hpdf:</programlisting>
|
||||
<programlisting>:df=/usr/local/libexec/hpdf:</programlisting>
|
||||
|
||||
<para>Now, for the hard part: making the filter. For that, we need
|
||||
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
||||
|
@ -2103,8 +2076,7 @@ exit 2</programlisting>
|
|||
|
||||
<para>Here, finally, is the filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpdf - Print DVI data on HP/PCL printer
|
||||
# Installed in /usr/local/libexec/hpdf
|
||||
|
@ -2347,8 +2319,7 @@ exit 0</programlisting>
|
|||
Here is an example output filter for Hewlett Packard PCL-compatible
|
||||
printers:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
||||
# 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
|
||||
enabled header pages and added the above output filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
named outline from host rose):</para>
|
||||
|
||||
<programlisting>
|
||||
k ll ll
|
||||
<programlisting> k ll ll
|
||||
k l l
|
||||
k l l
|
||||
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
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||
<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.
|
||||
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
|
||||
simple PostScript header page:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# make-ps-header - make a PostScript header page on stdout
|
||||
# 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
|
||||
document, modified to make a header page:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# psdf - DVI to PostScript printer filter
|
||||
# Installed in /usr/local/libexec/psdf
|
||||
|
@ -2832,8 +2798,7 @@ done
|
|||
<literal>teak</literal>; we have added entries for the two printers
|
||||
on the host rose:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /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
|
||||
accounting, etc.).</para>
|
||||
|
||||
<programlisting>
|
||||
#!/usr/bin/perl
|
||||
<programlisting>#!/usr/bin/perl
|
||||
#
|
||||
# netprint - Text filter for printer attached to network
|
||||
# Installed in /usr/local/libexec/netprint
|
||||
|
@ -2942,8 +2906,7 @@ exit 0;</programlisting>
|
|||
printer is scrivener. Here is the text filter for the
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
||||
# 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>
|
||||
capability:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
||||
#
|
||||
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
|
||||
<literal>teak</literal>):</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid - no multiple copies for local
|
||||
# printer teak or remote printer bamboo
|
||||
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
|
||||
<hostid>rose</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - restricted group for bamboo
|
||||
#
|
||||
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
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /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
|
||||
<hostid>rose</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
orchid
|
||||
<programlisting>orchid
|
||||
violet
|
||||
madrigal.fishbaum.de</programlisting>
|
||||
|
||||
|
@ -3232,8 +3190,7 @@ madrigal.fishbaum.de</programlisting>
|
|||
directory for this printer; here is <hostid>bamboo</hostid>'s
|
||||
entry:</para>
|
||||
|
||||
<programlisting>
|
||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
||||
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
||||
:if=/usr/local/libexec/psif:\
|
||||
|
@ -3363,8 +3320,7 @@ boo/minfree</userinput></screen>
|
|||
the printer, it then writes an accounting entry in the accounting
|
||||
file. The entries look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
2.00 rose:andy
|
||||
<programlisting>2.00 rose:andy
|
||||
3.00 rose:kelly
|
||||
3.00 orchid:mary
|
||||
5.00 orchid:mary
|
||||
|
@ -4332,8 +4288,7 @@ cfA013rose dequeued
|
|||
<filename>/usr/local/libexec/if-simple</filename> prints a
|
||||
form feed after it sends the job to the printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# if-simple - Simple text input filter for lpd
|
||||
# Installed in /usr/local/libexec/if-simple
|
||||
|
@ -4352,8 +4307,7 @@ exit 2</programlisting>
|
|||
<listitem>
|
||||
<para>You got the following on paper:</para>
|
||||
|
||||
<programlisting>
|
||||
!"#$%&'()*+,-./01234
|
||||
<programlisting>!"#$%&'()*+,-./01234
|
||||
"#$%&'()*+,-./012345
|
||||
#$%&'()*+,-./0123456</programlisting>
|
||||
|
||||
|
@ -4435,8 +4389,7 @@ exit 2</programlisting>
|
|||
eject the last page of the job. It should work with
|
||||
nearly all Hewlett Packard printers.</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
||||
# Installed in /usr/local/libexec/hpif
|
||||
|
@ -4453,8 +4406,7 @@ exit 2</programlisting>
|
|||
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
||||
above script as its text filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
<literal>lf</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||
<programlisting>rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||
:sh:sd=/var/spool/lpd/rattan:\
|
||||
:lp=/dev/lpt0:\
|
||||
:if=/usr/local/libexec/if-simple:\
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1094,8 +1094,7 @@ Enter secret password: <userinput><secret password></userinput>
|
|||
<para>Here is a sample configuration file which illustrates the
|
||||
three most common sorts of configuration statements:</para>
|
||||
|
||||
<programlisting>
|
||||
permit internet 192.168.0.0 255.255.0.0
|
||||
<programlisting>permit internet 192.168.0.0 255.255.0.0
|
||||
permit user fnord
|
||||
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
|
||||
must have the following options compiled into your kernel:</para>
|
||||
|
||||
<programlisting>
|
||||
options IPSEC #IP security
|
||||
<programlisting>options IPSEC #IP security
|
||||
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
||||
|
||||
<sect2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -490,8 +490,7 @@
|
|||
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
||||
we add the new entry:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||
ttyd5</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -528,8 +527,7 @@ ttyd5</programlisting>
|
|||
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
||||
the two terminals in which we are interested):</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/ttys</filename> file:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -586,8 +583,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
|||
Here again is the <filename>/etc/ttys</filename> file. We have
|
||||
turned each port <literal>on</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -635,8 +631,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
|||
<filename>/etc/ttys</filename> file, with comments added to describe
|
||||
where the terminals are:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1054,8 +1049,7 @@ sio3: type 16550A</screen>
|
|||
the name of your system, but in upper-case letters. Edit the file,
|
||||
and change the device lines:</para>
|
||||
|
||||
<programlisting>
|
||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||
<programlisting>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 sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
||||
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
|
||||
unless it is missing under your version of FreeBSD:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
||||
#
|
||||
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
|
||||
speed of 19.2 Kbps:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Additions for a V.32bis Modem
|
||||
#
|
||||
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
|
||||
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Additions for a V.32bis or V.34 Modem
|
||||
# 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
|
||||
matching-speed configuration:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||
|
||||
<para>The first item in the above line is the device special file for
|
||||
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
|
||||
might look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||
|
||||
<para>If your modem is locked at a different data rate, substitute
|
||||
the appropriate name for the
|
||||
|
@ -1400,8 +1389,7 @@ ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
|||
<literal>V19200</literal> starting point), your
|
||||
<filename>ttys</filename> entry might look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||
</sect4>
|
||||
</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,
|
||||
<filename>/etc/rc.serial</filename> reads:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# Serial port initial configuration
|
||||
|
||||
|
@ -1437,8 +1424,7 @@ stty -f /dev/cuai01 crtscts</programlisting>
|
|||
<filename>/etc/rc.local</filename> to set the
|
||||
<literal>crtscts</literal> flag on the devices:</para>
|
||||
|
||||
<programlisting>
|
||||
# Set serial ports to use RTS/CTS flow control
|
||||
<programlisting># Set serial ports to use RTS/CTS flow control
|
||||
stty -f /dev/ttyd0 crtscts
|
||||
stty -f /dev/ttyd1 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
|
||||
the modem:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||
|
||||
<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
|
||||
the speed used to issue the commands:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&B1&W</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1576,8 +1560,7 @@ AT&B1&W</programlisting>
|
|||
issue the commands, but allow the serial port rate to vary for
|
||||
non-error-corrected connections:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&B2&W</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1793,8 +1776,7 @@ AT&B2&W</programlisting>
|
|||
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
||||
then put in the following line:</para>
|
||||
|
||||
<programlisting>
|
||||
cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||
<programlisting>cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -1827,8 +1809,7 @@ cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
|||
capability files like <filename>/etc/remote</filename>. Escape it
|
||||
with a backslash:</para>
|
||||
|
||||
<programlisting>
|
||||
pn=\@</programlisting>
|
||||
<programlisting>pn=\@</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1837,8 +1818,7 @@ pn=\@</programlisting>
|
|||
<para>Put what is called a <quote>generic</quote> entry in your
|
||||
<filename>/etc/remote</filename> file. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
tip115200|Dial any phone number at 115200 bps:\
|
||||
<programlisting>tip115200|Dial any phone number at 115200 bps:\
|
||||
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
||||
tip57600|Dial any phone number at 57600 bps:\
|
||||
: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>,
|
||||
use a generic cu entry:</para>
|
||||
|
||||
<programlisting>
|
||||
cu115200|Use cu to dial any number at 115200bps:\
|
||||
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
|
||||
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/remote</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
pain|pain.deep13.com|Forrester's machine:\
|
||||
<programlisting>pain|pain.deep13.com|Forrester's machine:\
|
||||
:cm=CONNECT pain\n:tc=deep13:
|
||||
muffin|muffin.deep13.com|Frank's machine:\
|
||||
: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
|
||||
<literal>pn</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
big-university:\
|
||||
<programlisting>big-university:\
|
||||
:pn=\@:tc=dialout
|
||||
dialout:\
|
||||
: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
|
||||
<filename>/etc/phones</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
big-university 5551111
|
||||
<programlisting>big-university 5551111
|
||||
big-university 5551112
|
||||
big-university 5551113
|
||||
big-university 5551114</programlisting>
|
||||
|
@ -1944,8 +1920,7 @@ big-university 5551114</programlisting>
|
|||
specifying the following in your <filename>$HOME/.tiprc</filename>
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
force=<single-char></programlisting>
|
||||
<programlisting>force=<single-char></programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1961,8 +1936,7 @@ force=<single-char></programlisting>
|
|||
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
||||
type CTRL+2 and CTRL+A a lot:</para>
|
||||
|
||||
<programlisting>
|
||||
force=^^
|
||||
<programlisting>force=^^
|
||||
raisechar=^^</programlisting>
|
||||
|
||||
<para>The ^^ is SHIFT+CTRL+6.</para>
|
||||
|
@ -2184,8 +2158,7 @@ raisechar=^^</programlisting>
|
|||
|
||||
<para>Example:</para>
|
||||
|
||||
<programlisting>
|
||||
device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||
<programlisting>device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||
|
||||
<para>See &man.sio.4; for more details.</para>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -101,8 +101,7 @@
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||
<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
|
||||
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
|
||||
to add</para>
|
||||
|
||||
<programlisting>
|
||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
|
||||
<para>to your kernel configuration. You may need to change the
|
||||
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
|
||||
following:</para>
|
||||
|
||||
<programlisting>
|
||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
Installed devices:
|
||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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" [
|
||||
|
@ -92,8 +92,7 @@
|
|||
<para>The minimal <filename>Makefile</filename> would look something
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
# New ports collection makefile for: oneko
|
||||
<programlisting># New ports collection makefile for: oneko
|
||||
# Date created: 5 December 1994
|
||||
# Whom: asami
|
||||
#
|
||||
|
@ -140,8 +139,7 @@ USE_IMAKE= yes
|
|||
should begin with a capital, and end without a period. Here
|
||||
is an example:</para>
|
||||
|
||||
<programlisting>
|
||||
A cat chasing a mouse all over the screen</programlisting>
|
||||
<programlisting>A cat chasing a mouse all over the screen</programlisting>
|
||||
</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
|
||||
file, as in:</para>
|
||||
|
||||
<programlisting>
|
||||
This is a port of oneko, in which a cat chases a poor mouse all over
|
||||
<programlisting>This is a port of oneko, in which a cat chases a poor mouse all over
|
||||
the screen.
|
||||
:
|
||||
(etc.)
|
||||
|
@ -193,8 +190,7 @@ asami@cs.berkeley.edu</programlisting>
|
|||
|
||||
<para>Here is a small example:</para>
|
||||
|
||||
<programlisting>
|
||||
bin/oneko
|
||||
<programlisting>bin/oneko
|
||||
lib/X11/app-defaults/Oneko
|
||||
lib/X11/oneko/cat1.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
|
||||
ports collection.</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.10</programlisting>
|
||||
|
||||
<para><makevar>PKGNAME</makevar> becomes
|
||||
|
@ -847,8 +842,7 @@ PORTVERSION= 0.10</programlisting>
|
|||
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
||||
accordingly.</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSIOn= 0.10
|
||||
PORTREVISION= 1</programlisting>
|
||||
|
||||
|
@ -868,8 +862,7 @@ PORTREVISION= 1</programlisting>
|
|||
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
||||
from the makefile).</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.2
|
||||
PORTEPOCH= 1</programlisting>
|
||||
|
||||
|
@ -880,8 +873,7 @@ PORTEPOCH= 1</programlisting>
|
|||
<makevar>PORTEPOCH</makevar> never decreases, the version
|
||||
variables are now:</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.3
|
||||
PORTEPOCH= 1</programlisting>
|
||||
|
||||
|
@ -1006,8 +998,7 @@ PORTEPOCH= 1</programlisting>
|
|||
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
||||
archive. Here is an example:</para>
|
||||
|
||||
<programlisting>
|
||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||
<programlisting>MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||
MASTER_SITE_SUBDIR= applications</programlisting>
|
||||
|
||||
<para>These variables are defined in
|
||||
|
@ -1136,8 +1127,7 @@ MASTER_SITE_SUBDIR= applications</programlisting>
|
|||
|
||||
<para>For example,</para>
|
||||
|
||||
<programlisting>
|
||||
RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||
<programlisting>RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
||||
|
||||
<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
|
||||
instance
|
||||
|
||||
<programlisting>
|
||||
BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||
<programlisting>BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||
|
||||
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
|
||||
<filename>Makefile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
INSTALLS_SHLIB= yes
|
||||
<programlisting>INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||
|
||||
<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
|
||||
<filename>bsd.port.mk</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
||||
<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
|
||||
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
|
||||
read:</para>
|
||||
|
||||
<programlisting>
|
||||
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||
<programlisting>${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||
|
||||
<para>In <filename>pkg-plist</filename> it should read;</para>
|
||||
|
||||
<programlisting>
|
||||
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||
<programlisting>@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
||||
|
||||
<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
|
||||
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= xdvi
|
||||
<programlisting>PORTNAME= xdvi
|
||||
PORTVERSION= 17
|
||||
PKGNAMEPREFIX= ja-
|
||||
PKGNAMESUFFIX= ${RESOLUTION}
|
||||
|
@ -1582,8 +1566,7 @@ RESOLUTION?= 300
|
|||
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
||||
<filename>xdvi118/Makefile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
RESOLUTION= 118
|
||||
<programlisting>RESOLUTION= 118
|
||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
||||
|
||||
.include ${MASTERDIR}/Makefile</programlisting>
|
||||
|
@ -1688,8 +1671,7 @@ MASTERDIR= ${.CURDIR}/../xdvi300
|
|||
|
||||
<para>Here is an example that puts it all together.</para>
|
||||
|
||||
<programlisting>
|
||||
MAN1= foo.1
|
||||
<programlisting>MAN1= foo.1
|
||||
MAN3= bar.3
|
||||
MAN4= baz.4
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
${PREFIX}/man/man1/foo.1.gz
|
||||
<programlisting>${PREFIX}/man/man1/foo.1.gz
|
||||
${PREFIX}/man/ja/man1/foo.1.gz
|
||||
${PREFIX}/share/foobar/man/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
|
||||
patch:</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||
<programlisting>--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
|
@ -1884,8 +1864,7 @@ Options:
|
|||
<filename>man</filename> subdirectory to rebuild the info
|
||||
pages.</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
||||
@@ -184,7 +184,7 @@
|
||||
# Subdirectories to make recursively. `lisp' is not included
|
||||
|
@ -1925,8 +1904,7 @@ Options:
|
|||
otherwise mucking around with the <filename>dir</filename>
|
||||
file.</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
||||
@@ -368,14 +368,8 @@
|
||||
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
|
||||
file, so search extensively.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: pkg-plist
|
||||
<programlisting>Index: pkg-plist
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||
retrieving revision 1.15
|
||||
|
@ -1982,8 +1959,7 @@ diff -u -r1.15 pkg-plist
|
|||
<command>install-info</command> automatically creates this
|
||||
file if it does not exist.)</para>
|
||||
|
||||
<programlisting>
|
||||
Index: Makefile
|
||||
<programlisting>Index: Makefile
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
||||
retrieving revision 1.26
|
||||
|
@ -2008,8 +1984,7 @@ diff -u -r1.26 Makefile
|
|||
<literal>@unexec</literal> for
|
||||
<command>pkg_delete</command>.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: pkg-plist
|
||||
<programlisting>Index: pkg-plist
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||
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
|
||||
version-specific subdirectory, you can put something like
|
||||
|
||||
<programlisting>
|
||||
OCTAVE_VERSION= 2.0.13
|
||||
<programlisting>OCTAVE_VERSION= 2.0.13
|
||||
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||
|
||||
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
|
||||
example:</para>
|
||||
|
||||
<programlisting>
|
||||
post-install:
|
||||
<programlisting>post-install:
|
||||
strip ${PREFIX}/bin/xdl</programlisting>
|
||||
|
||||
<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
|
||||
file is already included; if not, add the code:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
<programlisting>#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
#include <sys/param.h>
|
||||
#endif</programlisting>
|
||||
|
||||
|
@ -2454,8 +2426,7 @@ post-install:
|
|||
<para>Another way is to use the GNU Autoconf style of doing
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
<programlisting>#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif</programlisting>
|
||||
|
||||
|
@ -2466,8 +2437,7 @@ post-install:
|
|||
<para>Once you have <filename>sys/param.h</filename> included, you may
|
||||
use:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||
<programlisting>#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2475,8 +2445,7 @@ post-install:
|
|||
|
||||
<para>Use:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||
<programlisting>#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2519,8 +2488,7 @@ post-install:
|
|||
system. If you need more granularity in detecting FreeBSD
|
||||
systems since 2.0-RELEASE you can use the following:</para>
|
||||
|
||||
<programlisting>
|
||||
#if __FreeBSD__ >= 2
|
||||
<programlisting>#if __FreeBSD__ >= 2
|
||||
#include <osreldate.h>
|
||||
# if __FreeBSD_version >= 199504
|
||||
/* 2.0.5+ release specific code here */
|
||||
|
@ -3156,8 +3124,7 @@ post-install:
|
|||
<para>Here are some examples of things you can write after
|
||||
<filename>bsd.port.pre.mk</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
# no need to compile lang/perl5 if perl5 is already in system
|
||||
<programlisting># no need to compile lang/perl5 if perl5 is already in system
|
||||
.if ${OSVERSION} > 300003
|
||||
BROKEN= perl is in system
|
||||
.endif
|
||||
|
@ -3196,8 +3163,7 @@ post-install:
|
|||
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
||||
<filename>/etc/make.conf</filename>, like this:</para>
|
||||
|
||||
<programlisting>
|
||||
post-install:
|
||||
<programlisting>post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${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
|
||||
pathname of <command>less</command>, use the compiler flag:
|
||||
|
||||
<programlisting>
|
||||
-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||
<programlisting>-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||
|
||||
or
|
||||
|
||||
<programlisting>
|
||||
-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||
<programlisting>-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||
|
||||
if this is an X port, instead of
|
||||
<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
|
||||
before you can delete parent directories.</para>
|
||||
|
||||
<programlisting>
|
||||
:
|
||||
<programlisting> :
|
||||
lib/X11/oneko/pixmaps/cat.xpm
|
||||
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
|
||||
remove only empty directories without warning.</para>
|
||||
|
||||
<programlisting>
|
||||
@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||
<programlisting>@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||
|
||||
<para>This will neither print any error messages nor cause
|
||||
<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
|
||||
99.</para>
|
||||
|
||||
<programlisting>
|
||||
majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||
<programlisting>majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
||||
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
|
||||
|
@ -3588,8 +3549,7 @@ vpopmail:*:89:89::0:0:User &:/usr/local/vpopmail:/nonexistent</programlisting>
|
|||
linkend="porting-portlint">portlint</link> to check the
|
||||
<filename>Makefile</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
[the header...just to make it easier for us to identify the ports.]
|
||||
<programlisting>[the header...just to make it easier for us to identify the ports.]
|
||||
# New ports collection makefile for: xdvi
|
||||
[the "version required" line is only needed when the PORTVERSION
|
||||
variable is not specific enough to describe the port.]
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</author>
|
||||
</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
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
################################################################
|
||||
<programlisting>################################################################
|
||||
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
||||
#
|
||||
# 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
|
||||
add 0 0 127.2.2.2
|
||||
################################################################
|
||||
# End of /etc/ppp/ppp.conf
|
||||
</programlisting>
|
||||
# End of /etc/ppp/ppp.conf</programlisting>
|
||||
|
||||
This file, taken verbatim from a working system, has three relevant
|
||||
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 -->
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [
|
||||
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
||||
|
@ -230,8 +230,7 @@
|
|||
your locale):</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).
|
||||
</programlisting>
|
||||
<programlisting>font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<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 -->
|
||||
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
|
||||
|
@ -899,8 +899,7 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls
|
||||
</programlisting>
|
||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<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 -->
|
||||
|
||||
<!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>
|
||||
|
||||
<programlisting>foo: foo.c
|
||||
cc -o foo foo.c
|
||||
</programlisting>
|
||||
cc -o foo foo.c</programlisting>
|
||||
|
||||
<para>It consists of two lines, a dependency line and a creation
|
||||
line.</para>
|
||||
|
@ -1114,8 +1113,7 @@ free(foo);
|
|||
cc -o foo foo.c
|
||||
|
||||
install:
|
||||
cp foo /home/me
|
||||
</programlisting>
|
||||
cp foo /home/me</programlisting>
|
||||
|
||||
<para>We can tell make which target we want to make by
|
||||
typing:</para>
|
||||
|
@ -1168,8 +1166,7 @@ install:
|
|||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||
|
||||
.include <bsd.port.mk>
|
||||
</programlisting>
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
||||
<para>Now, if we go to the directory for this port and type
|
||||
<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
|
||||
for it. This involves adding a line like</para>
|
||||
|
||||
<programlisting> * Make: (make). The GNU Make utility.
|
||||
</programlisting>
|
||||
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||
|
||||
<para>to the file. Once you have done this, you can type
|
||||
<userinput>info</userinput> and then select
|
||||
|
@ -1390,8 +1386,7 @@ main() {
|
|||
int bazz(int anint) {
|
||||
printf("You gave me %d\n", anint);
|
||||
return anint;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This program sets <symbol>i</symbol> to be
|
||||
<literal>5</literal> and passes it to a function
|
||||
|
@ -1447,8 +1442,7 @@ main() {
|
|||
|
||||
i = 5;
|
||||
printf("This is my program\n");
|
||||
<lineannotation>&hellip</>
|
||||
</programlisting>
|
||||
<lineannotation>&hellip</></programlisting>
|
||||
|
||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||
|
@ -2170,8 +2164,7 @@ in font-lock-auto-mode-list"
|
|||
("\\.lsp$" . lisp-mode)
|
||||
("\\.wiz$" . whizbang-mode)
|
||||
("\\.scm$" . scheme-mode)
|
||||
<lineannotation>…</>
|
||||
</programlisting>
|
||||
<lineannotation>…</></programlisting>
|
||||
|
||||
<para>This means that Emacs will automatically go into
|
||||
<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
|
||||
(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 of modes to always start in font-lock-mode")
|
||||
</programlisting>
|
||||
"List of modes to always start in font-lock-mode")</programlisting>
|
||||
|
||||
<para>This means that Emacs will always enable
|
||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -60,8 +60,7 @@
|
|||
</para>
|
||||
|
||||
<para>Skeleton Layout of a kernel module</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* KLD Skeleton
|
||||
* 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_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);
|
||||
</programlisting>
|
||||
DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
|
||||
|
||||
|
||||
<sect2>
|
||||
<title>Makefile</title>
|
||||
<para>FreeBSD provides a makefile include that you can use
|
||||
to quickly compile your kernel addition.</para>
|
||||
<programlisting>
|
||||
SRCS=skeleton.c
|
||||
<programlisting>SRCS=skeleton.c
|
||||
KMOD=skeleton
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
</programlisting>
|
||||
.include <bsd.kmod.mk></programlisting>
|
||||
|
||||
|
||||
<para>Simply running <command>make</command> with
|
||||
|
@ -165,8 +161,7 @@ KMOD=skeleton
|
|||
<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
|
||||
it.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple `echo' pseudo-device KLD
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -323,8 +318,7 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
|
|||
return(err);
|
||||
}
|
||||
|
||||
DEV_MODULE(echo,echo_loader,NULL);
|
||||
</programlisting>
|
||||
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
|
||||
|
||||
<para>To install this driver you will first need to make a node on
|
||||
your filesystem with a command such as : </para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -15,8 +15,7 @@
|
|||
<para>Information here about how the PCI bus code iterates
|
||||
through the unattached devices and see if a newly loaded kld
|
||||
will attach to any of them.</para>
|
||||
<programlisting>
|
||||
/*
|
||||
<programlisting>/*
|
||||
* Simple KLD to play with the PCI functions.
|
||||
*
|
||||
* Murray Stokely
|
||||
|
@ -200,8 +199,7 @@ static driver_t mypci_driver = {
|
|||
|
||||
static devclass_t mypci_devclass;
|
||||
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);
|
||||
</programlisting>
|
||||
DRIVER_MODULE(mypci, pci, mypci_driver, mypci_devclass, 0, 0);</programlisting>
|
||||
|
||||
<para>Additional Resources
|
||||
<itemizedlist>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -89,14 +89,12 @@
|
|||
<para>A typical SIM driver needs to include the following
|
||||
CAM-related header files:</para>
|
||||
|
||||
<programlisting>
|
||||
#include <cam/cam.h>
|
||||
<programlisting>#include <cam/cam.h>
|
||||
#include <cam/cam_ccb.h>
|
||||
#include <cam/cam_sim.h>
|
||||
#include <cam/cam_xpt_sim.h>
|
||||
#include <cam/cam_debug.h>
|
||||
#include <cam/scsi/scsi_all.h>
|
||||
</programlisting>
|
||||
#include <cam/scsi/scsi_all.h></programlisting>
|
||||
|
||||
<para>The first thing each SIM driver must do is register itself
|
||||
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
|
||||
allocate the queue of requests associated with this SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_devq *devq;
|
||||
<programlisting> struct cam_devq *devq;
|
||||
|
||||
if(( devq = cam_simq_alloc(SIZE) )==NULL) {
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
that the SIM driver can handle in parallel on one SCSI
|
||||
card. Commonly it can be calculated as:</para>
|
||||
|
||||
<programlisting>
|
||||
SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
||||
</programlisting>
|
||||
<programlisting>SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET</programlisting>
|
||||
|
||||
<para>Next we create a descriptor of our SIM:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_sim *sim;
|
||||
<programlisting> struct cam_sim *sim;
|
||||
|
||||
if(( sim = cam_sim_alloc(action_func, poll_func, driver_name,
|
||||
softc, unit, max_dev_transactions,
|
||||
max_tagged_dev_transactions, devq) )==NULL) {
|
||||
cam_simq_free(devq);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Note that if we are not able to create a SIM descriptor we
|
||||
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
|
||||
adapter:</para>
|
||||
|
||||
<programlisting>
|
||||
if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
<programlisting> if(xpt_bus_register(sim, bus_number) != CAM_SUCCESS) {
|
||||
cam_sim_free(sim, /*free_devq*/ TRUE);
|
||||
error; /* some code to handle the error */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If there is one <structName>devq</structName> structure per
|
||||
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
|
||||
and avoid problems with the future memory shortage:</para>
|
||||
|
||||
<programlisting>
|
||||
struct cam_path *path;
|
||||
<programlisting> struct cam_path *path;
|
||||
|
||||
if(xpt_create_path(&path, /*periph*/NULL,
|
||||
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->sim = sim;
|
||||
</programlisting>
|
||||
softc->sim = sim;</programlisting>
|
||||
|
||||
<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
|
||||
control block for this type of request:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_setasync csa;
|
||||
<programlisting> struct ccb_setasync csa;
|
||||
|
||||
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
|
||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||
csa.event_enable = AC_LOST_DEVICE;
|
||||
csa.callback = xxx_async;
|
||||
csa.callback_arg = sim;
|
||||
xpt_action((union ccb *)&csa);
|
||||
</programlisting>
|
||||
xpt_action((union ccb *)&csa);</programlisting>
|
||||
|
||||
<para>Now we take a look at the <function>xxx_action()</function>
|
||||
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
|
||||
switch:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
<programlisting> struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);
|
||||
struct ccb_hdr *ccb_h = &ccb->ccb_h;
|
||||
int unit = cam_sim_unit(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;
|
||||
xpt_done(ccb);
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>As can be seen from the default case (if an unknown command
|
||||
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
|
||||
meaningful names in the driver, like:</para>
|
||||
|
||||
<programlisting>
|
||||
#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */
|
||||
</programlisting>
|
||||
<programlisting>#define ccb_some_meaningful_name sim_priv.entries[0].bytes
|
||||
#define ccb_hcb spriv_ptr1 /* for hardware control block */</programlisting>
|
||||
|
||||
<para>The most common initiator mode requests are:</para>
|
||||
<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
|
||||
sitting in the queue:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_scsiio *csio = &ccb->csio;
|
||||
<programlisting> struct ccb_scsiio *csio = &ccb->csio;
|
||||
|
||||
if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Also we check that the device is supported at all by our
|
||||
controller:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
<programlisting> if(ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID
|
||||
|| cch_h->target_id == OUR_SCSI_CONTROLLERS_OWN_ID) {
|
||||
ccb_h->status = CAM_TID_INVALID;
|
||||
xpt_done(ccb);
|
||||
|
@ -604,8 +583,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
ccb_h->status = CAM_LUN_INVALID;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then allocate whatever data structures (such as
|
||||
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
|
||||
mark it as queued.</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
<programlisting> struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);
|
||||
|
||||
if(hcb == NULL) {
|
||||
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;
|
||||
ccb_h->status |= CAM_SIM_QUEUED;
|
||||
</programlisting>
|
||||
ccb_h->status |= CAM_SIM_QUEUED;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -639,14 +615,12 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
devices to set the maximal mutually supported bus width,
|
||||
synchronous rate and offset.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
<programlisting> hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;
|
||||
generate_identify_message(hcb);
|
||||
if( ccb_h->tag_action != CAM_TAG_ACTION_NONE )
|
||||
generate_unique_tag_message(hcb, ccb_h->tag_action);
|
||||
if( !target_negotiated(hcb) )
|
||||
generate_negotiation_messages(hcb);
|
||||
</programlisting>
|
||||
generate_negotiation_messages(hcb);</programlisting>
|
||||
|
||||
<para>Then set up the SCSI command. The command storage may be
|
||||
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
|
||||
that.</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
<programlisting> if(ccb_h->flags & CAM_CDB_POINTER) {
|
||||
/* CDB is a pointer */
|
||||
if(!(ccb_h->flags & CAM_CDB_PHYS)) {
|
||||
/* CDB pointer is virtual */
|
||||
|
@ -689,8 +662,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
/* CDB is in the ccb (buffer) */
|
||||
hcb->cmd = vtobus(csio->cdb_io.cdb_bytes);
|
||||
}
|
||||
hcb->cmdlen = csio->cdb_len;
|
||||
</programlisting>
|
||||
hcb->cmdlen = csio->cdb_len;</programlisting>
|
||||
|
||||
<para>Now it's time to set up the data. Again, the data storage
|
||||
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
|
||||
transfer:</para>
|
||||
|
||||
<programlisting>
|
||||
int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
<programlisting> int dir = (ccb_h->flags & CAM_DIR_MASK);
|
||||
|
||||
if (dir == CAM_DIR_NONE)
|
||||
goto end_data;
|
||||
</programlisting>
|
||||
goto end_data;</programlisting>
|
||||
|
||||
<para>Then we check if the data is in one chunk or in a
|
||||
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
|
||||
implemented, it's actively used by CAM.</para>
|
||||
|
||||
<programlisting>
|
||||
int rv;
|
||||
<programlisting> int rv;
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
end_data:
|
||||
</programlisting>
|
||||
end_data:</programlisting>
|
||||
|
||||
<para>If disconnection is disabled for this CCB we pass this
|
||||
information to the hcb:</para>
|
||||
|
||||
<programlisting>
|
||||
if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(ccb_h->flags & CAM_DIS_DISCONNECT)
|
||||
hcb_disable_disconnect(hcb);</programlisting>
|
||||
|
||||
<para>If the controller is able to run REQUEST SENSE command all
|
||||
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
|
||||
interrupt handler (or timeout handler).</para>
|
||||
|
||||
<programlisting>
|
||||
ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
<programlisting> ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,
|
||||
(ccb_h->timeout * hz) / 1000); /* convert milliseconds to ticks */
|
||||
put_hcb_into_hardware_queue(hcb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>And here is a possible implementation of the function
|
||||
returning CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)
|
||||
{
|
||||
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 & ~(CAM_STATUS_MASK|CAM_SIM_QUEUED));
|
||||
xpt_done(ccb);
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
</listitem>
|
||||
|
||||
<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
|
||||
CAM_SCSI_BUS_RESET. Like:</para>
|
||||
|
||||
<programlisting>
|
||||
int targ, lun;
|
||||
<programlisting> int targ, lun;
|
||||
struct xxx_hcb *h, *hh;
|
||||
struct ccb_trans_settings neg;
|
||||
struct cam_path *path;
|
||||
|
@ -907,8 +868,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
|
||||
/* report the event */
|
||||
xpt_async(AC_BUS_RESET, softc->wpath, NULL);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
check that abort applies to a SCSI transaction:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb *abort_ccb;
|
||||
<programlisting> struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
if(abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
|
||||
ccb->ccb_h.status = CAM_UA_ABORT;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
in search for one associated with this CCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h;
|
||||
<programlisting> struct xxx_hcb *hcb, *h;
|
||||
|
||||
hcb = NULL;
|
||||
|
||||
|
@ -969,8 +926,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
return;
|
||||
}
|
||||
|
||||
hcb=found_hcb;
|
||||
</programlisting>
|
||||
hcb=found_hcb;</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
it.</para>
|
||||
|
||||
<programlisting>
|
||||
int hstatus;
|
||||
<programlisting> int hstatus;
|
||||
|
||||
/* shown as a function, in case special action is needed to make
|
||||
* this flag visible to hardware
|
||||
|
@ -1000,8 +955,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
case HCB_COMPLETED:
|
||||
/* this is an easy case */
|
||||
free_hcb_and_ccb_done(hcb, abort_ccb, CAM_REQ_ABORTED);
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the CCB is being transferred right now we would like to
|
||||
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
|
||||
yet).</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_BEING_TRANSFERRED:
|
||||
<programlisting> case HCB_BEING_TRANSFERRED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
}
|
||||
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<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
|
||||
queue. Reset the timeout and report the abort request to be
|
||||
completed.</para>
|
||||
|
||||
<programlisting>
|
||||
case HCB_DISCONNECTED:
|
||||
<programlisting> case HCB_DISCONNECTED:
|
||||
untimeout(xxx_timeout, (caddr_t) hcb, abort_ccb->ccb_h.timeout_ch);
|
||||
abort_ccb->ccb_h.timeout_ch =
|
||||
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;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>That's all for the ABORT request, although there is one more
|
||||
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
|
||||
that:</para>
|
||||
|
||||
<programlisting>
|
||||
case XPT_ABORT:
|
||||
<programlisting> case XPT_ABORT:
|
||||
struct ccb *abort_ccb;
|
||||
abort_ccb = ccb->cab.abort_ccb;
|
||||
|
||||
|
@ -1082,8 +1031,7 @@ SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET
|
|||
else
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem><para><emphasis>XPT_SET_TRAN_SETTINGS</emphasis> - explicitly
|
||||
|
@ -1178,8 +1126,7 @@ of the union ccb:</para>
|
|||
|
||||
<para>The code looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_trans_settings *cts;
|
||||
<programlisting> struct ccb_trans_settings *cts;
|
||||
int targ, lun;
|
||||
int flags;
|
||||
|
||||
|
@ -1225,16 +1172,14 @@ of the union ccb:</para>
|
|||
}
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<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
|
||||
function target_negotiated(hcb). It can be implemented like
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
int
|
||||
<programlisting> int
|
||||
target_negotiated(struct xxx_hcb *hcb)
|
||||
{
|
||||
struct softc *softc = hcb->softc;
|
||||
|
@ -1246,8 +1191,7 @@ of the union ccb:</para>
|
|||
return 0; /* FALSE */
|
||||
else
|
||||
return 1; /* TRUE */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>After the values are re-negotiated the resulting values must
|
||||
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
|
||||
is:</para>
|
||||
|
||||
<programlisting>
|
||||
struct ccb_calc_geometry *ccg;
|
||||
<programlisting> struct ccb_calc_geometry *ccg;
|
||||
u_int32_t size_mb;
|
||||
u_int32_t secs_per_cylinder;
|
||||
int extended;
|
||||
|
@ -1322,8 +1265,7 @@ of the union ccb:</para>
|
|||
ccg->cylinders = ccg->volume_size / secs_per_cylinder;
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This gives the general idea, the exact calculation depends
|
||||
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
|
||||
are:</para>
|
||||
|
||||
<programlisting>
|
||||
128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers
|
||||
</programlisting>
|
||||
<programlisting> 128 heads, 63 sectors - Symbios controllers
|
||||
16 heads, 63 sectors - old controllers</programlisting>
|
||||
|
||||
<para>Some system BIOSes and SCSI BIOSes fight with each other
|
||||
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
|
||||
strncpy, like:</para>
|
||||
|
||||
<programlisting>
|
||||
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
|
||||
</programlisting>
|
||||
<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
|
||||
CCB as done.</para>
|
||||
|
@ -1486,23 +1424,19 @@ CCB as done.</para>
|
|||
gets just the the device unit number. So the poll routine would
|
||||
normally look as:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr((struct xxx_softc *)cam_sim_softc(sim)); /* for PCI device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>or</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_poll(struct cam_sim *sim)
|
||||
{
|
||||
xxx_intr(cam_sim_unit(sim)); /* for ISA device */
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1512,10 +1446,8 @@ xxx_poll(struct cam_sim *sim)
|
|||
<para>If an asynchronous event callback has been set up then the
|
||||
callback function should be defined.</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
</programlisting>
|
||||
<programlisting>static void
|
||||
ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)</programlisting>
|
||||
|
||||
<itemizedlist>
|
||||
<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,
|
||||
looks like:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_softc *softc;
|
||||
<programlisting> struct xxx_softc *softc;
|
||||
struct cam_sim *sim;
|
||||
int targ;
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
</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
|
||||
restored a wrapper function can be defined, like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting> static void
|
||||
xxx_action(struct cam_sim *sim, union ccb *ccb)
|
||||
{
|
||||
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)
|
||||
{
|
||||
... process the request ...
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This approach is simple and robust but the problem with it
|
||||
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
|
||||
the status of the connections with the SCSI devices.</para>
|
||||
|
||||
<programlisting>
|
||||
int fatal=0;
|
||||
<programlisting> int fatal=0;
|
||||
struct ccb_trans_settings neg;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>If interrupt is not caused by a controller-wide condition
|
||||
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
|
||||
we analyze what happened to this HCB:</para>
|
||||
|
||||
<programlisting>
|
||||
struct xxx_hcb *hcb, *h, *hh;
|
||||
<programlisting> struct xxx_hcb *hcb, *h, *hh;
|
||||
int hcb_status, scsi_status;
|
||||
int ccb_status;
|
||||
int targ;
|
||||
|
@ -1704,22 +1629,18 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|||
}
|
||||
|
||||
targ = hcb->target;
|
||||
hcb_status = get_status_of_current_hcb(softc);
|
||||
</programlisting>
|
||||
hcb_status = get_status_of_current_hcb(softc);</programlisting>
|
||||
|
||||
<para>First we check if the HCB has completed and if so we check
|
||||
the returned SCSI status.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);
|
||||
</programlisting>
|
||||
<programlisting> if(hcb_status == COMPLETED) {
|
||||
scsi_status = get_completion_status(hcb);</programlisting>
|
||||
|
||||
<para>Then look if this status is related to the REQUEST SENSE
|
||||
command and if so handle it in a simple way.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE) {
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE) {
|
||||
if(scsi_status == GOOD) { /* autosense was successful */
|
||||
hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Else the command itself has completed, pay more attention to
|
||||
details. If auto-sense is not disabled for this CCB and the
|
||||
command has failed with sense data then run REQUEST SENSE
|
||||
command to receive that data.</para>
|
||||
|
||||
<programlisting>
|
||||
hcb->ccb->csio.scsi_status = scsi_status;
|
||||
<programlisting> hcb->ccb->csio.scsi_status = scsi_status;
|
||||
calculate_residue(hcb);
|
||||
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>One typical thing would be negotiation events: negotiation
|
||||
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
|
||||
not answer them).</para>
|
||||
|
||||
<programlisting>
|
||||
switch(hcb_status) {
|
||||
<programlisting> switch(hcb_status) {
|
||||
case TARGET_REJECTED_WIDE_NEG:
|
||||
/* revert to 8-bit bus */
|
||||
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);
|
||||
return;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>Then we handle any errors that could have happened during
|
||||
auto-sense in the same simple-minded way as before. Otherwise we
|
||||
look closer at the details again.</para>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->flags & DOING_AUTOSENSE)
|
||||
<programlisting> if(hcb->flags & DOING_AUTOSENSE)
|
||||
goto autosense_failed;
|
||||
|
||||
switch(hcb_status) {
|
||||
</programlisting>
|
||||
switch(hcb_status) {</programlisting>
|
||||
|
||||
<para>The next event we consider is unexpected disconnect. Which
|
||||
is considered normal after an ABORT or BUS DEVICE RESET message
|
||||
and abnormal in other cases.</para>
|
||||
|
||||
<programlisting>
|
||||
case UNEXPECTED_DISCONNECT:
|
||||
<programlisting> case UNEXPECTED_DISCONNECT:
|
||||
if(requested_abort(hcb)) {
|
||||
/* abort affects all commands on that target+LUN, so
|
||||
* 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;
|
||||
lun_to_freeze = hcb->lun;
|
||||
}
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>If the target refuses to accept tags we notify CAM about
|
||||
that and return back all commands for this LUN:</para>
|
||||
|
||||
<programlisting>
|
||||
case TAGS_REJECTED:
|
||||
<programlisting> case TAGS_REJECTED:
|
||||
/* report the event */
|
||||
neg.flags = 0 & ~CCB_TRANS_TAG_ENB;
|
||||
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 */
|
||||
hcb->ccb->ccb_h.status |= CAM_DEV_QFRZN;
|
||||
lun_to_freeze = hcb->lun;
|
||||
break;
|
||||
</programlisting>
|
||||
break;</programlisting>
|
||||
|
||||
<para>Then we check a number of other conditions, with processing
|
||||
basically limited to setting the CCB status:</para>
|
||||
|
||||
<programlisting>
|
||||
case SELECTION_TIMEOUT:
|
||||
<programlisting> case SELECTION_TIMEOUT:
|
||||
ccb_status = CAM_SEL_TIMEOUT;
|
||||
/* request the further code to freeze the queue */
|
||||
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;
|
||||
lun_to_freeze = CAM_LUN_WILDCARD;
|
||||
break;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
<programlisting> if(hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {
|
||||
/* freeze the queue */
|
||||
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);
|
||||
schedule_next_hcb(softc);
|
||||
return;
|
||||
</programlisting>
|
||||
return;</programlisting>
|
||||
|
||||
<para>This concludes the generic interrupt handling although
|
||||
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
|
||||
function would look like:</para>
|
||||
|
||||
<programlisting>
|
||||
static void
|
||||
<programlisting>static void
|
||||
xxx_timeout(void *arg)
|
||||
{
|
||||
struct xxx_hcb *hcb = (struct xxx_hcb *)arg;
|
||||
|
@ -2063,8 +1968,7 @@ xxx_timeout(void *arg)
|
|||
} else {
|
||||
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>When we abort a request all the other disconnected requests
|
||||
to the same target/LUN get aborted too. So there appears a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -121,8 +121,7 @@
|
|||
instruction immediately following the function call. (Inspired
|
||||
by <xref linkend="Phrack">)</para>
|
||||
|
||||
<programlisting>
|
||||
#include <sgmltag>stdio.h</sgmltag>
|
||||
<programlisting>#include <sgmltag>stdio.h</sgmltag>
|
||||
|
||||
void manipulate(char *buffer) {
|
||||
char newbuffer[80];
|
||||
|
@ -140,8 +139,7 @@ int main() {
|
|||
i=2;
|
||||
printf("The value of i is : %d\n",i);
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1060,8 +1060,7 @@ free(foo);
|
|||
<para>Here's a very simple make file:</para>
|
||||
|
||||
<programlisting>foo: foo.c
|
||||
cc -o foo foo.c
|
||||
</programlisting>
|
||||
cc -o foo foo.c</programlisting>
|
||||
|
||||
<para>It consists of two lines, a dependency line and a creation
|
||||
line.</para>
|
||||
|
@ -1105,8 +1104,7 @@ free(foo);
|
|||
cc -o foo foo.c
|
||||
|
||||
install:
|
||||
cp foo /home/me
|
||||
</programlisting>
|
||||
cp foo /home/me</programlisting>
|
||||
|
||||
<para>We can tell make which target we want to make by
|
||||
typing:</para>
|
||||
|
@ -1159,8 +1157,7 @@ install:
|
|||
<programlisting>MASTER_SITES= ftp://freefall.cdrom.com/pub/FreeBSD/LOCAL_PORTS/
|
||||
DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
||||
|
||||
.include <bsd.port.mk>
|
||||
</programlisting>
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
||||
<para>Now, if we go to the directory for this port and type
|
||||
<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
|
||||
for it. This involves adding a line like</para>
|
||||
|
||||
<programlisting> * Make: (make). The GNU Make utility.
|
||||
</programlisting>
|
||||
<programlisting> * Make: (make). The GNU Make utility.</programlisting>
|
||||
|
||||
<para>to the file. Once you have done this, you can type
|
||||
<userinput>info</userinput> and then select
|
||||
|
@ -1381,8 +1377,7 @@ main() {
|
|||
int bazz(int anint) {
|
||||
printf("You gave me %d\n", anint);
|
||||
return anint;
|
||||
}
|
||||
</programlisting>
|
||||
}</programlisting>
|
||||
|
||||
<para>This program sets <symbol>i</symbol> to be
|
||||
<literal>5</literal> and passes it to a function
|
||||
|
@ -1438,8 +1433,7 @@ main() {
|
|||
|
||||
i = 5;
|
||||
printf("This is my program\n");
|
||||
<lineannotation>&hellip</>
|
||||
</programlisting>
|
||||
<lineannotation>&hellip</></programlisting>
|
||||
|
||||
<para>but we left the <literal>i=5;</literal> line out. As we
|
||||
didn't initialise <symbol>i</symbol>, it had whatever number
|
||||
|
@ -2162,8 +2156,7 @@ in font-lock-auto-mode-list"
|
|||
("\\.lsp$" . lisp-mode)
|
||||
("\\.wiz$" . whizbang-mode)
|
||||
("\\.scm$" . scheme-mode)
|
||||
<lineannotation>…</>
|
||||
</programlisting>
|
||||
<lineannotation>…</></programlisting>
|
||||
|
||||
<para>This means that Emacs will automatically go into
|
||||
<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
|
||||
(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 of modes to always start in font-lock-mode")
|
||||
</programlisting>
|
||||
"List of modes to always start in font-lock-mode")</programlisting>
|
||||
|
||||
<para>This means that Emacs will always enable
|
||||
<function>font-lock-mode</function> (ie syntax highlighting)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<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>
|
||||
<year>1995</year>
|
||||
|
@ -2763,8 +2763,7 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on
|
|||
<para>Add the following lines to your kernel configuration
|
||||
file, and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
device uhci
|
||||
<programlisting>device uhci
|
||||
device ohci
|
||||
device usb
|
||||
device ukbd
|
||||
|
@ -2773,8 +2772,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
|||
<para>In versions of FreeBSD before 4.0, use this
|
||||
instead:</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
<programlisting>controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
controller ukbd0
|
||||
|
@ -2794,8 +2792,7 @@ options KBD_INSTALL_CDEV</programlisting>
|
|||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||
following lines:</para>
|
||||
|
||||
<programlisting>
|
||||
usbd_enable="YES"
|
||||
<programlisting>usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
|
||||
</listitem>
|
||||
|
@ -3024,8 +3021,7 @@ moused_flags=""</programlisting>
|
|||
<para>Add the following lines to your kernel configuration
|
||||
file, and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
device uhci
|
||||
<programlisting>device uhci
|
||||
device ohci
|
||||
device usb
|
||||
device ums</programlisting>
|
||||
|
@ -3033,8 +3029,7 @@ device ums</programlisting>
|
|||
<para>In versions of FreeBSD before 4.0, use this
|
||||
instead:</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
<programlisting>controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
device ums0</programlisting>
|
||||
|
@ -3052,8 +3047,7 @@ device ums0</programlisting>
|
|||
<para>Edit <filename>/etc/rc.conf</filename> and add the
|
||||
following lines:</para>
|
||||
|
||||
<programlisting>
|
||||
moused_enable="YES"
|
||||
<programlisting>moused_enable="YES"
|
||||
moused_type="auto"
|
||||
moused_port="/dev/ums0"
|
||||
moused_flags=""
|
||||
|
@ -3070,16 +3064,14 @@ usbd_flags=""</programlisting>
|
|||
3.3.2 or later, be sure to have the following lines in the
|
||||
<emphasis>Pointer</emphasis> section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
<programlisting>Device "/dev/sysmouse"
|
||||
Protocol "Auto"</programlisting>
|
||||
|
||||
<para>If you are using earlier versions of XFree86, be sure to
|
||||
have the following lines in the <emphasis>Pointer</emphasis>
|
||||
section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
<programlisting>Device "/dev/sysmouse"
|
||||
Protocol "SysMouse"</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -3127,8 +3119,7 @@ Protocol "SysMouse"</programlisting>
|
|||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||
kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: psm.c
|
||||
<programlisting>Index: psm.c
|
||||
===================================================================
|
||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||
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>
|
||||
from the output of &man.pnpinfo.8;:</para>
|
||||
|
||||
<programlisting>
|
||||
{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||
<programlisting>{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
||||
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
||||
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
|
||||
</programlisting>
|
||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
|
||||
|
||||
<para>Add the hexadecimal Vendor ID for your device in the
|
||||
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
|
||||
sure you have the following lines.</para>
|
||||
|
||||
<programlisting>
|
||||
Section Pointer
|
||||
<programlisting>Section Pointer
|
||||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
.....</programlisting>
|
||||
|
@ -7328,8 +7316,7 @@ Device "/dev/sysmouse"
|
|||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
Buttons 5
|
||||
EndSection
|
||||
</programlisting>
|
||||
EndSection</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
|
@ -7398,8 +7385,7 @@ EndSection</programlisting>
|
|||
Protocol "IntelliMouse"
|
||||
Device "/dev/psm0"
|
||||
ZAxisMapping 4 5
|
||||
EndSection
|
||||
</programlisting>
|
||||
EndSection</programlisting>
|
||||
</example>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -7454,8 +7440,7 @@ EndSection
|
|||
(scroll-up imwheel-scroll-interval))
|
||||
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||
;;; end imwheel section
|
||||
</programlisting>
|
||||
;;; end imwheel section</programlisting>
|
||||
</example>
|
||||
|
||||
<para>For <application>Xemacs</application>, add the
|
||||
|
@ -7476,8 +7461,7 @@ EndSection
|
|||
(scroll-up imwheel-scroll-interval))
|
||||
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||
;;; end imwheel section
|
||||
</programlisting>
|
||||
;;; end imwheel section</programlisting>
|
||||
</example>
|
||||
</listitem>
|
||||
|
||||
|
@ -8478,8 +8462,7 @@ SMC EtherPower (Model 8432)
|
|||
TopWare TE-3500P
|
||||
Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348
|
||||
(3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442,
|
||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)
|
||||
</programlisting>
|
||||
ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd)</programlisting>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||
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">
|
||||
|
@ -215,8 +215,7 @@
|
|||
the element is a paragraph, called <literal>p</literal>. This
|
||||
element has both start and end tags.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a paragraph. It starts with the start tag for
|
||||
<programlisting><![ 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'
|
||||
element.</p>
|
||||
|
||||
|
@ -235,8 +234,7 @@
|
|||
<literal>hr</literal>. This element does not wrap content, so only
|
||||
has a start tag.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a paragraph.</p>
|
||||
<programlisting><![ CDATA [<p>This is a paragraph.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
@ -252,8 +250,7 @@
|
|||
<example>
|
||||
<title>Elements within elements; <sgmltag>em</sgmltag></title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||
<programlisting><![ CDATA [<p>This is a simple <em>paragraph</em> where some
|
||||
of the <em>words</em> have been <em>emphasised</em>.</p>]]></programlisting>
|
||||
</example>
|
||||
|
||||
|
@ -303,8 +300,7 @@
|
|||
<example>
|
||||
<title>Using an element with an attribute</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p align="left">The inclusion of the align attribute
|
||||
<programlisting><![ CDATA [<p align="left">The inclusion of the align attribute
|
||||
on this paragraph was superfluous, since the default is left.</p>
|
||||
|
||||
<p align="center">This may appear in the center.</p>]]></programlisting>
|
||||
|
@ -319,8 +315,7 @@
|
|||
<example>
|
||||
<title>Single quotes around attributes</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||
<programlisting><![ CDATA [<p align='right'>I'm on the right!</p>]]></programlisting>
|
||||
</example>
|
||||
|
||||
<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
|
||||
&man.bash.1; users</title>
|
||||
|
||||
<programlisting>
|
||||
SGML_ROOT=/usr/local/share/sgml
|
||||
<programlisting>SGML_ROOT=/usr/local/share/sgml
|
||||
SGML_CATALOG_FILES=${SGML_ROOT}/jade/catalog
|
||||
SGML_CATALOG_FILES=${SGML_ROOT}/iso8879/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
|
||||
&man.tcsh.1; users</title>
|
||||
|
||||
<programlisting>
|
||||
setenv SGML_ROOT /usr/local/share/sgml
|
||||
<programlisting>setenv SGML_ROOT /usr/local/share/sgml
|
||||
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}/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
|
||||
following text;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<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
|
||||
4.0 of the HTML DTD looks like this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">]]></programlisting>
|
||||
|
||||
<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
|
||||
follows;</para>
|
||||
|
||||
<programlisting>
|
||||
"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||
<programlisting>"<replaceable>Owner</replaceable>//<replaceable>Keyword</replaceable> <replaceable>Description</replaceable>//<replaceable>Language</replaceable>"</programlisting>
|
||||
|
||||
<variablelist>
|
||||
<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
|
||||
the line;</para>
|
||||
|
||||
<programlisting>
|
||||
PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
||||
<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
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||
<programlisting><![ CDATA [<!DOCTYPE html SYSTEM "/path/to/file.dtd">]]></programlisting>
|
||||
|
||||
<para>The <literal>SYSTEM</literal> keyword indicates that the SGML
|
||||
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>
|
||||
<title>SGML generic comment</title>
|
||||
|
||||
<programlisting>
|
||||
<!-- test comment --></programlisting>
|
||||
<programlisting><!-- test comment --></programlisting>
|
||||
|
||||
<programlisting><![ CDATA [
|
||||
<!-- 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>
|
||||
|
||||
<programlisting>
|
||||
<!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||
<programlisting><!THIS IS OUTSIDE THE COMMENT></programlisting>
|
||||
|
||||
<para>This is not valid SGML, and may give confusing error
|
||||
messages.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||
<programlisting><![ CDATA [<!--------------- This is a very bad idea --------------->]]></programlisting>
|
||||
|
||||
<para>As the example suggests, <emphasis>do not</emphasis> write
|
||||
comments like that.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!--===================================================-->]]></programlisting>
|
||||
<programlisting><![ CDATA [<!--===================================================-->]]></programlisting>
|
||||
|
||||
<para>That is a (slightly) better approach, but it still potentially
|
||||
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
|
||||
version number of your product. You could write;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<para>The current version of our product is
|
||||
<programlisting><![ CDATA [<para>The current version of our product is
|
||||
¤t.version;.</para>]]></programlisting>
|
||||
|
||||
<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>
|
||||
<title>Defining general entities</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY current.version "3.0-RELEASE">
|
||||
<!ENTITY last.version "2.2.7-RELEASE">
|
||||
]>]]></programlisting>
|
||||
|
@ -998,8 +980,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Defining parameter entities</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY % param.some "some">
|
||||
<!ENTITY % param.text "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
|
||||
<filename>example.sgml</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [
|
||||
<!ENTITY version "1.1">
|
||||
]>
|
||||
|
||||
|
@ -1118,8 +1098,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Using general entities to include files</title>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<!ENTITY chapter.2 SYSTEM "chapter2.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
|
||||
following;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<programlisting><![ CDATA [<!ENTITY chapter.1 SYSTEM "chapter1.sgml">
|
||||
<!ENTITY chapter.2 SYSTEM "chapter2.sgml">
|
||||
<!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
|
||||
for use. Then use the general entities as before;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!-- Define a parameter entity to load in the chapter general entities -->
|
||||
<!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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||
<programlisting><![ CDATA [<p>This is the first paragraph.</p>]]></programlisting>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Edit <filename>example.sgml</filename> so that it looks like
|
||||
this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY version "1.1">
|
||||
<!ENTITY para1 SYSTEM "para1.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
|
||||
this;</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><![ CDATA [<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!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
|
||||
this content:</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [<!ENTITY version "1.1">
|
||||
<programlisting><![ CDATA [<!ENTITY version "1.1">
|
||||
<!ENTITY para1 SYSTEM "para1.sgml">
|
||||
<!ENTITY para2 SYSTEM "para2.sgml">
|
||||
<!ENTITY para3 SYSTEM "para3.sgml">]]></programlisting>
|
||||
|
@ -1332,8 +1305,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Structure of a marked section</title>
|
||||
|
||||
<programlisting>
|
||||
<![ <replaceable>KEYWORD</replaceable> [
|
||||
<programlisting><![ <replaceable>KEYWORD</replaceable> [
|
||||
Contents of marked section
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
@ -1399,8 +1371,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
|
|||
<example>
|
||||
<title>Using a CDATA marked section</title>
|
||||
|
||||
<programlisting>
|
||||
<para>Here is an example of how you would include some text
|
||||
<programlisting><para>Here is an example of how you would include some text
|
||||
that contained many &lt; and &amp; symbols. The sample
|
||||
text is a fragment of HTML. The surrounding text (<para> and
|
||||
<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
|
||||
<literal>IGNORE</literal> in marked sections</title>
|
||||
|
||||
<programlisting>
|
||||
<![ INCLUDE [
|
||||
<programlisting><![ INCLUDE [
|
||||
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
|
||||
section</title>
|
||||
|
||||
<programlisting>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!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
|
||||
definition to;</para>
|
||||
|
||||
<programlisting>
|
||||
<!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||
<programlisting><!ENTITY % electronic.copy "IGNORE"></programlisting>
|
||||
|
||||
<para>On reprocessing the document, the marked sections that use
|
||||
<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
|
||||
contains the following;</para>
|
||||
|
||||
<programlisting>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
|
||||
<!ENTITY % text.output "INCLUDE">
|
||||
]>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
|
||||
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">
|
||||
|
@ -182,8 +182,7 @@
|
|||
<para>For example, the source for this section looks something
|
||||
like:</para>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [+--- This is column 0
|
||||
<programlisting><![ CDATA [+--- This is column 0
|
||||
V
|
||||
<chapter>
|
||||
<title>...</title>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -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>
|
||||
|
||||
<programlisting>
|
||||
portmap_enable="YES"
|
||||
<programlisting>portmap_enable="YES"
|
||||
nfs_server_enable="YES"
|
||||
nfs_server_flags="-u -t -n 4"
|
||||
mountd_flags="-r"</programlisting>
|
||||
|
@ -588,8 +587,7 @@ mountd_flags="-r"</programlisting>
|
|||
|
||||
<para>On the client, make sure you have:</para>
|
||||
|
||||
<programlisting>
|
||||
nfs_client_enable="YES"
|
||||
<programlisting>nfs_client_enable="YES"
|
||||
nfs_client_flags="-n 4"</programlisting>
|
||||
|
||||
<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
|
||||
the client: in <filename>/etc/fstab</filename> on freebox:</para>
|
||||
|
||||
<programlisting>
|
||||
fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||
<programlisting>fastws:/sharedfs /project nfs rw,-r=1024 0 0</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/fstab</filename> on <hostid>fastws</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||
<programlisting>freebox:/sharedfs /project nfs rw,-w=1024 0 0</programlisting>
|
||||
|
||||
<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,
|
||||
netmask.</para>
|
||||
|
||||
<programlisting>
|
||||
diskless:\
|
||||
<programlisting>diskless:\
|
||||
:ht=ether:\
|
||||
:ha=0000c01f848a:\
|
||||
:sm=255.255.255.0:\
|
||||
|
@ -960,16 +955,14 @@ diskless:\
|
|||
|
||||
<para>A typical completely diskless cfg file might contain:</para>
|
||||
|
||||
<programlisting>
|
||||
rootfs 192.1.2.3:/rootfs/myclient
|
||||
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||
swapfs 192.1.2.3:/swapfs
|
||||
swapsize 20000
|
||||
hostname myclient.mydomain</programlisting>
|
||||
|
||||
<para>A cfg file for a machine with local swap might contain:</para>
|
||||
|
||||
<programlisting>
|
||||
rootfs 192.1.2.3:/rootfs/myclient
|
||||
<programlisting>rootfs 192.1.2.3:/rootfs/myclient
|
||||
hostname myclient.mydomain</programlisting>
|
||||
</step>
|
||||
|
||||
|
@ -980,14 +973,12 @@ hostname myclient.mydomain</programlisting>
|
|||
<filename>/etc/exports</filename> file on FreeBSD might look
|
||||
like:</para>
|
||||
|
||||
<programlisting>
|
||||
/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||
<programlisting>/rootfs/myclient -maproot=0:0 myclient.mydomain
|
||||
/swapfs -maproot=0:0 myclient.mydomain</programlisting>
|
||||
|
||||
<para>And on HP-UX:</para>
|
||||
|
||||
<programlisting>
|
||||
/rootfs/myclient -root=myclient.mydomain
|
||||
<programlisting>/rootfs/myclient -root=myclient.mydomain
|
||||
/swapfs -root=myclient.mydomain</programlisting>
|
||||
</step>
|
||||
|
||||
|
@ -1139,8 +1130,7 @@ hostname myclient.mydomain</programlisting>
|
|||
list, send mail to &a.majordomo; and
|
||||
specify:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-isdn</programlisting>
|
||||
<programlisting>subscribe freebsd-isdn</programlisting>
|
||||
|
||||
<para>in the body of your message.</para>
|
||||
</sect2>
|
||||
|
@ -1262,8 +1252,7 @@ subscribe freebsd-isdn</programlisting>
|
|||
with AUI/10BT transceiver, if necessary.</para>
|
||||
|
||||
<!-- This should be a graphic -->
|
||||
<programlisting>
|
||||
---Sun workstation
|
||||
<programlisting>---Sun workstation
|
||||
|
|
||||
---FreeBSD box
|
||||
|
|
||||
|
@ -1284,8 +1273,7 @@ ISDN BRI line</programlisting>
|
|||
<para>Network is Twisted Pair Ethernet.</para>
|
||||
|
||||
<!-- This should be a graphic -->
|
||||
<programlisting>
|
||||
-------Novell Server
|
||||
<programlisting> -------Novell Server
|
||||
| H |
|
||||
| ---Sun
|
||||
| |
|
||||
|
@ -1805,8 +1793,7 @@ Don't forget to update map ypservers on ellington.</screen>
|
|||
<filename>/etc/crontab</filename> entries on your slave
|
||||
servers should do the job:</para>
|
||||
|
||||
<programlisting>
|
||||
20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||
<programlisting>20 * * * * root /usr/libexec/ypxfr passwd.byname
|
||||
21 * * * * root /usr/libexec/ypxfr passwd.byuid</programlisting>
|
||||
|
||||
<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
|
||||
startup:</para>
|
||||
|
||||
<programlisting>
|
||||
nisdomainname="test-domain"
|
||||
<programlisting>nisdomainname="test-domain"
|
||||
nis_client_enable="YES"</programlisting>
|
||||
</listitem>
|
||||
|
||||
|
@ -1923,8 +1909,7 @@ nis_client_enable="YES"</programlisting>
|
|||
like this:</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
# allow connections from local host -- mandatory
|
||||
<programlisting># allow connections from local host -- mandatory
|
||||
127.0.0.1 255.255.255.255
|
||||
# allow connections from any host
|
||||
# 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
|
||||
employees and interns.</para>
|
||||
|
||||
<programlisting>
|
||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
<programlisting>IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||
USERS (,echo,test-domain) (,foxtrott,test-domain) \
|
||||
(,golf,test-domain)
|
||||
INTERNS (,able,test-domain) (,baker,test-domain)
|
||||
</programlisting>
|
||||
INTERNS (,able,test-domain) (,baker,test-domain)</programlisting>
|
||||
|
||||
<para><literal>IT_EMP</literal>, <literal>IT_APP</literal> etc.
|
||||
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
|
||||
sub-netgroups:</para>
|
||||
|
||||
<programlisting>
|
||||
BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||
<programlisting>BIGGRP1 (,joe1,domain) (,joe2,domain) (,joe3,domain) [...]
|
||||
BIGGRP2 (,joe16,domain) (,joe17,domain) [...]
|
||||
BIGGRP3 (,joe32,domain) (,joe33,domain)
|
||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3
|
||||
</programlisting>
|
||||
BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3</programlisting>
|
||||
|
||||
<para>You can repeat this process if you need more than 225
|
||||
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
|
||||
&man.vipw.8; and replace the line</para>
|
||||
|
||||
<programlisting>
|
||||
+:::::::::
|
||||
</programlisting>
|
||||
<programlisting>+:::::::::</programlisting>
|
||||
|
||||
<para>with</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
</programlisting>
|
||||
<programlisting>+@IT_EMP:::::::::</programlisting>
|
||||
|
||||
<para>Now, only the data for the users defined in the netgroup
|
||||
<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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
<programlisting>+@IT_EMP:::::::::
|
||||
+@IT_APP:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>The corresponding lines for the normal workstations
|
||||
could be:</para>
|
||||
|
||||
<programlisting>
|
||||
+@IT_EMP:::::::::
|
||||
<programlisting>+@IT_EMP:::::::::
|
||||
+@USERS:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>And everything would be fine until there is a policy
|
||||
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
|
||||
entries for your NIS map netgroup should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
BIGSRV IT_EMP IT_APP
|
||||
<programlisting>BIGSRV IT_EMP IT_APP
|
||||
SMALLSRV IT_EMP IT_APP ITINTERN
|
||||
USERBOX IT_EMP ITINTERN USERS
|
||||
</programlisting>
|
||||
USERBOX IT_EMP ITINTERN USERS</programlisting>
|
||||
|
||||
<para>This method of defining login restrictions works
|
||||
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
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||
+:::::::::/sbin/nologin
|
||||
</programlisting>
|
||||
<programlisting>+@<replaceable>BOXNAME</replaceable>:::::::::
|
||||
+:::::::::/sbin/nologin</programlisting>
|
||||
|
||||
<para>Once you have completed this task for all your machines,
|
||||
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
|
||||
scenario with some additional goodies.</para>
|
||||
|
||||
<programlisting>
|
||||
# Define groups of users first
|
||||
<programlisting># Define groups of users first
|
||||
IT_EMP (,alpha,test-domain) (,beta,test-domain)
|
||||
IT_APP (,charlie,test-domain) (,delta,test-domain)
|
||||
DEPT1 (,echo,test-domain) (,foxtrott,test-domain)
|
||||
|
@ -2429,8 +2397,7 @@ ONE SECURITY
|
|||
#
|
||||
# Restrict a machine to a single user
|
||||
TWO (,hotel,test-domain)
|
||||
# [...more groups to follow]
|
||||
</programlisting>
|
||||
# [...more groups to follow]</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -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
|
||||
include the following:</para>
|
||||
|
||||
<programlisting>
|
||||
ifconfig_fxp0="DHCP"
|
||||
</programlisting>
|
||||
<programlisting>ifconfig_fxp0="DHCP"</programlisting>
|
||||
|
||||
<note>
|
||||
<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
|
||||
following (editing as necessary):</para>
|
||||
|
||||
<programlisting>
|
||||
dhcp_program="/sbin/dhclient"
|
||||
dhcp_flags=""
|
||||
</programlisting>
|
||||
<programlisting>dhcp_program="/sbin/dhclient"
|
||||
dhcp_flags=""</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -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>
|
||||
|
||||
<programlisting>
|
||||
<![ CDATA [#!/bin/sh
|
||||
<programlisting><![ CDATA [#!/bin/sh
|
||||
#
|
||||
# create a restore floppy
|
||||
#
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -592,8 +592,7 @@
|
|||
wish to protect, replacing the text between the <literal>%%</literal>
|
||||
with the appropriate information.</para>
|
||||
|
||||
<programlisting>
|
||||
Copyright (c) %%proper_years_here%%
|
||||
<programlisting>Copyright (c) %%proper_years_here%%
|
||||
%%your_name_here%%, %%your_state%% %%your_zip%%.
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -139,8 +139,7 @@
|
|||
<para>To join these lists, send mail to &a.majordomo; and
|
||||
specify the following in the body of your message:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-current
|
||||
<programlisting>subscribe freebsd-current
|
||||
subscribe cvs-all</programlisting>
|
||||
|
||||
<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
|
||||
specify the following in the body of your message:</para>
|
||||
|
||||
<programlisting>
|
||||
subscribe freebsd-stable
|
||||
<programlisting>subscribe freebsd-stable
|
||||
subscribe cvs-all</programlisting>
|
||||
|
||||
<para>Optionally, you can also say <literal>help</literal>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -662,8 +662,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
|
|||
adding the following line to your kernel configuration
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
options QUOTA</programlisting>
|
||||
<programlisting>options QUOTA</programlisting>
|
||||
|
||||
<para>The stock <filename>GENERIC</filename> kernel does not have
|
||||
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
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
enable_quotas=<quote>YES</quote></programlisting>
|
||||
<programlisting>enable_quotas=<quote>YES</quote></programlisting>
|
||||
|
||||
<para>For finer control over your quota startup, there is an
|
||||
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
|
||||
purpose:</para>
|
||||
|
||||
<programlisting>
|
||||
check_quotas=<quote>NO</quote></programlisting>
|
||||
<programlisting>check_quotas=<quote>NO</quote></programlisting>
|
||||
|
||||
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
||||
configuration is simpler, and consists of only one variable. Set
|
||||
the following in your <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
check_quotas=<quote>YES</quote></programlisting>
|
||||
<programlisting>check_quotas=<quote>YES</quote></programlisting>
|
||||
|
||||
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
||||
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
|
||||
to to enable quotas on. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||
<programlisting>/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
||||
|
||||
<para>Similarly, to enable group quotas, use the
|
||||
<literal>groupquota</literal> option instead of the
|
||||
<literal>userquota</literal> keyword. To enable both user and
|
||||
group quotas, change the entry as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||
<programlisting>/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
||||
|
||||
<para>By default the quota files are stored in the root directory of
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
Quotas for user test:
|
||||
<programlisting>Quotas for user test:
|
||||
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
||||
inodes in use: 7, limits (soft = 50, hard = 60)
|
||||
/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
|
||||
limits on two file systems.</para>
|
||||
|
||||
<programlisting>
|
||||
Disk quotas for user test (uid 1002):
|
||||
<programlisting>Disk quotas for user test (uid 1002):
|
||||
Filesystem blocks quota limit grace files quota limit grace
|
||||
/usr 65* 50 75 5days 7 50 60
|
||||
/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
|
||||
<filename>/etc/inetd.conf</filename> like so:</para>
|
||||
|
||||
<programlisting>
|
||||
rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||
<programlisting>rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
||||
|
||||
<para>Now restart <command>inetd</command>:</para>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -482,8 +482,7 @@
|
|||
|
||||
<para>To subscribe to a list, send mail to &a.majordomo; and include
|
||||
|
||||
<programlisting>
|
||||
subscribe <listname> [<optional address>]</programlisting>
|
||||
<programlisting>subscribe <listname> [<optional address>]</programlisting>
|
||||
|
||||
in the body of your message. For example, to subscribe yourself to
|
||||
<literal>freebsd-announce</literal>, you'd do:</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1364,8 +1364,7 @@
|
|||
below.</para>
|
||||
|
||||
<!-- This should really be a graphic -->
|
||||
<programlisting>
|
||||
INS8250 -> INS8250B
|
||||
<programlisting>INS8250 -> INS8250B
|
||||
\
|
||||
\
|
||||
\-> INS8250A -> INS82C50A
|
||||
|
@ -2609,8 +2608,7 @@ INS8250 -> INS8250B
|
|||
<literal>options COM_MULTIPORT</literal> or it will not work very
|
||||
well!</para>
|
||||
|
||||
<programlisting>
|
||||
device sio4 at isa? port 0x100 tty flags 0xb05
|
||||
<programlisting>device sio4 at isa? port 0x100 tty flags 0xb05
|
||||
device sio5 at isa? port 0x108 tty flags 0xb05
|
||||
device sio6 at isa? port 0x110 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>
|
||||
<para>Add the line
|
||||
|
||||
<programlisting>
|
||||
options COM_MULTIPORT</programlisting>
|
||||
<programlisting>options COM_MULTIPORT</programlisting>
|
||||
|
||||
to the config file.</para>
|
||||
</step>
|
||||
|
@ -2684,8 +2681,7 @@ options COM_MULTIPORT</programlisting>
|
|||
for Each port is +8 hexadecimal from the previous port, thus
|
||||
the 100h, 108h, 110h... addresses.</para>
|
||||
|
||||
<programlisting>
|
||||
device sio1 at isa? port 0x100 tty flags 0x1005
|
||||
<programlisting>device sio1 at isa? port 0x100 tty flags 0x1005
|
||||
device sio2 at isa? port 0x108 tty flags 0x1005
|
||||
device sio3 at isa? port 0x110 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>
|
||||
(note that your irq and iomem settings may differ).</para>
|
||||
|
||||
<programlisting>
|
||||
device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||
<programlisting>device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
|
||||
</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
|
||||
<literal>ttyd</literal>. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyc0 "/usr/libexec/getty std.38400" unknown on insecure
|
||||
<programlisting>ttyc0 "/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
|
||||
…
|
||||
|
@ -3005,16 +2999,14 @@ ttyc7 "/usr/libexec/getty std.38400" unknown on insecure</programlisting>
|
|||
<link linkend="kernelconfig-config">kernel configuration
|
||||
file</link>, changing the numbers as appropriate:</para>
|
||||
|
||||
<programlisting>
|
||||
device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>
|
||||
<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
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
device si0</programlisting>
|
||||
<programlisting>device si0</programlisting>
|
||||
|
||||
<para>After adding the configuration entry, <link
|
||||
linkend="kernelconfig-building"> rebuild and install</link> your
|
||||
|
@ -3035,8 +3027,7 @@ device si0</programlisting>
|
|||
need to add lines like this to <link
|
||||
linkend="dialup"><filename>/etc/ttys</filename></link>:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||
<programlisting>ttyA01 "/usr/libexec/getty std.9600" vt100 on insecure
|
||||
</programlisting>
|
||||
|
||||
<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
|
||||
live in <filename>/sys/i386/conf</filename> BTW).</para>
|
||||
|
||||
<programlisting>
|
||||
# First WD compatible controller
|
||||
<programlisting># First WD compatible controller
|
||||
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
|
||||
disk wd0 at wdc0 drive 0
|
||||
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
|
||||
(between []):</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
<programlisting># SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
#
|
||||
# aha: Adaptec 154x
|
||||
# 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
|
||||
this out.</para>
|
||||
|
||||
<programlisting>
|
||||
[driver for Adaptec 174x]
|
||||
<programlisting>[driver for Adaptec 174x]
|
||||
controller ahb0 at isa? bio irq 11 vector ahbintr
|
||||
|
||||
[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
|
||||
configuration file using a line like:</para>
|
||||
|
||||
<programlisting>
|
||||
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device</programlisting>
|
||||
<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
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
<programlisting>{
|
||||
T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
|
||||
"mx1", SC_ONE_LU
|
||||
}</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
|
||||
something like:</para>
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
<programlisting>{
|
||||
T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
|
||||
"sd", SC_MORE_LUS
|
||||
}</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
|
||||
disabled by default:</para>
|
||||
|
||||
<programlisting>
|
||||
options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||
<programlisting>options "TUNE_1542" #dynamic tune of bus DMA speed</programlisting>
|
||||
|
||||
<para>Check the man pages for the host adapter that you use. Or
|
||||
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).
|
||||
Build and install a new kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
*** 4831,4835 ****
|
||||
<programlisting>*** 4831,4835 ****
|
||||
};
|
||||
|
||||
! 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
|
||||
change tapes:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
|
||||
|
||||
usage()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -253,8 +253,7 @@
|
|||
need to add the following line to the password file (using the
|
||||
<command>vipw</command> command):</para>
|
||||
|
||||
<programlisting>
|
||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||
<programlisting>ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
|
||||
|
||||
<para>Anyone with network connectivity to your machine can now
|
||||
chose a media type of FTP and type in
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1596,8 +1596,7 @@
|
|||
Note that you should not use <option>-g</option> unless you can
|
||||
accommodate the large (typically 7 MB+) kernels that result.</para>
|
||||
|
||||
<programlisting>
|
||||
makeoptions DEBUG="-g"
|
||||
<programlisting>makeoptions DEBUG="-g"
|
||||
makeoptions COPTFLAGS="-O -pipe"</programlisting>
|
||||
|
||||
<para>Sysctl provides a way to tune kernel parameters at run-time. You
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -253,8 +253,7 @@
|
|||
closely. For details of all the possible kernel options, see
|
||||
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
|
||||
#
|
||||
# For more information on this file, please read the handbook section on
|
||||
|
@ -282,8 +281,7 @@
|
|||
<literal>i386</literal>, <literal>alpha</literal>, or
|
||||
<literal>pc98</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
cpu I386_CPU
|
||||
<programlisting>cpu I386_CPU
|
||||
cpu I486_CPU
|
||||
cpu I586_CPU
|
||||
cpu I686_CPU</programlisting>
|
||||
|
@ -299,8 +297,7 @@ cpu I686_CPU</programlisting>
|
|||
<para>The Alpha architecture has different values for
|
||||
<literal>cpu_type</literal>. They include:</para>
|
||||
|
||||
<programlisting>
|
||||
cpu EV4
|
||||
<programlisting>cpu EV4
|
||||
cpu EV5</programlisting>
|
||||
|
||||
<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
|
||||
underneath or next to each option for more information.</para>
|
||||
|
||||
<programlisting>
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
<programlisting>#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
options MATH_EMULATE #Support for x87 emulation</programlisting>
|
||||
|
||||
<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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
options INET #InterNETworking</programlisting>
|
||||
<programlisting>options INET #InterNETworking</programlisting>
|
||||
|
||||
<para>Networking support. Leave this in, even if you do not plan to
|
||||
be connected to a network. Most programs require at least loopback
|
||||
networking (i.e., making network connections within your PC), so
|
||||
this is essentially mandatory.</para>
|
||||
|
||||
<programlisting>
|
||||
options INET6 #IPv6 communications protocols</programlisting>
|
||||
<programlisting>options INET6 #IPv6 communications protocols</programlisting>
|
||||
|
||||
<para>This enables the IPv6 communication protocols.</para>
|
||||
|
||||
<programlisting>
|
||||
options FFS #Berkeley Fast Filesystem
|
||||
<programlisting>options FFS #Berkeley Fast Filesystem
|
||||
options FFS_ROOT #FFS usable as root device [keep this!]</programlisting>
|
||||
|
||||
<para>This is the basic hard drive filesystem. Leave it in if you
|
||||
boot from the hard disk.</para>
|
||||
|
||||
<programlisting>
|
||||
options MFS #Memory Filesystem
|
||||
<programlisting>options MFS #Memory Filesystem
|
||||
options MD_ROOT #MD is a potential root device</programlisting>
|
||||
|
||||
<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
|
||||
<command>mount /tmp</command>.</para>
|
||||
|
||||
<programlisting>
|
||||
options NFS #Network Filesystem
|
||||
<programlisting>options NFS #Network Filesystem
|
||||
options NFS_ROOT #NFS usable as root device, NFS required</programlisting>
|
||||
|
||||
<para>The network filesystem. Unless you plan to mount partitions
|
||||
from a UNIX file server over TCP/IP, you can comment these
|
||||
out.</para>
|
||||
|
||||
<programlisting>
|
||||
options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||
<programlisting>options MSDOSFS #MSDOS Filesystem</programlisting>
|
||||
|
||||
<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.
|
||||
|
@ -433,8 +423,7 @@ options MSDOSFS #MSDOS Filesystem</programlisting>
|
|||
unmount them (and does not require <literal>MSDOSFS</literal> at
|
||||
all).</para>
|
||||
|
||||
<programlisting>
|
||||
options CD9660 #ISO 9660 Filesystem
|
||||
<programlisting>options CD9660 #ISO 9660 Filesystem
|
||||
options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programlisting>
|
||||
|
||||
<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).
|
||||
Audio CDs do not need this filesystem.</para>
|
||||
|
||||
<programlisting>
|
||||
options PROCFS #Process filesystem</programlisting>
|
||||
<programlisting>options PROCFS #Process filesystem</programlisting>
|
||||
|
||||
<para>The process filesystem. This is a <quote>pretend</quote>
|
||||
filesystem mounted on <filename>/proc</filename> which allows
|
||||
programs like &man.ps.1; to give you more information on what
|
||||
processes are running.</para>
|
||||
|
||||
<programlisting>
|
||||
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||
<programlisting>options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
|
||||
|
||||
<para>Compatibility with 4.3BSD. Leave this in; some programs will
|
||||
act strangely if you comment this out.</para>
|
||||
|
||||
<programlisting>
|
||||
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||
<programlisting>options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI</programlisting>
|
||||
|
||||
<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,
|
||||
|
@ -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 will have to raise it back up.</para>
|
||||
|
||||
<programlisting>
|
||||
options UCONSOLE #Allow users to grab the console</programlisting>
|
||||
<programlisting>options UCONSOLE #Allow users to grab the console</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -475,26 +460,22 @@ options UCONSOLE #Allow users to grab the console</programli
|
|||
<command>talk</command>, and any other messages you receive, as well
|
||||
as any console messages sent by the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
options USERCONFIG #boot -c editor</programlisting>
|
||||
<programlisting>options USERCONFIG #boot -c editor</programlisting>
|
||||
|
||||
<para>This option allows you to boot the configuration editor from the
|
||||
boot menu.</para>
|
||||
|
||||
<programlisting>
|
||||
options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||
<programlisting>options VISUAL_USERCONFIG #visual boot -c editor</programlisting>
|
||||
|
||||
<para>This option allows you to boot the visual configuration editor
|
||||
from the boot menu.</para>
|
||||
|
||||
<programlisting>
|
||||
options KTRACE #ktrace(1) support</programlisting>
|
||||
<programlisting>options KTRACE #ktrace(1) support</programlisting>
|
||||
|
||||
<para>This enables kernel process tracing, which is useful in
|
||||
debugging.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||
<programlisting>options SYSVSHM #SYSV-style shared memory</programlisting>
|
||||
|
||||
<para>This option provides for System V shared memory. The most
|
||||
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
|
||||
this.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||
<programlisting>options SYSVSEM #SYSV-style semaphores</programlisting>
|
||||
|
||||
<para>Support for System V semaphores. Less commonly used but only
|
||||
adds a few hundred bytes to the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
options SYSVMSG #SYSV-style message queues</programlisting>
|
||||
<programlisting>options SYSVMSG #SYSV-style message queues</programlisting>
|
||||
|
||||
<para>Support for System V messages. Again, only adds a few hundred
|
||||
bytes to the kernel.</para>
|
||||
|
@ -519,30 +498,26 @@ options SYSVMSG #SYSV-style message queues</programlisting>
|
|||
these System V facilities.</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
options P1003_1B #Posix P1003_1B real-time extentions
|
||||
<programlisting>options P1003_1B #Posix P1003_1B real-time extentions
|
||||
options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
|
||||
|
||||
<para>Real-time extensions added in the 1993 POSIX. Certain
|
||||
applications in the ports collection use these (such as Star
|
||||
Office).</para>
|
||||
|
||||
<programlisting>
|
||||
options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||
<programlisting>options ICMP_BANDLIM #Rate limit bad replies</programlisting>
|
||||
|
||||
<para>This option enables ICMP error response bandwidth limiting. You
|
||||
typically want this option as it will help protect the machine from
|
||||
denial of service packet attacks.</para>
|
||||
|
||||
<programlisting>
|
||||
# To make an SMP kernel, the next two are needed
|
||||
<programlisting># To make an SMP kernel, the next two are needed
|
||||
#options SMP # Symmetric MultiProcessor Kernel
|
||||
#options APIC_IO # Symmetric (APIC) I/O</programlisting>
|
||||
|
||||
<para>The above are both required for SMP support.</para>
|
||||
|
||||
<programlisting>
|
||||
# Optionally these may need tweaked, (defaults shown):
|
||||
<programlisting># Optionally these may need tweaked, (defaults shown):
|
||||
#options NCPU=2 # number of CPUs
|
||||
#options NBUS=4 # number of busses
|
||||
#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
|
||||
bus.</para>
|
||||
|
||||
<programlisting>
|
||||
# Floppy drives
|
||||
<programlisting># Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
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
|
||||
PCI ATA/ATAPI devices on modern machines.</para>
|
||||
|
||||
<programlisting>
|
||||
device atadisk # ATA disk drives</programlisting>
|
||||
<programlisting>device atadisk # ATA disk drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
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
|
||||
ATAPI CDROM drives.</para>
|
||||
|
||||
<programlisting>
|
||||
device atapifd # ATAPI floppy drives</programlisting>
|
||||
<programlisting>device atapifd # ATAPI floppy drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
ATAPI floppy drives.</para>
|
||||
|
||||
<programlisting>
|
||||
device atapist # ATAPI tape drives</programlisting>
|
||||
<programlisting>device atapist # ATAPI tape drives</programlisting>
|
||||
|
||||
<para>This is needed along with <literal>device ata</literal> for
|
||||
ATAPI tape drives.</para>
|
||||
|
||||
<programlisting>
|
||||
options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||
<programlisting>options ATA_STATIC_ID #Static device numbering</programlisting>
|
||||
|
||||
<para>This makes the controller number static (like the old driver) or
|
||||
else the device numbers are dynamically allocated.</para>
|
||||
|
||||
<programlisting>
|
||||
#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||
<programlisting>#options ATA_ENABLE_ATAPI_DMA #Enable DMA on ATAPI devices</programlisting>
|
||||
|
||||
<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
|
||||
off by default.</para>
|
||||
|
||||
<programlisting>
|
||||
# ATA and ATAPI devices
|
||||
<programlisting># ATA and ATAPI devices
|
||||
device ata0 at isa? port IO_WD1 irq 14
|
||||
device ata1 at isa? port IO_WD2 irq 15</programlisting>
|
||||
|
||||
<para>Use the above for older, non-PCI systems.</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI Controllers
|
||||
<programlisting># SCSI Controllers
|
||||
device ahb # EISA AHA1742 family
|
||||
device ahc # AHA2940 and onboard AIC7xxx devices
|
||||
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
|
||||
altogether.</para>
|
||||
|
||||
<programlisting>
|
||||
# SCSI peripherals
|
||||
<programlisting># SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
device da # Direct Access (disks)
|
||||
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
|
||||
you have only IDE hardware, you can remove them completely.</para>
|
||||
|
||||
<programlisting>
|
||||
# RAID controllers
|
||||
<programlisting># RAID controllers
|
||||
device ida # Compaq Smart RAID
|
||||
device amr # AMI MegaRAID
|
||||
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,
|
||||
you can comment them out or remove them.</para>
|
||||
|
||||
<programlisting>
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
<programlisting># atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD</programlisting>
|
||||
|
||||
<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>psm</literal>).</para>
|
||||
|
||||
<programlisting>
|
||||
device atkbd0 at atkbdc? irq 1</programlisting>
|
||||
<programlisting>device atkbd0 at atkbdc? irq 1</programlisting>
|
||||
|
||||
<para>The <literal>atkbd</literal> driver, together with
|
||||
<literal>atkbdc</literal> controller, provides access to the AT 84
|
||||
keyboard or the AT enhanced keyboard which is connected to the AT
|
||||
keyboard controller.</para>
|
||||
|
||||
<programlisting>
|
||||
device psm0 at atkbdc? irq 12</programlisting>
|
||||
<programlisting>device psm0 at atkbdc? irq 12</programlisting>
|
||||
|
||||
<para>Use this device if your mouse plugs into the PS/2 mouse
|
||||
port.</para>
|
||||
|
@ -698,15 +660,13 @@ device psm0 at atkbdc? irq 12</programlisting>
|
|||
|
||||
<para>The video card driver.</para>
|
||||
|
||||
<programlisting>
|
||||
# splash screen/screen saver
|
||||
<programlisting># splash screen/screen saver
|
||||
pseudo-device splash</programlisting>
|
||||
|
||||
<para>Splash screen at start up! Screen savers require this
|
||||
too.</para>
|
||||
|
||||
<programlisting>
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
<programlisting># syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?</programlisting>
|
||||
|
||||
<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
|
||||
full-screen programs have trouble running under this console.</para>
|
||||
|
||||
<programlisting>
|
||||
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||
<programlisting># Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
|
||||
#device vt0 at isa?
|
||||
#options XSERVER # support for X server on a vt console
|
||||
#options FAT_CURSOR # start with block cursor
|
||||
|
@ -737,8 +696,7 @@ device sc0 at isa?</programlisting>
|
|||
device are often not available — <literal>vt100</literal>
|
||||
should be available on virtually any platform.</para>
|
||||
|
||||
<programlisting>
|
||||
# Floating point support - do not disable.
|
||||
<programlisting># Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 13</programlisting>
|
||||
|
||||
<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>
|
||||
optional.</para>
|
||||
|
||||
<programlisting>
|
||||
# Power management support (see LINT for more options)
|
||||
<programlisting># Power management support (see LINT for more options)
|
||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management</programlisting>
|
||||
|
||||
<para>Advanced Power Management support. Useful for laptops.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCCARD (PCMCIA) support
|
||||
<programlisting># PCCARD (PCMCIA) support
|
||||
device card
|
||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||
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
|
||||
laptop.</para>
|
||||
|
||||
<programlisting>
|
||||
# Serial (COM) ports
|
||||
<programlisting># Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
# Parallel port
|
||||
<programlisting># Parallel port
|
||||
device ppc0 at isa? irq 7</programlisting>
|
||||
|
||||
<para>This is the ISA-bus parallel port interface.</para>
|
||||
|
||||
<programlisting>
|
||||
device ppbus # Parallel port bus (required)</programlisting>
|
||||
<programlisting>device ppbus # Parallel port bus (required)</programlisting>
|
||||
|
||||
<para>Provides support for the parallel port bus.</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt # Printer</programlisting>
|
||||
<programlisting>device lpt # Printer</programlisting>
|
||||
|
||||
<para>Support for parallel port printers.</para>
|
||||
|
||||
|
@ -810,26 +762,22 @@ device lpt # Printer</programlisting>
|
|||
support.</para>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
device plip # TCP/IP over parallel</programlisting>
|
||||
<programlisting>device plip # TCP/IP over parallel</programlisting>
|
||||
|
||||
<para>This is the driver for the parallel network interface.</para>
|
||||
|
||||
<programlisting>
|
||||
device ppi # Parallel port interface device</programlisting>
|
||||
<programlisting>device ppi # Parallel port interface device</programlisting>
|
||||
|
||||
<para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
|
||||
I/O.</para>
|
||||
|
||||
<programlisting>
|
||||
#device vpo # Requires scbus and da</programlisting>
|
||||
<programlisting>#device vpo # Requires scbus and da</programlisting>
|
||||
|
||||
<para>This is for an Iomega Zip drive. It requires
|
||||
<literal>scbus</literal> and <literal>da</literal> support. Best
|
||||
performance is achieved with ports in EPP 1.9 mode.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCI Ethernet NICs.
|
||||
<programlisting># PCI Ethernet NICs.
|
||||
device de # DEC/Intel DC21x4x (<quote>Tulip</quote>)
|
||||
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
|
||||
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
|
||||
these not present in your system.</para>
|
||||
|
||||
<programlisting>
|
||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
||||
<programlisting># PCI Ethernet NICs that use the common MII bus controller code.
|
||||
device miibus # MII bus support</programlisting>
|
||||
|
||||
<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
|
||||
by an individual driver</para>
|
||||
|
||||
<programlisting>
|
||||
device dc # DEC/Intel 21143 and various workalikes
|
||||
<programlisting>device dc # DEC/Intel 21143 and various workalikes
|
||||
device rl # RealTek 8129/8139
|
||||
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
# ISA Ethernet NICs.
|
||||
<programlisting># ISA Ethernet NICs.
|
||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||
device ex
|
||||
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
|
||||
supported by which driver.</para>
|
||||
|
||||
<programlisting>
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
<programlisting># Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback</programlisting>
|
||||
|
||||
<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
|
||||
this pseudo-device. This is <emphasis>mandatory</emphasis>.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device ether # Ethernet support</programlisting>
|
||||
<programlisting>pseudo-device ether # Ethernet support</programlisting>
|
||||
|
||||
<para><literal>ether</literal> is only needed if you have an Ethernet
|
||||
card. It includes generic Ethernet protocol code.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||
<programlisting>pseudo-device sl 1 # Kernel SLIP</programlisting>
|
||||
|
||||
<para><literal>sl</literal> is for SLIP support. This has been almost
|
||||
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>
|
||||
specifies how many simultaneous SLIP sessions to support.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||
<programlisting>pseudo-device ppp 1 # Kernel PPP</programlisting>
|
||||
|
||||
<para>This is for kernel PPP support for dial-up connections. There
|
||||
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
|
||||
connections to support.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device tun # Packet tunnel.</programlisting>
|
||||
<programlisting>pseudo-device tun # Packet tunnel.</programlisting>
|
||||
|
||||
<para>This is used by the userland PPP software. The
|
||||
<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,
|
||||
up to a maximum of 256.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||
<programlisting>pseudo-device md # Memory <quote>disks</quote></programlisting>
|
||||
|
||||
<para>Memory disk pseudo-devices.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||
<programlisting>pseudo-device gif 4 # IPv6 and IPv4 tunneling</programlisting>
|
||||
|
||||
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6
|
||||
tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6
|
||||
tunneling.</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||
<programlisting>pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
|
||||
|
||||
<para>This pseudo-device captures packets that are sent to it and
|
||||
diverts them to the IPv4/IPv6 translation daemon.</para>
|
||||
|
||||
<programlisting>
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
<programlisting># The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
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;
|
||||
program.</para>
|
||||
|
||||
<programlisting>
|
||||
# USB support
|
||||
<programlisting># USB support
|
||||
#device uhci # UHCI PCI->USB interface
|
||||
#device ohci # OHCI PCI->USB interface
|
||||
#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
|
||||
to add is:</para>
|
||||
|
||||
<programlisting>
|
||||
device acd0</programlisting>
|
||||
<programlisting>device acd0</programlisting>
|
||||
|
||||
<para>This means that you should look for some entries that start with
|
||||
<filename>acd0</filename> in the <filename>/dev</filename>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -272,8 +272,7 @@
|
|||
and edit your configuration file. Uncomment (or add, if it does not
|
||||
exist) the following line</para>
|
||||
|
||||
<programlisting>
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting>
|
||||
<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,
|
||||
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
|
||||
|
||||
<programlisting>
|
||||
options DDB</programlisting>
|
||||
<programlisting>options DDB</programlisting>
|
||||
|
||||
to your config file, and rebuild. (See <link
|
||||
linkend="kernelconfig">Kernel Configuration</link> for details on
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -37,8 +37,7 @@
|
|||
concept in mind, i.e., the default can be overridden by the
|
||||
config option. This is usually done with something like:</para>
|
||||
|
||||
<programlisting>
|
||||
#ifndef THIS_OPTION
|
||||
<programlisting>#ifndef THIS_OPTION
|
||||
#define THIS_OPTION (some_default_value)
|
||||
#endif /* THIS_OPTION */</programlisting>
|
||||
|
||||
|
@ -52,8 +51,7 @@
|
|||
<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>
|
||||
|
||||
<programlisting>
|
||||
#ifdef THAT_OPTION
|
||||
<programlisting>#ifdef THAT_OPTION
|
||||
|
||||
[your code here]
|
||||
|
||||
|
@ -68,8 +66,7 @@
|
|||
is at least a single <literal>#ifdef</literal> referencing it...
|
||||
However, it's unlikely that many people would put</para>
|
||||
|
||||
<programlisting>
|
||||
options notyet,notdef</programlisting>
|
||||
<programlisting>options notyet,notdef</programlisting>
|
||||
|
||||
<para>in their config file, and then wonder why the kernel compilation
|
||||
falls over. <!-- smiley -->:-)</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -79,8 +79,7 @@
|
|||
Language Code, Country Code, and Encoding. Locale names are
|
||||
constructed from these parts as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||
<programlisting><replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
|
||||
|
||||
<sect2>
|
||||
<title>Language and Country Codes</title>
|
||||
|
@ -231,8 +230,7 @@
|
|||
directory which has both variables set for Latin-1
|
||||
encoding:</para>
|
||||
|
||||
<programlisting>
|
||||
german:German User:\
|
||||
<programlisting>german:German User:\
|
||||
:charset=ISO-8859-1:\
|
||||
:lang=de_DE.ISO_8859-1:</programlisting>
|
||||
|
||||
|
@ -242,8 +240,7 @@ german:German User:\
|
|||
more variables set because some software does not respect
|
||||
locale variables correctly for Chinese, Japanese, and Korean.</para>
|
||||
|
||||
<programlisting>
|
||||
#Users who do not wish to use monetary units or time formats
|
||||
<programlisting>#Users who do not wish to use monetary units or time formats
|
||||
#of Taiwan can manually change each variable
|
||||
taiwan:Taiwanese User:\
|
||||
lang=zh_TW.Big5:\
|
||||
|
@ -268,8 +265,7 @@ taiwan:Taiwanese User:\
|
|||
correct language user's class. Make sure these settings
|
||||
appear in <filename>/etc/login.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||
<programlisting><replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
|
||||
:charset=<replaceable>MIME_charset</replaceable>:\
|
||||
:lang=<replaceable>locale_name</replaceable>:\
|
||||
:tc=default:</programlisting>
|
||||
|
@ -277,8 +273,7 @@ taiwan:Taiwanese User:\
|
|||
<para>So sticking with our previous example using Latin-1, it
|
||||
would look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
german:German Users Accounts:\
|
||||
<programlisting>german:German Users Accounts:\
|
||||
:charset=ISO-8859-1:\
|
||||
:lang=de_DE.ISO_8859-1:\
|
||||
:tc=default:</programlisting>
|
||||
|
@ -288,8 +283,7 @@ german:German Users Accounts:\
|
|||
<para>Use <command>vipw</command> to add new users, and make
|
||||
the entry look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
|
||||
<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>
|
||||
|
||||
|
@ -348,14 +342,12 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
|
|||
|
||||
<para>In <filename>/etc/profile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar>
|
||||
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
|
||||
|
||||
<para>Or in <filename>/etc/csh.login</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar>
|
||||
<envar>setenv MM_CHARSET ISO-8859-1</envar></programlisting>
|
||||
|
||||
<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>
|
||||
|
||||
<programlisting>
|
||||
<envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||
<programlisting><envar>LANG=de_DE.ISO_8859-1; export LANG</envar></programlisting>
|
||||
|
||||
<para>Or:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||
<programlisting><envar>setenv LANG de_DE.ISO_8859-1</envar></programlisting>
|
||||
|
||||
<para>Depending on your shell (see above).</para>
|
||||
</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
|
||||
language in question with:</para>
|
||||
|
||||
<programlisting>
|
||||
font8x16=<replaceable>font_name</replaceable>
|
||||
<programlisting>font8x16=<replaceable>font_name</replaceable>
|
||||
font8x14=<replaceable>font_name</replaceable>
|
||||
font8x8=<replaceable>font_name</replaceable></programlisting>
|
||||
|
||||
|
@ -405,8 +394,7 @@ font8x8=<replaceable>font_name</replaceable></programlisting>
|
|||
<literal>Console</literal>. Alternatively, you can add the
|
||||
following to <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
scrnmap=<replaceable>screenmap_name</replaceable>
|
||||
<programlisting>scrnmap=<replaceable>screenmap_name</replaceable>
|
||||
keymap=<replaceable>keymap_name</replaceable>
|
||||
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,
|
||||
insert the following line into the kernel config.</para>
|
||||
|
||||
<programlisting>
|
||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
|
||||
<para>The <replaceable>keymap_name</replaceable> here is taken from
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
<envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||
<programlisting><envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
||||
|
||||
<para>In <literal>C</literal>-based shells:</para>
|
||||
|
||||
<programlisting>
|
||||
<envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||
<programlisting><envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
@ -701,8 +686,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
|
|||
<para>Put the following lines into your
|
||||
<filename>~/.login_conf</filename> file:</para>
|
||||
|
||||
<programlisting>
|
||||
me:My Account:\
|
||||
<programlisting>me:My Account:\
|
||||
:charset=KOI8-R:\
|
||||
:lang=ru_RU.KOI8-R:</programlisting>
|
||||
|
||||
|
@ -718,16 +702,14 @@ me:My Account:\
|
|||
<para>Add the following to your kernel configuration
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
<programlisting>options SC_MOUSE_CHAR=0x03</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Use following settings in
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
keymap="ru.koi8-r"
|
||||
<programlisting>keymap="ru.koi8-r"
|
||||
scrnmap="koi8-r2cp866"
|
||||
font8x16="cp866b-8x16"
|
||||
font8x14="cp866-8x14"
|
||||
|
@ -756,8 +738,7 @@ font8x8="cp866-8x8"</programlisting>
|
|||
A Russian printer <filename>/etc/printcap</filename> entry
|
||||
should look like:</para>
|
||||
|
||||
<programlisting>
|
||||
lp|Russian local line printer:\
|
||||
<programlisting>lp|Russian local line printer:\
|
||||
:sh:of=/usr/libexec/lpr/ru/koi2alt:\
|
||||
: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
|
||||
for Russian filenames in mounted MS-DOS filesystems:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/ad0s2 /dos/c msdos rw,-W=koi2dos,-L=ru_RU.KOI8-R 0 0</programlisting>
|
||||
<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
|
||||
<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
|
||||
<literal>FontPath</literal> entries:</para>
|
||||
|
||||
<programlisting>
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
XkbLayout "ru"
|
||||
<programlisting>XkbLayout "ru"
|
||||
XkbOptions "grp:caps_toggle"</programlisting>
|
||||
|
||||
<para>For XFree86 v4.*:</para>
|
||||
|
||||
<programlisting>
|
||||
Option "XkbLayout" "ru"
|
||||
<programlisting>Option "XkbLayout" "ru"
|
||||
Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
||||
|
||||
<para>Also make sure that <literal>XkbDisable</literal> is
|
||||
|
@ -855,13 +832,11 @@ Option "XkbOptions" "grp:caps_toggle"</programlisting>
|
|||
|
||||
<para>For XFree86 v3.*:</para>
|
||||
|
||||
<programlisting>
|
||||
XkbVariant "winkeys"</programlisting>
|
||||
<programlisting>XkbVariant "winkeys"</programlisting>
|
||||
|
||||
<para>For XFree86 v4.*:</para>
|
||||
|
||||
<programlisting>
|
||||
Option "XkbVariant" "winkeys"</programlisting>
|
||||
<programlisting>Option "XkbVariant" "winkeys"</programlisting>
|
||||
|
||||
<note>
|
||||
<para>The Russian XKB keyboard may not work with old XFree86
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -68,8 +68,7 @@
|
|||
<para>This, in turn, triggers the following action in
|
||||
<filename>/etc/rc.i386</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
# Start the Linux binary compatibility if requested.
|
||||
<programlisting># Start the Linux binary compatibility if requested.
|
||||
#
|
||||
case ${linux_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
|
@ -261,8 +260,7 @@ Abort</screen>
|
|||
<filename>/compat/linux/etc/host.conf</filename> file
|
||||
containing:</para>
|
||||
|
||||
<programlisting>
|
||||
order hosts, bind
|
||||
<programlisting>order hosts, bind
|
||||
multi on</programlisting>
|
||||
|
||||
<para>The order here specifies that <filename>/etc/hosts</filename>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -172,13 +172,11 @@
|
|||
|
||||
<para>As a good workaround, you can place the line:
|
||||
|
||||
<programlisting>
|
||||
search foo.bar.edu bar.edu</programlisting>
|
||||
<programlisting>search foo.bar.edu bar.edu</programlisting>
|
||||
|
||||
instead of the previous:
|
||||
|
||||
<programlisting>
|
||||
domain foo.bar.edu</programlisting>
|
||||
<programlisting>domain foo.bar.edu</programlisting>
|
||||
|
||||
into your <filename>/etc/resolv.conf</filename>. However, make
|
||||
sure that the search order does not go beyond the
|
||||
|
@ -196,8 +194,7 @@ domain foo.bar.edu</programlisting>
|
|||
<answer>
|
||||
<para>This is answered in the sendmail FAQ as follows:</para>
|
||||
|
||||
<programlisting>
|
||||
* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||
<programlisting>* I am getting <quote>Local configuration error</quote> messages, such as:
|
||||
|
||||
553 relay.domain.net config error: mail loops back to myself
|
||||
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
|
||||
service for your domain. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
bigco.com. MX 10 bigco.com.
|
||||
<programlisting>bigco.com. MX 10 bigco.com.
|
||||
MX 20 smalliap.com.</programlisting>
|
||||
|
||||
<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
|
||||
script.</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
# Put me in /usr/local/bin/pppbigco
|
||||
( sleep 60 ; /usr/sbin/sendmail -q ) &
|
||||
/usr/sbin/ppp -direct pppbigco</programlisting>
|
||||
|
@ -271,8 +266,7 @@ bigco.com. MX 10 bigco.com.
|
|||
|
||||
<para>Message stolen from the &a.isp;.</para>
|
||||
|
||||
<programlisting>
|
||||
> we provide the secondary MX for a customer. The customer connects to
|
||||
<programlisting>> we provide the secondary MX for a customer. The customer connects 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
|
||||
> 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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
freefall MX 30 mail.crl.net
|
||||
<programlisting>freefall MX 30 mail.crl.net
|
||||
freefall MX 40 agora.rdrop.com
|
||||
freefall MX 10 freefall.FreeBSD.org
|
||||
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
|
||||
your DNS configuration like so:</para>
|
||||
|
||||
<programlisting>
|
||||
example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||
<programlisting>example.FreeBSD.org A 204.216.27.XX ; Workstation
|
||||
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
|
||||
|
||||
<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
|
||||
should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
customer1.org MX 10 mail.myhost.com</programlisting>
|
||||
<programlisting>customer1.org MX 10 mail.myhost.com</programlisting>
|
||||
|
||||
<para>You do <emphasis>not</emphasis> need an A record if you only
|
||||
want to handle email for the domain.</para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1778,8 +1778,7 @@
|
|||
simply list the collections, one per line (in this case,
|
||||
only one line):</para>
|
||||
|
||||
<programlisting>
|
||||
src-all</programlisting>
|
||||
<programlisting>src-all</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2016,8 +2015,7 @@ src-all</programlisting>
|
|||
add this line at the beginning of our
|
||||
<filename>supfile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default tag=.</programlisting>
|
||||
<programlisting>*default tag=.</programlisting>
|
||||
|
||||
<para>There is an important special case that comes into play
|
||||
if you specify neither a <literal>tag=</literal> field nor a
|
||||
|
@ -2044,8 +2042,7 @@ src-all</programlisting>
|
|||
use a fictional FreeBSD distribution site,
|
||||
<hostid role="fqdn">cvsup666.FreeBSD.org</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default host=cvsup666.FreeBSD.org</programlisting>
|
||||
<programlisting>*default host=cvsup666.FreeBSD.org</programlisting>
|
||||
|
||||
<para>You will need to change the host to one that actually
|
||||
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
|
||||
correct specification:</para>
|
||||
|
||||
<programlisting>
|
||||
*default prefix=/usr</programlisting>
|
||||
<programlisting>*default prefix=/usr</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2081,8 +2077,7 @@ src-all</programlisting>
|
|||
already received. We will use the standard base directory,
|
||||
<filename>/usr/local/etc/cvsup</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default base=/usr/local/etc/cvsup</programlisting>
|
||||
<programlisting>*default base=/usr/local/etc/cvsup</programlisting>
|
||||
|
||||
<para>This setting is used by default if it is not specified
|
||||
in the <filename>supfile</filename>, so we actually do not
|
||||
|
@ -2102,8 +2097,7 @@ src-all</programlisting>
|
|||
needs to be present in the
|
||||
<filename>supfile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||
<programlisting>*default release=cvs delete use-rel-suffix compress</programlisting>
|
||||
|
||||
<para><literal>release=cvs</literal> indicates that the server
|
||||
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
|
||||
example:</para>
|
||||
|
||||
<programlisting>
|
||||
*default tag=.
|
||||
<programlisting>*default tag=.
|
||||
*default host=cvsup666.FreeBSD.org
|
||||
*default prefix=/usr
|
||||
*default base=/usr/local/etc/cvsup
|
||||
|
@ -3755,8 +3748,7 @@ src-all</programlisting>
|
|||
<para>The path to the files are:
|
||||
<filename>/afs/stacken.kth.se/ftp/pub/FreeBSD/</filename></para>
|
||||
|
||||
<programlisting>
|
||||
stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||
<programlisting>stacken.kth.se # Stacken Computer Club, KTH, Sweden
|
||||
130.237.234.43 #hot.stacken.kth.se
|
||||
130.237.237.230 #fishburger.stacken.kth.se
|
||||
130.237.234.3 #milko.stacken.kth.se</programlisting>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1187,8 +1187,7 @@ F/U/FPM/mYbWNUELgSmN/YkSwWLGgfjcCObTwgd0FOW7XZuJ71R7ytBEn5kDt3bc
|
|||
vULsB4kAPwMFGDSMdS7YyjFxW6BSwxECd5YAoKUcWpHjSL1KbOH3Ud52avzESk7C
|
||||
AKCOQUeC622jsKntTOR5R9Vv4wyyKQ==
|
||||
=L8Lf
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1414,8 +1413,7 @@ gVMMZjZ7QiiO1LGl6IIiKRtJIXi45PcHtYgSZlXKflqPHhEIrOhFwpV+C7uL5jnv
|
|||
ATGhlLHxWuNLTlPAVD5FsdJdOHI7UdkJh19JpphV+usu/mihMFEfM/kOVJeTXed1
|
||||
0E4T
|
||||
=Qwmg
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1476,8 +1474,7 @@ cJowZeBj8Ss1QZsVzeyfAAQLA/0ZwjK242AXkXjibtzEfZqK7l22D9xIT+ajc6zP
|
|||
7d/fJohMBBgRAgAMBQI6YpCpBQkB4TOAAAoJEG0Me8YVvhIOT9EAoKloqPBTtp9p
|
||||
JAEew3wXXri0oNIvAKDP6fbrVo2vbD2iZXw2m3Y2E/z5qA==
|
||||
=rQiL
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</programlisting>
|
||||
-----END PGP PUBLIC KEY BLOCK-----</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -21,8 +21,7 @@
|
|||
maintained by a person or group of persons, they can communicate this
|
||||
fact to the world by adding a
|
||||
|
||||
<programlisting>
|
||||
MAINTAINER= email-addresses</programlisting>
|
||||
<programlisting>MAINTAINER= email-addresses</programlisting>
|
||||
|
||||
line to the <filename>Makefile</filename>s covering this portion of the
|
||||
source tree.</para>
|
||||
|
@ -178,8 +177,7 @@ MAINTAINER= email-addresses</programlisting>
|
|||
FREEBSD-upgrade ; cvs ci</command> after the initial import. Example
|
||||
wording from <filename>src/contrib/cpio</filename> is below:</para>
|
||||
|
||||
<programlisting>
|
||||
This directory contains virgin sources of the original distribution files
|
||||
<programlisting>This directory contains virgin sources of the original distribution files
|
||||
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
|
||||
official-patch versions must be imported. Please remember to import with
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -133,8 +133,7 @@
|
|||
configuration file. It should have the following line somewhere
|
||||
in it:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device tun 1</programlisting>
|
||||
<programlisting>pseudo-device tun 1</programlisting>
|
||||
|
||||
<para>If this line is not present, you will need to add it to the
|
||||
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
|
||||
order):</para>
|
||||
|
||||
<programlisting>
|
||||
hosts
|
||||
<programlisting>hosts
|
||||
bind</programlisting>
|
||||
|
||||
<para>These instruct the resolver to first look in the file
|
||||
|
@ -270,8 +268,7 @@ bind</programlisting>
|
|||
role="ipaddr">10.0.0.1</hostid>,
|
||||
<filename>/etc/hosts</filename> should contain:</para>
|
||||
|
||||
<programlisting>
|
||||
127.0.0.1 localhost.bar.com localhost
|
||||
<programlisting>127.0.0.1 localhost.bar.com localhost
|
||||
127.0.0.1 localhost.bar.com.
|
||||
10.0.0.1 foo.bar.com foo
|
||||
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
|
||||
the following line(s):</para>
|
||||
|
||||
<programlisting>
|
||||
domain <replaceable>bar.com</replaceable>
|
||||
<programlisting>domain <replaceable>bar.com</replaceable>
|
||||
nameserver <replaceable>x.x.x.x</replaceable>
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
1 default:
|
||||
<programlisting>1 default:
|
||||
2 set device /dev/cuaa0
|
||||
3 set speed 115200
|
||||
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
|
||||
Addresses</link>, with the following change:</para>
|
||||
|
||||
<programlisting>
|
||||
9 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</programlisting>
|
||||
<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
|
||||
reference. Indentation of at least one space is
|
||||
|
@ -583,8 +577,7 @@ protocol: ppp</screen>
|
|||
used. The following entry will delete the existing bogus
|
||||
routes, and create correct ones:</para>
|
||||
|
||||
<programlisting>
|
||||
1 provider:
|
||||
<programlisting>1 provider:
|
||||
2 delete ALL
|
||||
3 add 0 0 HISADDR</programlisting>
|
||||
|
||||
|
@ -655,8 +648,7 @@ protocol: ppp</screen>
|
|||
also confirm that the <filename>/etc/rc.conf</filename> file
|
||||
contains the following:</para>
|
||||
|
||||
<programlisting>
|
||||
gateway="YES"</programlisting>
|
||||
<programlisting>gateway="YES"</programlisting>
|
||||
|
||||
<sect5>
|
||||
<title>Which getty?</title>
|
||||
|
@ -702,8 +694,7 @@ gateway="YES"</programlisting>
|
|||
sections of the configuration file using the
|
||||
<command>allow</command> command:</para>
|
||||
|
||||
<programlisting>
|
||||
allow users fred mary</programlisting>
|
||||
<programlisting>allow users fred mary</programlisting>
|
||||
|
||||
<para>If this command is used in the <literal>default</literal>
|
||||
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
|
||||
following:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
|
||||
CALLEDAS="$IDENT"
|
||||
TTY=`tty`
|
||||
|
@ -745,8 +735,7 @@ exec /usr/sbin/ppp -direct $IDENT</programlisting>
|
|||
<username>pchilds</username> (remember don't directly edit
|
||||
the password file, use <command>vipw</command>).</para>
|
||||
|
||||
<programlisting>
|
||||
pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||
<programlisting>pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
|
||||
|
||||
<para>Create a <filename>/home/ppp</filename> directory that
|
||||
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
|
||||
contain something along the lines of:</para>
|
||||
|
||||
<programlisting>
|
||||
default:
|
||||
<programlisting>default:
|
||||
set debug phase lcp chat
|
||||
set timeout 0
|
||||
|
||||
|
@ -823,8 +811,7 @@ ttyd1:
|
|||
<username>sam</username>, and <username>mary</username>
|
||||
example.</para>
|
||||
|
||||
<programlisting>
|
||||
fred:
|
||||
<programlisting>fred:
|
||||
set ifaddr 203.14.100.1 203.14.101.1 255.255.255.255
|
||||
|
||||
sam:
|
||||
|
@ -839,8 +826,7 @@ mary:
|
|||
role="ipaddr">203.14.101.0</hostid> class C via the
|
||||
client's ppp link.</para>
|
||||
|
||||
<programlisting>
|
||||
fred:
|
||||
<programlisting>fred:
|
||||
add 203.14.101.0 netmask 255.255.255.0 HISADDR
|
||||
|
||||
sam:
|
||||
|
@ -876,8 +862,7 @@ mary:
|
|||
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
|
||||
file has the following in it:</para>
|
||||
|
||||
<programlisting>
|
||||
/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||
<programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
|
||||
|
||||
<para>This will tell <command>mgetty</command> to run the
|
||||
<filename>ppp-pap-dialup</filename> script for detected PPP
|
||||
|
@ -887,8 +872,7 @@ mary:
|
|||
<filename>/etc/ppp/ppp-pap-dialup</filename> containing the
|
||||
following (the file should be executable):</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
|
||||
|
||||
<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
|
||||
above.</para>
|
||||
|
||||
<programlisting>
|
||||
pap:
|
||||
<programlisting>pap:
|
||||
enable pap
|
||||
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
|
||||
enable proxy</programlisting>
|
||||
|
@ -909,8 +892,7 @@ pap:
|
|||
alternatively add the following option to authenticate users
|
||||
via PAP from <filename>/etc/password</filename> file.</para>
|
||||
|
||||
<programlisting>
|
||||
enable passwdauth</programlisting>
|
||||
<programlisting>enable passwdauth</programlisting>
|
||||
|
||||
<para>If you wish to assign some users a static IP number, you
|
||||
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
|
||||
<filename>/etc/ppp/ppp.conf</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
enable msext
|
||||
<programlisting>enable msext
|
||||
set ns 203.14.100.1 203.14.100.2
|
||||
set nbns 203.14.100.5</programlisting>
|
||||
|
||||
<para>And for PPP version 2 and above:</para>
|
||||
|
||||
<programlisting>
|
||||
accept dns
|
||||
<programlisting>accept dns
|
||||
set dns 203.14.100.1 203.14.100.2
|
||||
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>
|
||||
sections, the following alterations must be made:</para>
|
||||
|
||||
<programlisting>
|
||||
7 set login
|
||||
<programlisting>7 set login
|
||||
…
|
||||
12 set authname <replaceable>MyUserName</replaceable>
|
||||
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
|
||||
add an additional line, such as:</para>
|
||||
|
||||
<programlisting>
|
||||
15 accept PAP</programlisting>
|
||||
<programlisting>15 accept PAP</programlisting>
|
||||
|
||||
<para>or</para>
|
||||
|
||||
<programlisting>
|
||||
15 accept CHAP</programlisting>
|
||||
<programlisting>15 accept CHAP</programlisting>
|
||||
|
||||
<para>to make it obvious that this is the intention, but
|
||||
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
|
||||
following line to your configuration:</para>
|
||||
|
||||
<programlisting>
|
||||
set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||
<programlisting>set server /var/run/ppp-tun%d DiagnosticPassword 0177</programlisting>
|
||||
|
||||
<para>This will tell PPP to listen to the specified unix-domain
|
||||
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
|
||||
<literal>hostname=</literal> line is set, e.g.:</para>
|
||||
|
||||
<programlisting>
|
||||
hostname="foo.bar.com"</programlisting>
|
||||
<programlisting>hostname="foo.bar.com"</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -1073,8 +1048,7 @@ hostname="foo.bar.com"</programlisting>
|
|||
make sure the <devicename>tun0</devicename> device is added to
|
||||
the list, otherwise remove it.</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||
<programlisting>network_interfaces="lo0 tun0" ifconfig_tun0=</programlisting>
|
||||
|
||||
<note>
|
||||
<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.
|
||||
This file should contain the line:</para>
|
||||
|
||||
<programlisting>
|
||||
ppp -auto mysystem</programlisting>
|
||||
<programlisting>ppp -auto mysystem</programlisting>
|
||||
|
||||
<para>This script is executed at network configuration time,
|
||||
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
|
||||
following line in your <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
router_enable="NO"</programlisting>
|
||||
<programlisting>router_enable="NO"</programlisting>
|
||||
|
||||
<para>It is important that the <command>routed</command> daemon is
|
||||
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.
|
||||
You may try:</para>
|
||||
|
||||
<programlisting>
|
||||
sendmail_flags="-bd"</programlisting>
|
||||
<programlisting>sendmail_flags="-bd"</programlisting>
|
||||
|
||||
<para>The downside of this is that you must force
|
||||
<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
|
||||
<filename>ppp.linkup</filename> to do this automatically:</para>
|
||||
|
||||
<programlisting>
|
||||
1 provider:
|
||||
<programlisting>1 provider:
|
||||
2 delete ALL
|
||||
3 add 0 0 HISADDR
|
||||
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
|
||||
connect to CISCO terminal server PPP line.</para>
|
||||
|
||||
<programlisting>
|
||||
crtscts # enable hardware flow control
|
||||
<programlisting>crtscts # enable hardware flow control
|
||||
modem # modem control line
|
||||
noipdefault # remote PPP server must supply your IP address.
|
||||
# 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
|
||||
all 3 stages automatically:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
|
@ -1361,8 +1329,7 @@ pppd /dev/tty01 19200</programlisting>
|
|||
<para>Use the following <filename>/etc/ppp/pppdown</filename> script
|
||||
to disconnect the PPP line:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
echo 'pppd running: PID=' ${pid-NONE}
|
||||
|
@ -1401,8 +1367,7 @@ ifconfig ppp0</programlisting>
|
|||
<filename>/etc/ppp/kermit.hup</filename>, which should
|
||||
contain:</para>
|
||||
|
||||
<programlisting>
|
||||
set line /dev/tty01 ; put your modem device here
|
||||
<programlisting>set line /dev/tty01 ; put your modem device here
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
|
@ -1429,8 +1394,7 @@ exit</programlisting>
|
|||
|
||||
<para><filename>/etc/ppp/options</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
/dev/cuaa1 115200
|
||||
<programlisting>/dev/cuaa1 115200
|
||||
|
||||
crtscts # enable hardware flow control
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||
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
|
||||
similar to the following:</para>
|
||||
|
||||
<programlisting>
|
||||
crtscts # Hardware flow control
|
||||
<programlisting>crtscts # Hardware flow control
|
||||
netmask 255.255.255.0 # netmask ( not required )
|
||||
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
||||
# 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
|
||||
server:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
|
@ -1521,8 +1482,7 @@ pppd /dev/tty01 19200</programlisting>
|
|||
<para>Use this <filename>/etc/ppp/pppservdown</filename> script to
|
||||
stop the server:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
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
|
||||
autoanswer mode on your modem. It should look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
set line /dev/tty01
|
||||
<programlisting>set line /dev/tty01
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
|
@ -1575,8 +1534,7 @@ exit</programlisting>
|
|||
in this script; you will also need to change the input statement
|
||||
depending on responses from your modem and remote host.</para>
|
||||
|
||||
<programlisting>
|
||||
;
|
||||
<programlisting>;
|
||||
; put the com line attached to the modem here:
|
||||
;
|
||||
set line /dev/tty01
|
||||
|
@ -1756,8 +1714,7 @@ exit 1
|
|||
<para>Here is an example of a working
|
||||
<filename>ppp.conf</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
default: # or name_of_service_provider
|
||||
<programlisting>default: # or name_of_service_provider
|
||||
set device PPPoE:xl1 # replace xl1 with your ethernet device
|
||||
set mru 1492
|
||||
set mtu 1492
|
||||
|
@ -1797,8 +1754,7 @@ papchap:
|
|||
<para>Add the following to your <filename>/etc/rc.conf</filename>
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
ppp_enable="YES"
|
||||
<programlisting>ppp_enable="YES"
|
||||
ppp_mode="ddial"
|
||||
ppp_nat="YES"
|
||||
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
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 1</programlisting>
|
||||
<programlisting>pseudo-device sl 1</programlisting>
|
||||
|
||||
<para>It is included in the <filename>GENERIC</filename> kernel, so
|
||||
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
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
127.0.0.1 localhost loghost
|
||||
<programlisting>127.0.0.1 localhost loghost
|
||||
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
|
||||
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
|
||||
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
|
||||
says:</para>
|
||||
|
||||
<programlisting>
|
||||
hostname=<quote>myname.my.domain</quote></programlisting>
|
||||
<programlisting>hostname=<quote>myname.my.domain</quote></programlisting>
|
||||
|
||||
<para>You should give it your full Internet
|
||||
hostname.</para>
|
||||
|
@ -1885,34 +1838,29 @@ hostname=<quote>myname.my.domain</quote></programlisting>
|
|||
<para>Add sl0 to the list of network interfaces by
|
||||
changing the line that says:</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces="lo0"</programlisting>
|
||||
<programlisting>network_interfaces="lo0"</programlisting>
|
||||
|
||||
<para>to:</para>
|
||||
|
||||
<programlisting>
|
||||
network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||
<programlisting>network_interfaces=<quote>lo0 sl0</quote></programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Set the startup flags of sl0 by adding a
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||
<programlisting>ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Designate the default router by changing the
|
||||
line:</para>
|
||||
|
||||
<programlisting>
|
||||
defaultrouter=<quote>NO</quote></programlisting>
|
||||
<programlisting>defaultrouter=<quote>NO</quote></programlisting>
|
||||
|
||||
<para>to:</para>
|
||||
|
||||
<programlisting>
|
||||
defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||
<programlisting>defaultrouter=<quote>slip-gateway</quote></programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</step>
|
||||
|
@ -1921,8 +1869,7 @@ defaultrouter=<quote>slip-gateway</quote></programlisting>
|
|||
<para>Make a file <filename>/etc/resolv.conf</filename> which
|
||||
contains:</para>
|
||||
|
||||
<programlisting>
|
||||
domain HIP.Berkeley.EDU
|
||||
<programlisting>domain HIP.Berkeley.EDU
|
||||
nameserver 128.32.136.9
|
||||
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
|
||||
script like this:</para>
|
||||
|
||||
<programlisting>
|
||||
# kermit setup
|
||||
<programlisting># kermit setup
|
||||
set modem hayes
|
||||
set line /dev/modem
|
||||
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
|
||||
line):</para>
|
||||
|
||||
<programlisting>
|
||||
Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||
<programlisting>Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
|
||||
|
||||
<para>When <username>Shelmerg</username> logs in,
|
||||
<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
|
||||
reads:</para>
|
||||
|
||||
<programlisting>
|
||||
Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
<programlisting>Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
|
||||
<para><command>sliplogin</command> will find that matching line,
|
||||
hook the serial line into the next available SLIP interface,
|
||||
and then execute <filename>/etc/sliphome/slip.login</filename>
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
<programlisting>/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
|
||||
|
||||
<para>If all goes well,
|
||||
<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>)
|
||||
is a line that reads:</para>
|
||||
|
||||
<programlisting>
|
||||
pseudo-device sl 2</programlisting>
|
||||
<programlisting>pseudo-device sl 2</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2293,8 +2235,7 @@ pseudo-device sl 2</programlisting>
|
|||
<filename>/etc/sliphome/slip.hosts</filename> looks like
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# login local-addr remote-addr mask opt1 opt2
|
||||
# (normal,compress,noicmp)
|
||||
#
|
||||
|
@ -2371,8 +2312,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
<para>The typical <filename>/etc/sliphome/slip.login</filename>
|
||||
file looks like this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)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>
|
||||
file will need to look something like this:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)slip.login 5.1 (Berkeley) 7/1/90
|
||||
|
||||
|
@ -2457,8 +2396,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
example of a basic
|
||||
<filename>slip.logout</filename> script:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# slip.logout
|
||||
|
||||
|
@ -2474,8 +2412,7 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting
|
|||
have <filename>/etc/sliphome/slip.logout</filename> remove the
|
||||
ARP entry for the SLIP client:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh -
|
||||
<programlisting>#!/bin/sh -
|
||||
#
|
||||
# @(#)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
|
||||
FreeBSD SLIP server:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# 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
|
||||
#
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -482,8 +482,7 @@ sio2: type 16550A</screen>
|
|||
<para>If you want interrupt-driven mode, add the
|
||||
<literal>irq</literal> specifier:</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||
<programlisting>device lpt0 at isa? port? tty irq <replaceable>N</replaceable> vector lptintr</programlisting>
|
||||
|
||||
<para>Where <replaceable>N</replaceable> is the IRQ
|
||||
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
|
||||
<literal>irq</literal> specifier:</para>
|
||||
|
||||
<programlisting>
|
||||
device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||
<programlisting>device lpt0 at isa? port? tty vector lptintr</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</step>
|
||||
|
@ -553,8 +551,7 @@ device lpt0 at isa? port? tty vector lptintr</programlisting>
|
|||
will need a more sophisticated test. A small PostScript
|
||||
program, such as the following, will suffice:</para>
|
||||
|
||||
<programlisting>
|
||||
%!PS
|
||||
<programlisting>%!PS
|
||||
100 100 moveto 300 300 lineto stroke
|
||||
310 310 moveto /Helvetica findfont 12 scalefont setfont
|
||||
(Is this thing working?) show
|
||||
|
@ -650,8 +647,7 @@ showpage</programlisting>
|
|||
<para>Edit the file <filename>/etc/remote</filename>. Add
|
||||
the following entry:</para>
|
||||
|
||||
<programlisting>
|
||||
printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
|
||||
<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
|
||||
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
|
||||
no parity:</para>
|
||||
|
||||
<programlisting>
|
||||
printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||
<programlisting>printer:dv=/dev/ttyd2:br#19200:pa=none</programlisting>
|
||||
</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
|
||||
laser printer):</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose
|
||||
#
|
||||
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>
|
||||
added:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - no header pages anywhere
|
||||
#
|
||||
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
|
||||
<literal>sd</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added spooling directories
|
||||
#
|
||||
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
|
||||
the additions to <filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - identified what devices to use
|
||||
#
|
||||
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>
|
||||
flags:</para>
|
||||
|
||||
<programlisting>
|
||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
:sh:sd=/var/spool/lpd/bamboo:\
|
||||
:lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
|
||||
</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
|
||||
favorite text editor:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# if-simple - Simple text input filter for lpd
|
||||
# Installed in /usr/local/libexec/if-simple
|
||||
|
@ -1190,8 +1179,7 @@ exit 2</programlisting>
|
|||
printers we have so far in the example
|
||||
<filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added text filter
|
||||
#
|
||||
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
|
||||
results should look like the following:</para>
|
||||
|
||||
<programlisting>
|
||||
!"#$%&'()*+,-./01234
|
||||
<programlisting>!"#$%&'()*+,-./01234
|
||||
"#$%&'()*+,-./012345
|
||||
#$%&'()*+,-./0123456
|
||||
$%&'()*+,-./01234567
|
||||
|
@ -1636,8 +1623,7 @@ $%&'()*+,-./01234567
|
|||
PostScript printer's entry in
|
||||
<filename>/etc/printcap</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
:if=/usr/local/libexec/psif:</programlisting>
|
||||
<programlisting>:if=/usr/local/libexec/psif:</programlisting>
|
||||
|
||||
<para>You should also specify the <literal>rw</literal> capability;
|
||||
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
|
||||
script as the text filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# psif - Print PostScript or plain text on a PostScript printer
|
||||
# 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
|
||||
Ghostscript supports.)</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
|
||||
# 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
|
||||
<literal>if</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
:if=/usr/local/libexec/hpif:</programlisting>
|
||||
<programlisting>:if=/usr/local/libexec/hpif:</programlisting>
|
||||
|
||||
<para>That is it. You can type <command>lpr plain.text</command> and
|
||||
<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
|
||||
<literal>bamboo</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - added df filter for bamboo
|
||||
#
|
||||
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
|
||||
script:</para>
|
||||
|
||||
<programlisting>
|
||||
#!bin/sh
|
||||
<programlisting>#!bin/sh
|
||||
#
|
||||
# psdf - DVI to PostScript printer filter
|
||||
# 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
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpvf - Convert GIF files into HP/PCL, then print
|
||||
# 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
|
||||
entry for a printer using the above filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
<literal>bamboo</literal>:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# pstf - Convert groff's troff data into PS, then print.
|
||||
# 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
|
||||
on a parallel port, we would use this script instead:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# pstf - Convert groff's troff data into PS, then print.
|
||||
# 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
|
||||
<filename>/etc/printcap</filename> to enable the filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:tf=/usr/local/libexec/pstf:</programlisting>
|
||||
<programlisting>:tf=/usr/local/libexec/pstf:</programlisting>
|
||||
|
||||
<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
|
||||
print plain text. We will install it for the printer
|
||||
<literal>teak</literal>:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hprf - FORTRAN text filter for LaserJet 3si:
|
||||
# Installed in /usr/local/libexec/hprf
|
||||
|
@ -2053,8 +2028,7 @@ exit 2</programlisting>
|
|||
<filename>/etc/printcap</filename> for the printer
|
||||
<literal>teak</literal> to enable this filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:rf=/usr/local/libexec/hprf:</programlisting>
|
||||
<programlisting>:rf=/usr/local/libexec/hprf:</programlisting>
|
||||
|
||||
<para>Here is one final, somewhat complex example. We will add a
|
||||
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
|
||||
filter:</para>
|
||||
|
||||
<programlisting>
|
||||
:df=/usr/local/libexec/hpdf:</programlisting>
|
||||
<programlisting>:df=/usr/local/libexec/hpdf:</programlisting>
|
||||
|
||||
<para>Now, for the hard part: making the filter. For that, we need
|
||||
a DVI-to-LaserJet/PCL conversion program. The FreeBSD ports
|
||||
|
@ -2103,8 +2076,7 @@ exit 2</programlisting>
|
|||
|
||||
<para>Here, finally, is the filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpdf - Print DVI data on HP/PCL printer
|
||||
# Installed in /usr/local/libexec/hpdf
|
||||
|
@ -2347,8 +2319,7 @@ exit 0</programlisting>
|
|||
Here is an example output filter for Hewlett Packard PCL-compatible
|
||||
printers:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpof - Output filter for Hewlett Packard PCL-compatible printers
|
||||
# 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
|
||||
enabled header pages and added the above output filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
named outline from host rose):</para>
|
||||
|
||||
<programlisting>
|
||||
k ll ll
|
||||
<programlisting> k ll ll
|
||||
k l l
|
||||
k l l
|
||||
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
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
rose:kelly Job: outline Date: Sun Sep 17 11:07:51 1995</programlisting>
|
||||
<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.
|
||||
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
|
||||
simple PostScript header page:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# make-ps-header - make a PostScript header page on stdout
|
||||
# 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
|
||||
document, modified to make a header page:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# psdf - DVI to PostScript printer filter
|
||||
# Installed in /usr/local/libexec/psdf
|
||||
|
@ -2832,8 +2798,7 @@ done
|
|||
<literal>teak</literal>; we have added entries for the two printers
|
||||
on the host rose:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /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
|
||||
accounting, etc.).</para>
|
||||
|
||||
<programlisting>
|
||||
#!/usr/bin/perl
|
||||
<programlisting>#!/usr/bin/perl
|
||||
#
|
||||
# netprint - Text filter for printer attached to network
|
||||
# Installed in /usr/local/libexec/netprint
|
||||
|
@ -2942,8 +2906,7 @@ exit 0;</programlisting>
|
|||
printer is scrivener. Here is the text filter for the
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# diablo-if-net - Text filter for Diablo printer `scrivener' listening
|
||||
# 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>
|
||||
capability:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - restrict multiple copies on bamboo
|
||||
#
|
||||
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
|
||||
<literal>teak</literal>):</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid - no multiple copies for local
|
||||
# printer teak or remote printer bamboo
|
||||
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
|
||||
<hostid>rose</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host rose - restricted group for bamboo
|
||||
#
|
||||
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
|
||||
printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /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
|
||||
<hostid>rose</hostid>:</para>
|
||||
|
||||
<programlisting>
|
||||
orchid
|
||||
<programlisting>orchid
|
||||
violet
|
||||
madrigal.fishbaum.de</programlisting>
|
||||
|
||||
|
@ -3232,8 +3190,7 @@ madrigal.fishbaum.de</programlisting>
|
|||
directory for this printer; here is <hostid>bamboo</hostid>'s
|
||||
entry:</para>
|
||||
|
||||
<programlisting>
|
||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
:sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
|
||||
:lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
|
||||
:if=/usr/local/libexec/psif:\
|
||||
|
@ -3363,8 +3320,7 @@ boo/minfree</userinput></screen>
|
|||
the printer, it then writes an accounting entry in the accounting
|
||||
file. The entries look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
2.00 rose:andy
|
||||
<programlisting>2.00 rose:andy
|
||||
3.00 rose:kelly
|
||||
3.00 orchid:mary
|
||||
5.00 orchid:mary
|
||||
|
@ -4332,8 +4288,7 @@ cfA013rose dequeued
|
|||
<filename>/usr/local/libexec/if-simple</filename> prints a
|
||||
form feed after it sends the job to the printer:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# if-simple - Simple text input filter for lpd
|
||||
# Installed in /usr/local/libexec/if-simple
|
||||
|
@ -4352,8 +4307,7 @@ exit 2</programlisting>
|
|||
<listitem>
|
||||
<para>You got the following on paper:</para>
|
||||
|
||||
<programlisting>
|
||||
!"#$%&'()*+,-./01234
|
||||
<programlisting>!"#$%&'()*+,-./01234
|
||||
"#$%&'()*+,-./012345
|
||||
#$%&'()*+,-./0123456</programlisting>
|
||||
|
||||
|
@ -4435,8 +4389,7 @@ exit 2</programlisting>
|
|||
eject the last page of the job. It should work with
|
||||
nearly all Hewlett Packard printers.</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# hpif - Simple text input filter for lpd for HP-PCL based printers
|
||||
# Installed in /usr/local/libexec/hpif
|
||||
|
@ -4453,8 +4406,7 @@ exit 2</programlisting>
|
|||
LaserJet 3Si named <hostid>teak</hostid>. It is using the
|
||||
above script as its text filter:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# /etc/printcap for host orchid
|
||||
#
|
||||
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
|
||||
<literal>lf</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||
<programlisting>rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||
:sh:sd=/var/spool/lpd/rattan:\
|
||||
:lp=/dev/lpt0:\
|
||||
:if=/usr/local/libexec/if-simple:\
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -1094,8 +1094,7 @@ Enter secret password: <userinput><secret password></userinput>
|
|||
<para>Here is a sample configuration file which illustrates the
|
||||
three most common sorts of configuration statements:</para>
|
||||
|
||||
<programlisting>
|
||||
permit internet 192.168.0.0 255.255.0.0
|
||||
<programlisting>permit internet 192.168.0.0 255.255.0.0
|
||||
permit user fnord
|
||||
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
|
||||
must have the following options compiled into your kernel:</para>
|
||||
|
||||
<programlisting>
|
||||
options IPSEC #IP security
|
||||
<programlisting>options IPSEC #IP security
|
||||
options IPSEC_ESP #IP security (crypto; define w/IPSEC)</programlisting>
|
||||
|
||||
<sect2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -490,8 +490,7 @@
|
|||
Here is an excerpt of the <filename>/etc/ttys</filename> file after
|
||||
we add the new entry:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.9600" unknown off secure
|
||||
ttyd5</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -528,8 +527,7 @@ ttyd5</programlisting>
|
|||
Here is the <filename>/etc/ttys</filename> file so far (showing just
|
||||
the two terminals in which we are interested):</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" unknown off secure
|
||||
ttyd5 "/usr/libexec/getty std.19200"</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/ttys</filename> file:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 off secure
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -586,8 +583,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
|
|||
Here again is the <filename>/etc/ttys</filename> file. We have
|
||||
turned each port <literal>on</literal>.</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on secure
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -635,8 +631,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
|
|||
<filename>/etc/ttys</filename> file, with comments added to describe
|
||||
where the terminals are:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||
<programlisting>ttyd1 "/usr/libexec/getty std.38400" wy50 on insecure # Kitchen
|
||||
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1054,8 +1049,7 @@ sio3: type 16550A</screen>
|
|||
the name of your system, but in upper-case letters. Edit the file,
|
||||
and change the device lines:</para>
|
||||
|
||||
<programlisting>
|
||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||
<programlisting>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 sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
|
||||
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
|
||||
unless it is missing under your version of FreeBSD:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
|
||||
#
|
||||
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
|
||||
speed of 19.2 Kbps:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Additions for a V.32bis Modem
|
||||
#
|
||||
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
|
||||
a <filename>gettytab</filename> entry starting a 57.6 Kbps:</para>
|
||||
|
||||
<programlisting>
|
||||
#
|
||||
<programlisting>#
|
||||
# Additions for a V.32bis or V.34 Modem
|
||||
# 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
|
||||
matching-speed configuration:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
|
||||
|
||||
<para>The first item in the above line is the device special file for
|
||||
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
|
||||
might look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
||||
|
||||
<para>If your modem is locked at a different data rate, substitute
|
||||
the appropriate name for the
|
||||
|
@ -1400,8 +1389,7 @@ ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
|
|||
<literal>V19200</literal> starting point), your
|
||||
<filename>ttys</filename> entry might look like this:</para>
|
||||
|
||||
<programlisting>
|
||||
ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||
<programlisting>ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
|
||||
</sect4>
|
||||
</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,
|
||||
<filename>/etc/rc.serial</filename> reads:</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# Serial port initial configuration
|
||||
|
||||
|
@ -1437,8 +1424,7 @@ stty -f /dev/cuai01 crtscts</programlisting>
|
|||
<filename>/etc/rc.local</filename> to set the
|
||||
<literal>crtscts</literal> flag on the devices:</para>
|
||||
|
||||
<programlisting>
|
||||
# Set serial ports to use RTS/CTS flow control
|
||||
<programlisting># Set serial ports to use RTS/CTS flow control
|
||||
stty -f /dev/ttyd0 crtscts
|
||||
stty -f /dev/ttyd1 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
|
||||
the modem:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&C1&D2&H1&I0&R2&W</programlisting>
|
||||
|
||||
<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
|
||||
the speed used to issue the commands:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&B1&W</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1576,8 +1560,7 @@ AT&B1&W</programlisting>
|
|||
issue the commands, but allow the serial port rate to vary for
|
||||
non-error-corrected connections:</para>
|
||||
|
||||
<programlisting>
|
||||
ATZ
|
||||
<programlisting>ATZ
|
||||
AT&B2&W</programlisting>
|
||||
</sect3>
|
||||
|
||||
|
@ -1793,8 +1776,7 @@ AT&B2&W</programlisting>
|
|||
hooked up to the first serial port, <filename>/dev/cuaa0</filename>,
|
||||
then put in the following line:</para>
|
||||
|
||||
<programlisting>
|
||||
cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||
<programlisting>cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -1827,8 +1809,7 @@ cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
|
|||
capability files like <filename>/etc/remote</filename>. Escape it
|
||||
with a backslash:</para>
|
||||
|
||||
<programlisting>
|
||||
pn=\@</programlisting>
|
||||
<programlisting>pn=\@</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1837,8 +1818,7 @@ pn=\@</programlisting>
|
|||
<para>Put what is called a <quote>generic</quote> entry in your
|
||||
<filename>/etc/remote</filename> file. For example:</para>
|
||||
|
||||
<programlisting>
|
||||
tip115200|Dial any phone number at 115200 bps:\
|
||||
<programlisting>tip115200|Dial any phone number at 115200 bps:\
|
||||
:dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
|
||||
tip57600|Dial any phone number at 57600 bps:\
|
||||
: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>,
|
||||
use a generic cu entry:</para>
|
||||
|
||||
<programlisting>
|
||||
cu115200|Use cu to dial any number at 115200bps:\
|
||||
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
|
||||
:dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
|
||||
|
||||
<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
|
||||
<filename>/etc/remote</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
pain|pain.deep13.com|Forrester's machine:\
|
||||
<programlisting>pain|pain.deep13.com|Forrester's machine:\
|
||||
:cm=CONNECT pain\n:tc=deep13:
|
||||
muffin|muffin.deep13.com|Frank's machine:\
|
||||
: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
|
||||
<literal>pn</literal> capability:</para>
|
||||
|
||||
<programlisting>
|
||||
big-university:\
|
||||
<programlisting>big-university:\
|
||||
:pn=\@:tc=dialout
|
||||
dialout:\
|
||||
: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
|
||||
<filename>/etc/phones</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
big-university 5551111
|
||||
<programlisting>big-university 5551111
|
||||
big-university 5551112
|
||||
big-university 5551113
|
||||
big-university 5551114</programlisting>
|
||||
|
@ -1944,8 +1920,7 @@ big-university 5551114</programlisting>
|
|||
specifying the following in your <filename>$HOME/.tiprc</filename>
|
||||
file:</para>
|
||||
|
||||
<programlisting>
|
||||
force=<single-char></programlisting>
|
||||
<programlisting>force=<single-char></programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1961,8 +1936,7 @@ force=<single-char></programlisting>
|
|||
<para>Here is a sample .tiprc file perfect for Emacs users who need to
|
||||
type CTRL+2 and CTRL+A a lot:</para>
|
||||
|
||||
<programlisting>
|
||||
force=^^
|
||||
<programlisting>force=^^
|
||||
raisechar=^^</programlisting>
|
||||
|
||||
<para>The ^^ is SHIFT+CTRL+6.</para>
|
||||
|
@ -2184,8 +2158,7 @@ raisechar=^^</programlisting>
|
|||
|
||||
<para>Example:</para>
|
||||
|
||||
<programlisting>
|
||||
device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||
<programlisting>device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4</programlisting>
|
||||
|
||||
<para>See &man.sio.4; for more details.</para>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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">
|
||||
|
@ -101,8 +101,7 @@
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
<programlisting>device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -134,8 +133,7 @@ device sbc0 at isa? port0x220 irq 5 drq 1 flags 0x15</programlisting>
|
|||
|
||||
<para>and</para>
|
||||
|
||||
<programlisting>
|
||||
device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13</programlisting>
|
||||
<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
|
||||
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
|
||||
to add</para>
|
||||
|
||||
<programlisting>
|
||||
device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
<programlisting>device pcm0 at isa? irq 10 drq 1 flags 0x0</programlisting>
|
||||
|
||||
<para>to your kernel configuration. You may need to change the
|
||||
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
|
||||
following:</para>
|
||||
|
||||
<programlisting>
|
||||
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
<programlisting>FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
|
||||
Installed devices:
|
||||
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)</programlisting>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
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" [
|
||||
|
@ -92,8 +92,7 @@
|
|||
<para>The minimal <filename>Makefile</filename> would look something
|
||||
like this:</para>
|
||||
|
||||
<programlisting>
|
||||
# New ports collection makefile for: oneko
|
||||
<programlisting># New ports collection makefile for: oneko
|
||||
# Date created: 5 December 1994
|
||||
# Whom: asami
|
||||
#
|
||||
|
@ -140,8 +139,7 @@ USE_IMAKE= yes
|
|||
should begin with a capital, and end without a period. Here
|
||||
is an example:</para>
|
||||
|
||||
<programlisting>
|
||||
A cat chasing a mouse all over the screen</programlisting>
|
||||
<programlisting>A cat chasing a mouse all over the screen</programlisting>
|
||||
</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
|
||||
file, as in:</para>
|
||||
|
||||
<programlisting>
|
||||
This is a port of oneko, in which a cat chases a poor mouse all over
|
||||
<programlisting>This is a port of oneko, in which a cat chases a poor mouse all over
|
||||
the screen.
|
||||
:
|
||||
(etc.)
|
||||
|
@ -193,8 +190,7 @@ asami@cs.berkeley.edu</programlisting>
|
|||
|
||||
<para>Here is a small example:</para>
|
||||
|
||||
<programlisting>
|
||||
bin/oneko
|
||||
<programlisting>bin/oneko
|
||||
lib/X11/app-defaults/Oneko
|
||||
lib/X11/oneko/cat1.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
|
||||
ports collection.</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.10</programlisting>
|
||||
|
||||
<para><makevar>PKGNAME</makevar> becomes
|
||||
|
@ -847,8 +842,7 @@ PORTVERSION= 0.10</programlisting>
|
|||
FreeBSD patch. <makevar>PORTREVISION</makevar> is bumped
|
||||
accordingly.</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSIOn= 0.10
|
||||
PORTREVISION= 1</programlisting>
|
||||
|
||||
|
@ -868,8 +862,7 @@ PORTREVISION= 1</programlisting>
|
|||
<makevar>PORTREVISION</makevar> is reset to 0 (or removed
|
||||
from the makefile).</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.2
|
||||
PORTEPOCH= 1</programlisting>
|
||||
|
||||
|
@ -880,8 +873,7 @@ PORTEPOCH= 1</programlisting>
|
|||
<makevar>PORTEPOCH</makevar> never decreases, the version
|
||||
variables are now:</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= gtkmumble
|
||||
<programlisting>PORTNAME= gtkmumble
|
||||
PORTVERSION= 0.3
|
||||
PORTEPOCH= 1</programlisting>
|
||||
|
||||
|
@ -1006,8 +998,7 @@ PORTEPOCH= 1</programlisting>
|
|||
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
|
||||
archive. Here is an example:</para>
|
||||
|
||||
<programlisting>
|
||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||
<programlisting>MASTER_SITES= ${MASTER_SITE_XCONTRIB}
|
||||
MASTER_SITE_SUBDIR= applications</programlisting>
|
||||
|
||||
<para>These variables are defined in
|
||||
|
@ -1136,8 +1127,7 @@ MASTER_SITE_SUBDIR= applications</programlisting>
|
|||
|
||||
<para>For example,</para>
|
||||
|
||||
<programlisting>
|
||||
RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||
<programlisting>RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
|
||||
wish8.0:${PORTSDIR}/x11-toolkits/tk80</programlisting>
|
||||
|
||||
<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
|
||||
instance
|
||||
|
||||
<programlisting>
|
||||
BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||
<programlisting>BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract</programlisting>
|
||||
|
||||
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
|
||||
<filename>Makefile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
INSTALLS_SHLIB= yes
|
||||
<programlisting>INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
||||
|
||||
<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
|
||||
<filename>bsd.port.mk</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout</programlisting>
|
||||
<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
|
||||
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
|
||||
read:</para>
|
||||
|
||||
<programlisting>
|
||||
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||
<programlisting>${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....</programlisting>
|
||||
|
||||
<para>In <filename>pkg-plist</filename> it should read;</para>
|
||||
|
||||
<programlisting>
|
||||
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||
<programlisting>@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
|
||||
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R</programlisting>
|
||||
|
||||
<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
|
||||
<filename>japanese/xdvi300/Makefile</filename>;</para>
|
||||
|
||||
<programlisting>
|
||||
PORTNAME= xdvi
|
||||
<programlisting>PORTNAME= xdvi
|
||||
PORTVERSION= 17
|
||||
PKGNAMEPREFIX= ja-
|
||||
PKGNAMESUFFIX= ${RESOLUTION}
|
||||
|
@ -1582,8 +1566,7 @@ RESOLUTION?= 300
|
|||
<para>As for other resolutions, this is the <emphasis>entire</emphasis>
|
||||
<filename>xdvi118/Makefile</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
RESOLUTION= 118
|
||||
<programlisting>RESOLUTION= 118
|
||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
||||
|
||||
.include ${MASTERDIR}/Makefile</programlisting>
|
||||
|
@ -1688,8 +1671,7 @@ MASTERDIR= ${.CURDIR}/../xdvi300
|
|||
|
||||
<para>Here is an example that puts it all together.</para>
|
||||
|
||||
<programlisting>
|
||||
MAN1= foo.1
|
||||
<programlisting>MAN1= foo.1
|
||||
MAN3= bar.3
|
||||
MAN4= baz.4
|
||||
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>
|
||||
|
||||
<programlisting>
|
||||
${PREFIX}/man/man1/foo.1.gz
|
||||
<programlisting>${PREFIX}/man/man1/foo.1.gz
|
||||
${PREFIX}/man/ja/man1/foo.1.gz
|
||||
${PREFIX}/share/foobar/man/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
|
||||
patch:</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||
<programlisting>--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995
|
||||
+++ ./man/vip.texi Tue May 20 01:28:33 1997
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
|
@ -1884,8 +1864,7 @@ Options:
|
|||
<filename>man</filename> subdirectory to rebuild the info
|
||||
pages.</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
+++ ./Makefile.in Tue Apr 15 00:15:28 1997
|
||||
@@ -184,7 +184,7 @@
|
||||
# Subdirectories to make recursively. `lisp' is not included
|
||||
|
@ -1925,8 +1904,7 @@ Options:
|
|||
otherwise mucking around with the <filename>dir</filename>
|
||||
file.</para>
|
||||
|
||||
<programlisting>
|
||||
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
<programlisting>--- ./Makefile.in.org Mon Aug 19 21:12:19 1996
|
||||
+++ ./Makefile.in Mon Apr 14 23:38:07 1997
|
||||
@@ -368,14 +368,8 @@
|
||||
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
|
||||
file, so search extensively.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: pkg-plist
|
||||
<programlisting>Index: pkg-plist
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||
retrieving revision 1.15
|
||||
|
@ -1982,8 +1959,7 @@ diff -u -r1.15 pkg-plist
|
|||
<command>install-info</command> automatically creates this
|
||||
file if it does not exist.)</para>
|
||||
|
||||
<programlisting>
|
||||
Index: Makefile
|
||||
<programlisting>Index: Makefile
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
|
||||
retrieving revision 1.26
|
||||
|
@ -2008,8 +1984,7 @@ diff -u -r1.26 Makefile
|
|||
<literal>@unexec</literal> for
|
||||
<command>pkg_delete</command>.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: pkg-plist
|
||||
<programlisting>Index: pkg-plist
|
||||
===================================================================
|
||||
RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v
|
||||
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
|
||||
version-specific subdirectory, you can put something like
|
||||
|
||||
<programlisting>
|
||||
OCTAVE_VERSION= 2.0.13
|
||||
<programlisting>OCTAVE_VERSION= 2.0.13
|
||||
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}</programlisting>
|
||||
|
||||
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
|
||||
example:</para>
|
||||
|
||||
<programlisting>
|
||||
post-install:
|
||||
<programlisting>post-install:
|
||||
strip ${PREFIX}/bin/xdl</programlisting>
|
||||
|
||||
<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
|
||||
file is already included; if not, add the code:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
<programlisting>#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
#include <sys/param.h>
|
||||
#endif</programlisting>
|
||||
|
||||
|
@ -2454,8 +2426,7 @@ post-install:
|
|||
<para>Another way is to use the GNU Autoconf style of doing
|
||||
this:</para>
|
||||
|
||||
<programlisting>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
<programlisting>#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif</programlisting>
|
||||
|
||||
|
@ -2466,8 +2437,7 @@ post-install:
|
|||
<para>Once you have <filename>sys/param.h</filename> included, you may
|
||||
use:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||
<programlisting>#if (defined(BSD) && (BSD >= 199103))</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2475,8 +2445,7 @@ post-install:
|
|||
|
||||
<para>Use:</para>
|
||||
|
||||
<programlisting>
|
||||
#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||
<programlisting>#if (defined(BSD) && (BSD >= 199306))</programlisting>
|
||||
|
||||
<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
|
||||
|
@ -2519,8 +2488,7 @@ post-install:
|
|||
system. If you need more granularity in detecting FreeBSD
|
||||
systems since 2.0-RELEASE you can use the following:</para>
|
||||
|
||||
<programlisting>
|
||||
#if __FreeBSD__ >= 2
|
||||
<programlisting>#if __FreeBSD__ >= 2
|
||||
#include <osreldate.h>
|
||||
# if __FreeBSD_version >= 199504
|
||||
/* 2.0.5+ release specific code here */
|
||||
|
@ -3156,8 +3124,7 @@ post-install:
|
|||
<para>Here are some examples of things you can write after
|
||||
<filename>bsd.port.pre.mk</filename>:</para>
|
||||
|
||||
<programlisting>
|
||||
# no need to compile lang/perl5 if perl5 is already in system
|
||||
<programlisting># no need to compile lang/perl5 if perl5 is already in system
|
||||
.if ${OSVERSION} > 300003
|
||||
BROKEN= perl is in system
|
||||
.endif
|
||||
|
@ -3196,8 +3163,7 @@ post-install:
|
|||
<makevar>NOPORTDOCS</makevar> so that users can disable it in
|
||||
<filename>/etc/make.conf</filename>, like this:</para>
|
||||
|
||||
<programlisting>
|
||||
post-install:
|
||||
<programlisting>post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${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
|
||||
pathname of <command>less</command>, use the compiler flag:
|
||||
|
||||
<programlisting>
|
||||
-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||
<programlisting>-DPAGER=\"${PREFIX}/bin/less\"</programlisting>
|
||||
|
||||
or
|
||||
|
||||
<programlisting>
|
||||
-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||
<programlisting>-DPAGER=\"${LOCALBASE}/bin/less\"</programlisting>
|
||||
|
||||
if this is an X port, instead of
|
||||
<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
|
||||
before you can delete parent directories.</para>
|
||||
|
||||
<programlisting>
|
||||
:
|
||||
<programlisting> :
|
||||
lib/X11/oneko/pixmaps/cat.xpm
|
||||
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
|
||||
remove only empty directories without warning.</para>
|
||||
|
||||
<programlisting>
|
||||
@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||
<programlisting>@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting>
|
||||
|
||||
<para>This will neither print any error messages nor cause
|
||||
<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
|
||||
99.</para>
|
||||
|
||||
<programlisting>
|
||||
majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||
<programlisting>majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
|
||||
cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
|
||||
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
|
||||
|
@ -3588,8 +3549,7 @@ vpopmail:*:89:89::0:0:User &:/usr/local/vpopmail:/nonexistent</programlisting>
|
|||
linkend="porting-portlint">portlint</link> to check the
|
||||
<filename>Makefile</filename>.</para>
|
||||
|
||||
<programlisting>
|
||||
[the header...just to make it easier for us to identify the ports.]
|
||||
<programlisting>[the header...just to make it easier for us to identify the ports.]
|
||||
# New ports collection makefile for: xdvi
|
||||
[the "version required" line is only needed when the PORTVERSION
|
||||
variable is not specific enough to describe the port.]
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</author>
|
||||
</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
|
||||
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>
|
||||
</note>
|
||||
|
||||
<programlisting>
|
||||
################################################################
|
||||
<programlisting>################################################################
|
||||
# PPP Configuration File ('/etc/ppp/ppp.conf')
|
||||
#
|
||||
# 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
|
||||
add 0 0 127.2.2.2
|
||||
################################################################
|
||||
# End of /etc/ppp/ppp.conf
|
||||
</programlisting>
|
||||
# End of /etc/ppp/ppp.conf</programlisting>
|
||||
|
||||
This file, taken verbatim from a working system, has three relevant
|
||||
configuration sections:</para>
|
||||
|
|
Loading…
Reference in a new issue