From nobody Wed May 18 13:03:54 2022 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 126761ADEB1C for ; Wed, 18 May 2022 13:03:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L3CqG56S7z4XTc for ; Wed, 18 May 2022 13:03:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84F0A17C4 for ; Wed, 18 May 2022 13:03:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 24ID3sx9070830 for ; Wed, 18 May 2022 13:03:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24ID3sOt070829 for doc@FreeBSD.org; Wed, 18 May 2022 13:03:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Wed, 18 May 2022 13:03:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Documentation X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pauamma@gundo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: doc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652879034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NPsAOdnRYizOJtFzHjylIwDC44ZpzRqgtgulS0F9PS0=; b=eYiiRzlm+HZ5bqM7Y+v+cwxbcSzSu8C8IGyPjtp6X2TemuK86pP/SG9gkz5I1K2sFP+Egk GAV7/2Zcg3Z03+ZvEhkM8vm6K0XFYSLrLXcSWZQDwVxKzYB5ODmkcYprPVQ9FqossGI5Wy kKnod7qwPnZ7nHyX0loZ2i3yJwIbTqz2fqCk5XXGRv7jMUmnQh5ysVfw+MsEZH2x4Kd/K6 3/gtus4gDqAyq3s/Nn0UJ7wgXwuMOlYe3kavoU3+gQqGNXPhnU8OJLNR+RDtytJyraD1Ss IgdvXdRnZmBOT/Jl45uzFpwDq3PQSHLrjFKfikW2yNVnEJajhARSXEPVg9bkqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652879034; a=rsa-sha256; cv=none; b=qtpCMQf5DyFMs0qKUI1H+Y4/kfsswjYmAxNyIiYQ7HsRabV70UaKM7x6+GS28MPk7/Q8RF +DvkUZ4WQa6Ve225M0wstp1OwgxVsU1mFmbD1edpp6FYl8cbFF9HrtvRmGG0m0DSHkIaRm koZs+x0MjJMrZsbNOj1m2cj1OFqmeSCJlniiXVMcJx8qETvIgHrdppnalfHunAVOC3ipjV maIYsFQx4Rxf+ftnoMaMTnVi/omehfOnDX6+VUV7rWv82Zlp10U/CHNdV5aw05rh/NNVql 4d9SxDmbonxIfNlzN4snZZphuSY63p9y0oeJeQ7fqMgfsBfFNdSbtSvGR2C3Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263782 --- Comment #12 from PauAmma --- Comment on attachment 233821 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233821 combined sysrc with first patch and then combined the two patches >diff --git a/documentation/content/en/books/handbook/x11/_index.adoc b/doc= umentation/content/en/books/handbook/x11/_index.adoc >index 8a9269cdcf..9aa05ef7a9 100644 >--- a/documentation/content/en/books/handbook/x11/_index.adoc >+++ b/documentation/content/en/books/handbook/x11/_index.adoc >+sysrc xdm_enable=3D"YES" Needs # prefix >+sysrc dbus_enable=3D"YES" Needs # prefix >diff --git a/documentation/content/en/books/handbook/config/_index.adoc b/= documentation/content/en/books/handbook/config/_index.adoc >index 5fcc5a350f..95ed64cc68 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 <>, 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 <>, 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. > A basic script may look similar to the following: >=20 > [.programlisting] >@@ -113,14 +113,14 @@ run_rc_command "$1" > This script will ensure that the provided `utility` will be started after= the `DAEMON` pseudo-service. > It also provides a method for setting and tracking the process ID (PID). >=20 >-This application could then have the following line placed in [.filename]= #/etc/rc.conf#: >+This application could then be enabled with man:sysrc[8]: >=20 > [.programlisting] > .... >-utility_enable=3D"YES" >+# sysrc utility_enable=3D"YES" > .... >=20 >-This method allows for easier manipulation of command line arguments, inc= lusion of the default functions provided in [.filename]#/etc/rc.subr#, comp= atibility with man:rcorder[8], and provides for easier configuration via [.= filename]#rc.conf#. >+This method allows for easier manipulation of command line arguments, inc= lusion of the default functions provided in [.filename]#/etc/rc.subr#, comp= atibility with man:rcorder[8], and provides for easier configuration via ma= n:sysrc[8]. >=20 > =3D=3D=3D Using Services to Start Services >=20 >@@ -255,14 +255,13 @@ For instance, man:sshd[8] can be restarted with the = following command: >=20 > This procedure can be used to start services on a running system. > Services will be started automatically at boot time as specified in man:r= c.conf[5]. >-For example, to enable man:natd[8] at system startup, add the following l= ine to [.filename]#/etc/rc.conf#: >+For example, to enable man:natd[8] at system startup, use man:sysrc[8]: >=20 > [.programlisting] > .... >-natd_enable=3D"YES" >+# sysrc natd_enable=3D"YES" > .... >=20 >-If a `natd_enable=3D"NO"` line is already present, change the `NO` to `YE= S`. > The man:rc[8] scripts will automatically load any dependent services duri= ng the next boot, as described below. >=20 > Since the man:rc[8] system is primarily intended to start and stop servic= es at system startup and shutdown time, the `start`, `stop` and `restart` o= ptions will only perform their action if the appropriate [.filename]#/etc/r= c.conf# variable is set. >@@ -561,12 +560,12 @@ dc0: flags=3D8843 metri= c 0 mtu 1500 > it would indicate the card has not been configured. >=20 > The card must be configured as `root`. >-The NIC configuration can be performed from the command line with man:ifc= onfig[8] but will not persist after a reboot unless the configuration is al= so added to [.filename]#/etc/rc.conf#. >+The NIC configuration can be performed from the command line with man:ifc= onfig[8] but will not persist after a reboot unless the configuration is al= so modified with man:sysrc[8]. > If a DHCP server is present on the LAN, just add this line: >=20 > [.programlisting] > .... >-ifconfig_dc0=3D"DHCP" >+# sysrc ifconfig_dc0=3D"DHCP" > .... >=20 > Replace _dc0_ with the correct value for the system. >@@ -948,12 +947,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" > .... >=20 > The first entry starts syslogd at system boot. >@@ -988,12 +987,12 @@ If the server did not restart, consult [.filename]#/= var/log/messages# for the er > A logging client sends log entries to a logging server on the network. > The client also keeps a local copy of its own logs. >=20 >-Once a logging server has been configured, edit [.filename]#/etc/rc.conf#= on the logging client: >+Once a logging server has been configured, use man:sysrc[8] to enable the= logging client: >=20 > [.programlisting] > .... >-syslogd_enable=3D"YES" >-syslogd_flags=3D"-s -v -v" >+# sysrc syslogd_enable=3D"YES" >+# sysrc syslogd_flags=3D"-s -v -v" > .... >=20 > The first entry enables syslogd on boot up. >diff --git a/documentation/content/en/books/handbook/firewalls/_index.adoc= b/documentation/content/en/books/handbook/firewalls/_index.adoc >index ec3bc64543..e8fe2c55cb 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: >=20 >-Start by adding `pf_enable=3Dyes` to [.filename]#/etc/rc.conf#: >=20 > [source,shell] > .... >@@ -192,7 +191,7 @@ Start by adding `pf_enable=3Dyes` to [.filename]#/etc/= rc.conf#: > .... >=20 > Additional options, described in man:pfctl[8], can be passed to PF when i= t is started. >-Add or change this entry in [.filename]#/etc/rc.conf# and specify any req= uired flags between the two quotes (`""`): >+Use man:sysrc[8] to specify any required flags between the two quotes (`"= "`): >=20 > [.programlisting] > .... >@@ -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 sp= ecify a line to specify the full path to the file: >=20 > [.programlisting] > .... >@@ -210,7 +209,7 @@ pf_rules=3D"/path/to/pf.conf" > .... >=20 > Logging support for PF is provided by man:pflog[4]. >-To enable logging support, add `pflog_enable=3Dyes` to [.filename]#/etc/r= c.conf#: >+To enable logging support, add `pflog_enable=3Dyes` with man:sysrc[8]: >=20 > [source,shell] > .... >diff --git a/documentation/content/en/books/handbook/linuxemu/_index.adoc = b/documentation/content/en/books/handbook/linuxemu/_index.adoc >index 8b46e6444f..d0387ee3c8 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" > .... >=20 > Once enabled, it can be started without rebooting by running: >@@ -149,11 +149,11 @@ Consult https://wiki.freebsd.org/Linuxulator[FreeBSD= Wiki - Linuxulator] for mor > A list of all Linux-related man:sysctl[8] knobs can be found in man:linux= [4]. >=20 > Some applications require specific filesystems to be mounted. >-This is normally handled by the [.filename]#/etc/rc.d/linux# script, but = can be disabled by adding this line to [.filename]#/etc/rc.conf#: >+This is normally handled by the [.filename]#/etc/rc.d/linux# script, but = can be disabled by using man:sysrc[8]: >=20 > [.programlisting] > .... >-linux_mounts_enable=3D"NO" >+# sysrc linux_mounts_enable=3D"NO" > .... >=20 > Filesystems mounted by the rc script will not work for Linux processes in= side chroots or jails; if needed, configure them in [.filename]#/etc/fstab#: >diff --git a/documentation/content/en/books/handbook/multimedia/_index.ado= c b/documentation/content/en/books/handbook/multimedia/_index.adoc >index 37d7669dc8..742b3d9c42 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 man:sysrc[8]: >=20 > [.programlisting] > .... >-devfs_system_ruleset=3D"system" >+# sysrc devfs_system_ruleset=3D"system" > .... >=20 > And, restart the man:devfs[8] system: >diff --git a/documentation/content/en/books/handbook/ports/_index.adoc b/d= ocumentation/content/en/books/handbook/ports/_index.adoc >index cfe881e847..9ccd1daec9 100644 >--- a/documentation/content/en/books/handbook/ports/_index.adoc >+++ b/documentation/content/en/books/handbook/ports/_index.adoc >@@ -1309,7 +1309,7 @@ The following commands and locations can be used to = help determine what was inst >=20 > * Most applications install at least one default configuration file in [.= filename]#/usr/local/etc#. In cases where an application has a large number= of configuration files, a subdirectory will be created to hold them. Often= , sample configuration files are installed which end with a suffix such as = [.filename]#.sample#. The configuration files should be reviewed and possib= ly edited to meet the system's needs. To edit a sample file, first copy it = without the [.filename]#.sample# extension. > * Applications which provide documentation will install it into [.filenam= e]#/usr/local/share/doc# and many applications also install manual pages. T= his documentation should be consulted before continuing. >-* 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] befo= re starting the application. These applications usually install a startup s= cript in [.filename]#/usr/local/etc/rc.d#. See crossref:config[configtuning= -starting-services,Starting Services] for more information. > + > [NOTE] > =3D=3D=3D=3D >diff --git a/documentation/content/en/books/handbook/printing/_index.adoc = b/documentation/content/en/books/handbook/printing/_index.adoc >index e8b92039c5..63fe07fee4 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 man:sysrc[8]: > + > [.programlisting] > .... >-lpd_enable=3D"YES" >+# sysrc lpd_enable=3D"YES" > .... > + > Start the service: >@@ -375,11 +375,11 @@ After creating [.filename]#/etc/printcap#, use man:c= hkprintcap[8] to test it for >=20 > Fix any reported problems before continuing. >=20 >-Enable man:lpd[8] in [.filename]#/etc/rc.conf#: >+Enable man:lpd[8] using man:sysrc[8]: >=20 > [.programlisting] > .... >-lpd_enable=3D"YES" >+# sysrc lpd_enable=3D"YES" > .... >=20 > Start the service: >diff --git a/documentation/content/en/books/handbook/x11/_index.adoc b/doc= umentation/content/en/books/handbook/x11/_index.adoc >index 9aa05ef7a9..881fc862e4 100644 >--- a/documentation/content/en/books/handbook/x11/_index.adoc >+++ b/documentation/content/en/books/handbook/x11/_index.adoc >+sysrc gdm_enable=3D"YES" Needs # prefix >+sysrc gnome_enable=3D"YES" Needs # prefix >+sysrc dbus_enable=3D"YES" Needs # prefix >+sysrc sddm_enable=3D"YES" Needs # prefix >+sysrc dbus_enable=3D"YES" Needs # prefix >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 >+sysrc allscreens_flags=3D"MODE_279" Needs # prefix >diff --git a/documentation/content/en/books/handbook/config/_index.adoc b/= documentation/content/en/books/handbook/config/_index.adoc >index 5fcc5a350f..19cdeea129 100644 >--- a/documentation/content/en/books/handbook/config/_index.adoc >+++ b/documentation/content/en/books/handbook/config/_index.adoc >+sysrc utility_enable=3D"YES" Needs # prefix >+sysrc natd_enable=3D"YES" Needs # prefix >+sysrc ifconfig_dc0=3D"DHCP" Needs # prefix >+sysrc syslogd_enable=3D"YES" >+sysrc syslogd_flags=3D"-a logclient.example.com -v -v" Need # prefix >+sysrc syslogd_enable=3D"YES" >+sysrc syslogd_flags=3D"-s -v -v" Need # prefix >diff --git a/documentation/content/en/books/handbook/linuxemu/_index.adoc = b/documentation/content/en/books/handbook/linuxemu/_index.adoc >index 8b46e6444f..8931f2892c 100644 >--- a/documentation/content/en/books/handbook/linuxemu/_index.adoc >+++ b/documentation/content/en/books/handbook/linuxemu/_index.adoc >+sysrc linux_enable=3D"YES" Needs # prefix >+sysrc linux_mounts_enable=3D"NO" Needs # prefix >diff --git a/documentation/content/en/books/handbook/multimedia/_index.ado= c b/documentation/content/en/books/handbook/multimedia/_index.adoc >index 37d7669dc8..922a0ec75c 100644 >--- a/documentation/content/en/books/handbook/multimedia/_index.adoc >+++ b/documentation/content/en/books/handbook/multimedia/_index.adoc >+sysrc devfs_system_ruleset=3D"system" Needs # prefix >diff --git a/documentation/content/en/books/handbook/printing/_index.adoc = b/documentation/content/en/books/handbook/printing/_index.adoc >index e8b92039c5..a64ee33632 100644 >--- a/documentation/content/en/books/handbook/printing/_index.adoc >+++ b/documentation/content/en/books/handbook/printing/_index.adoc >+sysrc lpd_enable=3D"YES" Needs # prefix >+sysrc lpd_enable=3D"YES" Needs # prefix --=20 You are receiving this mail because: You are the assignee for the bug.=