Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 May 2022 03:52:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 263782] Use sysrc instead of manually editing rc.conf throughout the FreeBSD Handbook for simplicity and consistency
Message-ID:  <bug-263782-9-4opSpsNOl2@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-263782-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-263782-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263782

--- Comment #8 from PauAmma <pauamma@gundo.com> ---
Comment on attachment 233807
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233807
fixed my mistake of using regular links and some more found

Great! Almost there.

>diff --git a/documentation/content/en/books/handbook/basics/_index.adoc b/=
documentation/content/en/books/handbook/basics/_index.adoc
>index aa6583ca95..66caeee406 100644
>--- a/documentation/content/en/books/handbook/basics/_index.adoc
>+++ b/documentation/content/en/books/handbook/basics/_index.adoc
>@@ -202,11 +202,11 @@ To select a new video mode, specify the mode using m=
an:vidcontrol[1] as the `roo
> # vidcontrol MODE_279
> ....
>=20
>-If the new video mode is acceptable, it can be permanently set on boot by=
 adding it to [.filename]#/etc/rc.conf#:
>+If the new video mode is acceptable, it can be permanently set on boot by=
 using https://www.freebsd.org/cgi/man.cgi?query=3Dsysrc[sysrc]:

man:sysrc[8] (missed this one)

> [.programlisting]
> ....
>-allscreens_flags=3D"MODE_279"
>+sysrc allscreens_flags=3D"MODE_279"

Convention is to prefix commands run as root with "# " (without the quotes).
See  https://docs.freebsd.org/en/books/fdp-primer/preface/#preface-prompts.

>index 5fcc5a350f..19cdeea129 100644
>--- a/documentation/content/en/books/handbook/config/_index.adoc
>+++ b/documentation/content/en/books/handbook/config/_index.adoc
>@@ -56,7 +56,7 @@ This chapter explains much of the FreeBSD configuration =
process, including some
>=20
> After reading this chapter, you will know:
>=20
>-* The basics of [.filename]#rc.conf# configuration and [.filename]#/usr/l=
ocal/etc/rc.d# startup scripts.
>+* The basics of [.filename]#rc.conf# configuration with man:sysrc[8] and =
[.filename]#/usr/local/etc/rc.d# startup scripts.
> * How to configure and test a network card.
> * How to configure virtual hosts on network devices.
> * How to use the various configuration files in [.filename]#/etc#.
>@@ -80,7 +80,7 @@ In FreeBSD, most included services, such as man:cron[8],=
 are started through the
> =3D=3D=3D Extended Application Configuration
>=20
> Now that FreeBSD includes [.filename]#rc.d#, configuration of application=
 startup is easier and provides more features.
>-Using the key words discussed in <<configtuning-rcd>>, applications can b=
e set to start after certain other services and extra flags can be passed t=
hrough [.filename]#/etc/rc.conf# in place of hard coded flags in the startu=
p script.
>+Using the key words discussed in <<configtuning-rcd>>, applications can b=
e set to start after certain other services and extra flags can be passed t=
hrough man:sysrc[8] in place of hard coded flags in the startup script.

I'm leaning toward making this specific one "passed in
[.filename]#/etc/rc.conf# through man:sysrc[8]", but not sure.


>-utility_enable=3D"YES"
>+sysrc utility_enable=3D"YES"

#=20

>-natd_enable=3D"YES"
>+sysrc natd_enable=3D"YES"

#

> If a `natd_enable=3D"NO"` line is already present, change the `NO` to `YE=
S`.

Remove. sysrc takes care of updating existing configuration lines.

>-ifconfig_dc0=3D"DHCP"
>+sysrc ifconfig_dc0=3D"DHCP"

#

>@@ -948,12 +948,12 @@ This example adds the hostname of `B`, logs all faci=
lities, and stores the log e
> When adding multiple log clients, add a similar two-line entry for each c=
lient.
> More information about the available facilities may be found in man:syslo=
g.conf[5].
>=20
>-Next, configure [.filename]#/etc/rc.conf#:
>+Next, configure with man:sysrc[8]:
>=20
> [.programlisting]
> ....
>-syslogd_enable=3D"YES"
>-syslogd_flags=3D"-a logclient.example.com -v -v"
>+sysrc syslogd_enable=3D"YES"
>+sysrc syslogd_flags=3D"-a logclient.example.com -v -v"

#

>-syslogd_enable=3D"YES"
>-syslogd_flags=3D"-s -v -v"
>+sysrc syslogd_enable=3D"YES"
>+sysrc syslogd_flags=3D"-s -v -v"

#

>index ec3bc64543..e92ee3b18f 100644
>--- a/documentation/content/en/books/handbook/firewalls/_index.adoc
>+++ b/documentation/content/en/books/handbook/firewalls/_index.adoc
>@@ -182,9 +182,8 @@ It also provides several examples for creating ruleset=
s on a FreeBSD system.
> =3D=3D=3D Enabling PF
>=20
> To use PF, its kernel module must be first loaded.
>-This section describes the entries that can be added to [.filename]#/etc/=
rc.conf# to enable PF.
>+This section describes the entries that can be added to enable PF using m=
an:sysrc[8]:
>=20
>-Start by adding `pf_enable=3Dyes` to [.filename]#/etc/rc.conf#:

I think I'd get rid of "to ..." and keep the rest.

>@@ -202,7 +201,7 @@ pf_flags=3D""                     # additional flags f=
or pfctl startup
> PF will not start if it cannot find its ruleset configuration file.
> By default, FreeBSD does not ship with a ruleset and there is no [.filena=
me]#/etc/pf.conf#.
> Example rulesets can be found in [.filename]#/usr/share/examples/pf/#.
>-If a custom ruleset has been saved somewhere else, add a line to [.filena=
me]#/etc/rc.conf# which specifies the full path to the file:
>+If a custom ruleset has been saved somewhere else, use man:sysrc[8] to ad=
d a line to specify the full path to the file:

... use man:sysrc[8] to to specify ...

>index 8b46e6444f..8931f2892c 100644
>--- a/documentation/content/en/books/handbook/linuxemu/_index.adoc
>+++ b/documentation/content/en/books/handbook/linuxemu/_index.adoc
>@@ -71,11 +71,11 @@ Before reading this chapter, you should:
> =3D=3D Configuring Linux Binary Compatibility
>=20
> By default, Linux binary compatibility is not enabled.
>-To enable it at boot time, add this line to [.filename]#/etc/rc.conf#:
>+To enable it at boot time, use man:sysrc[8]:
>=20
> [.programlisting]
> ....
>-linux_enable=3D"YES"
>+sysrc linux_enable=3D"YES"

#

>-linux_mounts_enable=3D"NO"
>+sysrc linux_mounts_enable=3D"NO"

#

>index 37d7669dc8..922a0ec75c 100644
>--- a/documentation/content/en/books/handbook/multimedia/_index.adoc
>+++ b/documentation/content/en/books/handbook/multimedia/_index.adoc
>@@ -1225,11 +1225,11 @@ add path 'usb/*' mode 0666 group usb
>=20
> Refer to man:devfs.rules[5] for more information about this file.
>=20
>-Next, enable the ruleset in /etc/rc.conf:
>+Next, enable the ruleset with https://www.freebsd.org/cgi/man.cgi?query=
=3Dsysrc[sysrc]:

man:sysrc[8]

>-devfs_system_ruleset=3D"system"
>+sysrc devfs_system_ruleset=3D"system"

#

>index cfe881e847..9ccd1daec9 100644
>--- a/documentation/content/en/books/handbook/ports/_index.adoc
>+++ b/documentation/content/en/books/handbook/ports/_index.adoc

>-* Some applications run services which must be added to [.filename]#/etc/=
rc.conf# before starting the application. These applications usually instal=
l a startup script in [.filename]#/usr/local/etc/rc.d#. See crossref:config=
[configtuning-starting-services,Starting Services] for more information.
>+* Some applications run services which must be added to [.filename]#/etc/=
rc.conf# with https://www.freebsd.org/cgi/man.cgi?query=3Dsysrc[sysrc]=20

man:sysrc[8]

>index e8b92039c5..a64ee33632 100644
>--- a/documentation/content/en/books/handbook/printing/_index.adoc
>+++ b/documentation/content/en/books/handbook/printing/_index.adoc
>@@ -100,11 +100,11 @@ For a printer connected directly to a network, use:
> +
> Replace _network-printer-name_ with the `DNS` host name of the network pr=
inter.
> +
>-. Enable LPD by editing [.filename]#/etc/rc.conf#, adding this line:
>+. Enable LPD by editing by using https://www.freebsd.org/cgi/man.cgi?quer=
y=3Dsysrc[sysrc]:

Enable LPD using man:sysrc[8]:

>-lpd_enable=3D"YES"
>+sysrc lpd_enable=3D"YES"

#

>-Enable man:lpd[8] in [.filename]#/etc/rc.conf#:
>+Enable man:lpd[8] in man:sysrc[8]:

... using man:sysrc[8]:
>=20
> [.programlisting]
> ....
>-lpd_enable=3D"YES"
>+sysrc lpd_enable=3D"YES"

#

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263782-9-4opSpsNOl2>