View | Details | Raw Unified | Return to bug 263782 | Differences between
and this patch

Collapse All | Expand All

(-)b/documentation/content/en/books/handbook/basics/_index.adoc (-2 / +2 lines)
Lines 202-212 To select a new video mode, specify the mode using man:vidcontrol[1] as the `roo Link Here
202
# vidcontrol MODE_279
202
# vidcontrol MODE_279
203
....
203
....
204
204
205
If the new video mode is acceptable, it can be permanently set on boot by adding it to [.filename]#/etc/rc.conf#:
205
If the new video mode is acceptable, it can be permanently set on boot by using https://www.freebsd.org/cgi/man.cgi?query=sysrc[sysrc]:
206
206
207
[.programlisting]
207
[.programlisting]
208
....
208
....
209
allscreens_flags="MODE_279"
209
sysrc allscreens_flags="MODE_279"
210
....
210
....
211
211
212
[[users-synopsis]]
212
[[users-synopsis]]
(-)b/documentation/content/en/books/handbook/config/_index.adoc (-15 / +15 lines)
Lines 56-62 This chapter explains much of the FreeBSD configuration process, including some Link Here
56
56
57
After reading this chapter, you will know:
57
After reading this chapter, you will know:
58
58
59
* The basics of [.filename]#rc.conf# configuration and [.filename]#/usr/local/etc/rc.d# startup scripts.
59
* The basics of [.filename]#rc.conf# configuration with man:sysrc[8] and [.filename]#/usr/local/etc/rc.d# startup scripts.
60
* How to configure and test a network card.
60
* How to configure and test a network card.
61
* How to configure virtual hosts on network devices.
61
* How to configure virtual hosts on network devices.
62
* How to use the various configuration files in [.filename]#/etc#.
62
* How to use the various configuration files in [.filename]#/etc#.
Lines 80-86 In FreeBSD, most included services, such as man:cron[8], are started through the Link Here
80
=== Extended Application Configuration
80
=== Extended Application Configuration
81
81
82
Now that FreeBSD includes [.filename]#rc.d#, configuration of application startup is easier and provides more features.
82
Now that FreeBSD includes [.filename]#rc.d#, configuration of application startup is easier and provides more features.
83
Using the key words discussed in <<configtuning-rcd>>, applications can be set to start after certain other services and extra flags can be passed through [.filename]#/etc/rc.conf# in place of hard coded flags in the startup script.
83
Using the key words discussed in <<configtuning-rcd>>, applications can be set to start after certain other services and extra flags can be passed through man:sysrc[8] in place of hard coded flags in the startup script.
84
A basic script may look similar to the following:
84
A basic script may look similar to the following:
85
85
86
[.programlisting]
86
[.programlisting]
Lines 113-126 run_rc_command "$1" Link Here
113
This script will ensure that the provided `utility` will be started after the `DAEMON` pseudo-service.
113
This script will ensure that the provided `utility` will be started after the `DAEMON` pseudo-service.
114
It also provides a method for setting and tracking the process ID (PID).
114
It also provides a method for setting and tracking the process ID (PID).
115
115
116
This application could then have the following line placed in [.filename]#/etc/rc.conf#:
116
This application could then be enabled with man:sysrc[8]:
117
117
118
[.programlisting]
118
[.programlisting]
119
....
119
....
120
utility_enable="YES"
120
sysrc utility_enable="YES"
121
....
121
....
122
122
123
This method allows for easier manipulation of command line arguments, inclusion of the default functions provided in [.filename]#/etc/rc.subr#, compatibility with man:rcorder[8], and provides for easier configuration via [.filename]#rc.conf#.
123
This method allows for easier manipulation of command line arguments, inclusion of the default functions provided in [.filename]#/etc/rc.subr#, compatibility with man:rcorder[8], and provides for easier configuration via man:sysrc[8].
124
124
125
=== Using Services to Start Services
125
=== Using Services to Start Services
126
126
Lines 255-265 For instance, man:sshd[8] can be restarted with the following command: Link Here
255
255
256
This procedure can be used to start services on a running system.
256
This procedure can be used to start services on a running system.
257
Services will be started automatically at boot time as specified in man:rc.conf[5].
257
Services will be started automatically at boot time as specified in man:rc.conf[5].
258
For example, to enable man:natd[8] at system startup, add the following line to [.filename]#/etc/rc.conf#:
258
For example, to enable man:natd[8] at system startup, use man:sysrc[8]:
259
259
260
[.programlisting]
260
[.programlisting]
261
....
261
....
262
natd_enable="YES"
262
sysrc natd_enable="YES"
263
....
263
....
264
264
265
If a `natd_enable="NO"` line is already present, change the `NO` to `YES`.
265
If a `natd_enable="NO"` line is already present, change the `NO` to `YES`.
Lines 561-572 dc0: flags=8843<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 Link Here
561
it would indicate the card has not been configured.
561
it would indicate the card has not been configured.
562
562
563
The card must be configured as `root`.
563
The card must be configured as `root`.
564
The NIC configuration can be performed from the command line with man:ifconfig[8] but will not persist after a reboot unless the configuration is also added to [.filename]#/etc/rc.conf#.
564
The NIC configuration can be performed from the command line with man:ifconfig[8] but will not persist after a reboot unless the configuration is also modified with man:sysrc[8].
565
If a DHCP server is present on the LAN, just add this line:
565
If a DHCP server is present on the LAN, just add this line:
566
566
567
[.programlisting]
567
[.programlisting]
568
....
568
....
569
ifconfig_dc0="DHCP"
569
sysrc ifconfig_dc0="DHCP"
570
....
570
....
571
571
572
Replace _dc0_ with the correct value for the system.
572
Replace _dc0_ with the correct value for the system.
Lines 948-959 This example adds the hostname of `B`, logs all facilities, and stores the log e Link Here
948
When adding multiple log clients, add a similar two-line entry for each client.
948
When adding multiple log clients, add a similar two-line entry for each client.
949
More information about the available facilities may be found in man:syslog.conf[5].
949
More information about the available facilities may be found in man:syslog.conf[5].
950
950
951
Next, configure [.filename]#/etc/rc.conf#:
951
Next, configure with man:sysrc[8]:
952
952
953
[.programlisting]
953
[.programlisting]
954
....
954
....
955
syslogd_enable="YES"
955
sysrc syslogd_enable="YES"
956
syslogd_flags="-a logclient.example.com -v -v"
956
sysrc syslogd_flags="-a logclient.example.com -v -v"
957
....
957
....
958
958
959
The first entry starts syslogd at system boot.
959
The first entry starts syslogd at system boot.
Lines 988-999 If the server did not restart, consult [.filename]#/var/log/messages# for the er Link Here
988
A logging client sends log entries to a logging server on the network.
988
A logging client sends log entries to a logging server on the network.
989
The client also keeps a local copy of its own logs.
989
The client also keeps a local copy of its own logs.
990
990
991
Once a logging server has been configured, edit [.filename]#/etc/rc.conf# on the logging client:
991
Once a logging server has been configured, use man:sysrc[8] to enable the logging client:
992
992
993
[.programlisting]
993
[.programlisting]
994
....
994
....
995
syslogd_enable="YES"
995
sysrc syslogd_enable="YES"
996
syslogd_flags="-s -v -v"
996
sysrc syslogd_flags="-s -v -v"
997
....
997
....
998
998
999
The first entry enables syslogd on boot up.
999
The first entry enables syslogd on boot up.
(-)b/documentation/content/en/books/handbook/firewalls/_index.adoc (-5 / +4 lines)
Lines 182-190 It also provides several examples for creating rulesets on a FreeBSD system. Link Here
182
=== Enabling PF
182
=== Enabling PF
183
183
184
To use PF, its kernel module must be first loaded.
184
To use PF, its kernel module must be first loaded.
185
This section describes the entries that can be added to [.filename]#/etc/rc.conf# to enable PF.
185
This section describes the entries that can be added to enable PF using man:sysrc[8]:
186
186
187
Start by adding `pf_enable=yes` to [.filename]#/etc/rc.conf#:
188
187
189
[source,shell]
188
[source,shell]
190
....
189
....
Lines 192-198 Start by adding `pf_enable=yes` to [.filename]#/etc/rc.conf#: Link Here
192
....
191
....
193
192
194
Additional options, described in man:pfctl[8], can be passed to PF when it is started.
193
Additional options, described in man:pfctl[8], can be passed to PF when it is started.
195
Add or change this entry in [.filename]#/etc/rc.conf# and specify any required flags between the two quotes (`""`):
194
Use man:sysrc[8] to specify any required flags between the two quotes (`""`):
196
195
197
[.programlisting]
196
[.programlisting]
198
....
197
....
Lines 202-208 pf_flags="" # additional flags for pfctl startup Link Here
202
PF will not start if it cannot find its ruleset configuration file.
201
PF will not start if it cannot find its ruleset configuration file.
203
By default, FreeBSD does not ship with a ruleset and there is no [.filename]#/etc/pf.conf#.
202
By default, FreeBSD does not ship with a ruleset and there is no [.filename]#/etc/pf.conf#.
204
Example rulesets can be found in [.filename]#/usr/share/examples/pf/#.
203
Example rulesets can be found in [.filename]#/usr/share/examples/pf/#.
205
If a custom ruleset has been saved somewhere else, add a line to [.filename]#/etc/rc.conf# which specifies the full path to the file:
204
If a custom ruleset has been saved somewhere else, use man:sysrc[8] to add a line to specify the full path to the file:
206
205
207
[.programlisting]
206
[.programlisting]
208
....
207
....
Lines 210-216 pf_rules="/path/to/pf.conf" Link Here
210
....
209
....
211
210
212
Logging support for PF is provided by man:pflog[4].
211
Logging support for PF is provided by man:pflog[4].
213
To enable logging support, add `pflog_enable=yes` to [.filename]#/etc/rc.conf#:
212
To enable logging support, add `pflog_enable=yes` with man:sysrc[8]:
214
213
215
[source,shell]
214
[source,shell]
216
....
215
....
(-)b/documentation/content/en/books/handbook/linuxemu/_index.adoc (-4 / +4 lines)
Lines 71-81 Before reading this chapter, you should: Link Here
71
== Configuring Linux Binary Compatibility
71
== Configuring Linux Binary Compatibility
72
72
73
By default, Linux binary compatibility is not enabled.
73
By default, Linux binary compatibility is not enabled.
74
To enable it at boot time, add this line to [.filename]#/etc/rc.conf#:
74
To enable it at boot time, use man:sysrc[8]:
75
75
76
[.programlisting]
76
[.programlisting]
77
....
77
....
78
linux_enable="YES"
78
sysrc linux_enable="YES"
79
....
79
....
80
80
81
Once enabled, it can be started without rebooting by running:
81
Once enabled, it can be started without rebooting by running:
Lines 149-159 Consult https://wiki.freebsd.org/Linuxulator[FreeBSD Wiki - Linuxulator] for mor Link Here
149
A list of all Linux-related man:sysctl[8] knobs can be found in man:linux[4].
149
A list of all Linux-related man:sysctl[8] knobs can be found in man:linux[4].
150
150
151
Some applications require specific filesystems to be mounted.
151
Some applications require specific filesystems to be mounted.
152
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#:
152
This is normally handled by the [.filename]#/etc/rc.d/linux# script, but can be disabled by using man:sysrc[8]:
153
153
154
[.programlisting]
154
[.programlisting]
155
....
155
....
156
linux_mounts_enable="NO"
156
sysrc linux_mounts_enable="NO"
157
....
157
....
158
158
159
Filesystems mounted by the rc script will not work for Linux processes inside chroots or jails; if needed, configure them in [.filename]#/etc/fstab#:
159
Filesystems mounted by the rc script will not work for Linux processes inside chroots or jails; if needed, configure them in [.filename]#/etc/fstab#:
(-)b/documentation/content/en/books/handbook/multimedia/_index.adoc (-2 / +2 lines)
Lines 1225-1235 add path 'usb/*' mode 0666 group usb Link Here
1225
1225
1226
Refer to man:devfs.rules[5] for more information about this file.
1226
Refer to man:devfs.rules[5] for more information about this file.
1227
1227
1228
Next, enable the ruleset in /etc/rc.conf:
1228
Next, enable the ruleset with https://www.freebsd.org/cgi/man.cgi?query=sysrc[sysrc]:
1229
1229
1230
[.programlisting]
1230
[.programlisting]
1231
....
1231
....
1232
devfs_system_ruleset="system"
1232
sysrc devfs_system_ruleset="system"
1233
....
1233
....
1234
1234
1235
And, restart the man:devfs[8] system:
1235
And, restart the man:devfs[8] system:
(-)b/documentation/content/en/books/handbook/ports/_index.adoc (-1 / +1 lines)
Lines 1309-1315 The following commands and locations can be used to help determine what was inst Link Here
1309
1309
1310
* 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 possibly edited to meet the system's needs. To edit a sample file, first copy it without the [.filename]#.sample# extension.
1310
* 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 possibly edited to meet the system's needs. To edit a sample file, first copy it without the [.filename]#.sample# extension.
1311
* Applications which provide documentation will install it into [.filename]#/usr/local/share/doc# and many applications also install manual pages. This documentation should be consulted before continuing.
1311
* Applications which provide documentation will install it into [.filename]#/usr/local/share/doc# and many applications also install manual pages. This documentation should be consulted before continuing.
1312
* Some applications run services which must be added to [.filename]#/etc/rc.conf# before starting the application. These applications usually install a startup script in [.filename]#/usr/local/etc/rc.d#. See crossref:config[configtuning-starting-services,Starting Services] for more information.
1312
* Some applications run services which must be added to [.filename]#/etc/rc.conf# with https://www.freebsd.org/cgi/man.cgi?query=sysrc[sysrc] before starting the application. These applications usually install a startup script in [.filename]#/usr/local/etc/rc.d#. See crossref:config[configtuning-starting-services,Starting Services] for more information.
1313
+
1313
+
1314
[NOTE]
1314
[NOTE]
1315
====
1315
====
(-)b/documentation/content/en/books/handbook/printing/_index.adoc (-4 / +4 lines)
Lines 100-110 For a printer connected directly to a network, use: Link Here
100
+
100
+
101
Replace _network-printer-name_ with the `DNS` host name of the network printer.
101
Replace _network-printer-name_ with the `DNS` host name of the network printer.
102
+
102
+
103
. Enable LPD by editing [.filename]#/etc/rc.conf#, adding this line:
103
. Enable LPD by editing by using https://www.freebsd.org/cgi/man.cgi?query=sysrc[sysrc]:
104
+
104
+
105
[.programlisting]
105
[.programlisting]
106
....
106
....
107
lpd_enable="YES"
107
sysrc lpd_enable="YES"
108
....
108
....
109
+
109
+
110
Start the service:
110
Start the service:
Lines 375-385 After creating [.filename]#/etc/printcap#, use man:chkprintcap[8] to test it for Link Here
375
375
376
Fix any reported problems before continuing.
376
Fix any reported problems before continuing.
377
377
378
Enable man:lpd[8] in [.filename]#/etc/rc.conf#:
378
Enable man:lpd[8] in man:sysrc[8]:
379
379
380
[.programlisting]
380
[.programlisting]
381
....
381
....
382
lpd_enable="YES"
382
sysrc lpd_enable="YES"
383
....
383
....
384
384
385
Start the service:
385
Start the service:
(-)b/documentation/content/en/books/handbook/x11/_index.adoc (-6 / +6 lines)
Lines 942-948 Refer to <<x11-wm-gnome>> for instructions on how to configure the GNOME Display Link Here
942
=== Configuring XDM
942
=== Configuring XDM
943
943
944
To install XDM, use the package:x11/xdm[] package or port.
944
To install XDM, use the package:x11/xdm[] package or port.
945
Once installed, XDM can be configured to run when the machine boots up by using sysrc:
945
Once installed, XDM can be configured to run when the machine boots up by using man:sysrc[8]:
946
946
947
[.programlisting]
947
[.programlisting]
948
....
948
....
Lines 1046-1052 proc /proc procfs rw 0 0 Link Here
1046
1046
1047
GNOME uses D-Bus for a message bus and hardware abstraction.
1047
GNOME uses D-Bus for a message bus and hardware abstraction.
1048
These applications are automatically installed as dependencies of GNOME.
1048
These applications are automatically installed as dependencies of GNOME.
1049
Enable them with sysrc so they will be started when the system boots:
1049
Enable them with man:sysrc[8] so they will be started when the system boots:
1050
1050
1051
[.programlisting]
1051
[.programlisting]
1052
....
1052
....
Lines 1063-1069 sysrc gdm_enable="YES" Link Here
1063
....
1063
....
1064
1064
1065
It is often desirable to also start all GNOME services.
1065
It is often desirable to also start all GNOME services.
1066
To achieve this, use sysrc:
1066
To achieve this, use man:sysrc[8]:
1067
1067
1068
[.programlisting]
1068
[.programlisting]
1069
....
1069
....
Lines 1124-1130 proc /proc procfs rw 0 0 Link Here
1124
1124
1125
KDE uses D-Bus for a message bus and hardware abstraction.
1125
KDE uses D-Bus for a message bus and hardware abstraction.
1126
These applications are automatically installed as dependencies of KDE.
1126
These applications are automatically installed as dependencies of KDE.
1127
Enable them with sysrc so they will be started when the system boots:
1127
Enable them with man:sysrc[8] so they will be started when the system boots:
1128
1128
1129
[.programlisting]
1129
[.programlisting]
1130
....
1130
....
Lines 1140-1146 To install it, type: Link Here
1140
# pkg install x11/sddm
1140
# pkg install x11/sddm
1141
....
1141
....
1142
1142
1143
Use sysrc to enable:
1143
Use man:sysrc[8] to enable:
1144
1144
1145
[.programlisting]
1145
[.programlisting]
1146
....
1146
....
Lines 1191-1197 Alternatively, to build the port: Link Here
1191
1191
1192
Xfce uses D-Bus for a message bus.
1192
Xfce uses D-Bus for a message bus.
1193
This application is automatically installed as dependency of Xfce.
1193
This application is automatically installed as dependency of Xfce.
1194
Enable it with sysrc so it will be started when the system boots:
1194
Enable it with man:sysrc[8] so it will be started when the system boots:
1195
1195
1196
[.programlisting]
1196
[.programlisting]
1197
....
1197
....

Return to bug 263782