aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bsdinstall/partedit/gpart_ops.c14
-rw-r--r--usr.sbin/cron/lib/env.c5
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh2
-rw-r--r--usr.sbin/inetd/inetd.840
-rw-r--r--usr.sbin/jail/jail.820
-rw-r--r--usr.sbin/mixer/mixer.844
-rw-r--r--usr.sbin/periodic/etc/weekly/Makefile11
-rw-r--r--usr.sbin/sysrc/sysrc.889
-rw-r--r--usr.sbin/utx/utx.82
9 files changed, 93 insertions, 134 deletions
diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c
index 0bcd17950daf..8da85a805545 100644
--- a/usr.sbin/bsdinstall/partedit/gpart_ops.c
+++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c
@@ -139,16 +139,16 @@ newfs_command(const char *fstype, int use_default)
} else if (strcmp(fstype, "freebsd-zfs") == 0) {
int i;
struct bsddialog_menuitem items[] = {
- {"", 0, true, "fletcher4", "checksum algorithm: fletcher4",
+ {"", true, 0, "fletcher4", "checksum algorithm: fletcher4",
"Use fletcher4 for data integrity checking. "
"(default)"},
- {"", 0, false, "fletcher2", "checksum algorithm: fletcher2",
+ {"", false, 0, "fletcher2", "checksum algorithm: fletcher2",
"Use fletcher2 for data integrity checking. "
"(not recommended)"},
- {"", 0, false, "sha256", "checksum algorithm: sha256",
+ {"", false, 0, "sha256", "checksum algorithm: sha256",
"Use sha256 for data integrity checking. "
"(not recommended)"},
- {"", 0, false, "atime", "Update atimes for files",
+ {"", false, 0, "atime", "Update atimes for files",
"Disable atime update"},
};
@@ -188,11 +188,11 @@ newfs_command(const char *fstype, int use_default)
strcmp(fstype, "ms-basic-data") == 0) {
int i;
struct bsddialog_menuitem items[] = {
- {"", 0, true, "FAT32", "FAT Type 32",
+ {"", true, 0, "FAT32", "FAT Type 32",
"Create a FAT32 filesystem (default)"},
- {"", 0, false, "FAT16", "FAT Type 16",
+ {"", false, 0, "FAT16", "FAT Type 16",
"Create a FAT16 filesystem"},
- {"", 0, false, "FAT12", "FAT Type 12",
+ {"", false, 0, "FAT12", "FAT Type 12",
"Create a FAT12 filesystem"},
};
diff --git a/usr.sbin/cron/lib/env.c b/usr.sbin/cron/lib/env.c
index 287dd8636293..5a2d7ad60756 100644
--- a/usr.sbin/cron/lib/env.c
+++ b/usr.sbin/cron/lib/env.c
@@ -55,7 +55,7 @@ env_copy(char **envp)
for (count = 0; envp[count] != NULL; count++)
;
- p = (char **) malloc((count+1) * sizeof(char *)); /* 1 for the NULL */
+ p = (char **) reallocarray(NULL, count+1, sizeof(char *)); /* 1 for the NULL */
if (p == NULL) {
errno = ENOMEM;
return NULL;
@@ -112,8 +112,7 @@ env_set(char **envp, char *envstr)
* one, save our string over the old null pointer, and return resized
* array.
*/
- p = (char **) realloc((void *) envp,
- (unsigned) ((count+1) * sizeof(char *)));
+ p = (char **) reallocarray(envp, count+1, sizeof(char *));
if (p == NULL) {
/* XXX env_free(envp); */
errno = ENOMEM;
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 143d93a6dcc0..2a07bc1fb7bc 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -1103,7 +1103,7 @@ IDS_check_params () {
check_pkgbase()
{
# Packaged base requires that pkg is bootstrapped.
- if ! pkg -r ${BASEDIR} -N >/dev/null 2>/dev/null; then
+ if ! pkg -N -r ${BASEDIR} >/dev/null 2>/dev/null; then
return 1
fi
# uname(1) is used by pkg to determine ABI, so it should exist.
diff --git a/usr.sbin/inetd/inetd.8 b/usr.sbin/inetd/inetd.8
index d2a4331bb79c..189415caa711 100644
--- a/usr.sbin/inetd/inetd.8
+++ b/usr.sbin/inetd/inetd.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 25, 2025
+.Dd November 5, 2025
.Dt INETD 8
.Os
.Sh NAME
@@ -787,44 +787,6 @@ the pid of the currently running
.Sh "EXAMPLES"
Examples for a variety of services are available in
.Pa /etc/inetd.conf .
-.Pp
-It includes examples for
-.Nm bootpd ,
-.Nm comsat ,
-.Nm cvs ,
-.Nm date ,
-.Nm fingerd ,
-.Nm ftpd ,
-.Nm imapd ,
-.Nm nc ,
-.Nm nmbd ,
-.Nm nntpd ,
-.Nm rlogind ,
-.Nm rpc.rquotad ,
-.Nm rpc.rusersd ,
-.Nm rpc.rwalld ,
-.Nm rpc.statd ,
-.Nm rpc.sprayd ,
-.Nm rshd ,
-.Nm prometheus_sysctl_exporter ,
-.Nm smtpd ,
-.Nm smbd ,
-.Nm swat
-.Nm talkd ,
-.Nm telnetd ,
-.Nm tftpd ,
-.Nm uucpd .
-.Pp
-The internal services provided by
-.Nm
-for daytime, time, echo, discard and chargen are also
-included, as well as chargen for
-.Nm ipsec
-Authentication Headers
-.Pp
-Examples for handling auth requests via
-.Nm identd ,
-are similarly included.
.Sh "ERROR MESSAGES"
The
.Nm
diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8
index 9aed9b671b9e..3a925bda8174 100644
--- a/usr.sbin/jail/jail.8
+++ b/usr.sbin/jail/jail.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2000, 2003 Robert N. M. Watson
.\" Copyright (c) 2008-2012 James Gritton
.\" All rights reserved.
@@ -23,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 8, 2025
+.Dd November 6, 2025
.Dt JAIL 8
.Os
.Sh NAME
@@ -1120,7 +1123,7 @@ process.
This manual page documents the configuration steps necessary to support
either of these steps, although the configuration steps may need to be
refined based on local requirements.
-.Ss "Setting up a Jail Directory Tree"
+.Ss Setting up a Jail Directory Tree From Source
To set up a jail directory tree containing an entire
.Fx
distribution, the following
@@ -1133,8 +1136,19 @@ mkdir -p $D
make world DESTDIR=$D
make distribution DESTDIR=$D
.Ed
+.Ss Setting up a Jail Directory Tree from Distribution Files
+To set up a jail directory tree containing an entire
+.Fx
+distribution, the following
+.Xr sh 1
+command script can be used:
+.Bd -literal -offset indent
+D=/here/is/the/jail
+mkdir -p $D
+tar -xf /usr/freebsd-dist/base.txz -C $D --unlink
+.Ed
.Pp
-In many cases this example would put far more in the jail than needed.
+In many cases these examples would put far more in the jail than needed.
In the other extreme case a jail might contain only one file:
the executable to be run in the jail.
.Pp
diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8
index 819d8ae73ab1..d7de675bceee 100644
--- a/usr.sbin/mixer/mixer.8
+++ b/usr.sbin/mixer/mixer.8
@@ -19,7 +19,7 @@
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.\" THE SOFTWARE.
.\"
-.Dd August 14, 2024
+.Dd October 31, 2025
.Dt MIXER 8
.Os
.Sh NAME
@@ -28,7 +28,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl f Ar device
-.Op Fl d Ar pcmN | N Op Fl V Ar voss_device:mode
+.Op Fl d Ar pcmX | X Op Fl V Ar voss_device:mode
.Op Fl os
.Op Ar dev Ns Op Cm \&. Ns Ar control Ns Op Cm \&= Ns Ar value
.Ar ...
@@ -47,10 +47,10 @@ The options are as follows:
.It Fl a
Print the values for all mixer devices available in the system
.Pq see Sx FILES .
-.It Fl d Ar pcmN | N
+.It Fl d Ar pcmX | X
Change the default audio card to
-.Ar pcmN ,
-where N is the unit number (e.g for pcm0, the unit number is 0).
+.Ar pcmX ,
+where X is the device's unit number (e.g for pcm0, the unit number is 0).
See
.Sx EXAMPLES
on how to list all available audio devices in the system.
@@ -246,30 +246,22 @@ makes
the only recording device.
.El
.Sh FILES
-.Bl -tag -width /dev/mixerN -compact
-.It Pa /dev/mixerN
-The mixer device, where
-.Ar N
-is the number of that device, for example
-.Ar /dev/mixer0 .
-PCM cards and mixers have a 1:1 relationship, which means that
+.Bl -tag -width "/dev/mixerX" -compact
+.It Pa /dev/mixerX
+The mixer device, where X is the unit number of that device,
+.Pa /dev/dsp*
+devices and
+.Pa /dev/mixer*
+devices have a 1:1 relationship, which means that, for instance,
.Pa /dev/mixer0
-is the mixer for
-.Pa /dev/pcm0
-and so on.
-By default,
+is the mixer device for
+.Pa /dev/dsp0 .
+.It /dev/mixer
+Alias to the default device's mixer device.
.Nm
-prints both the audio card's number and the mixer associated with it
-in the form of
-.Ar pcmN:mixer .
-The
-.Pa /dev/mixer
-file, although it does not exist in the filesystem, points to the default
-mixer device and is the file
-.Nm
-opens when the
+opens this when the
.Fl f Ar device
-option has not been specified.
+option is not specified.
.El
.Sh EXAMPLES
List all available audio devices in the system:
diff --git a/usr.sbin/periodic/etc/weekly/Makefile b/usr.sbin/periodic/etc/weekly/Makefile
index d194a988acf0..a5483534c029 100644
--- a/usr.sbin/periodic/etc/weekly/Makefile
+++ b/usr.sbin/periodic/etc/weekly/Makefile
@@ -8,12 +8,11 @@ CONFS= 340.noid \
# NB: keep these sorted by MK_* knobs
-.if ${MK_LOCATE} != "no"
-CONFS+= 310.locate
-.endif
+CONFGROUPS.${MK_LOCATE}+= LOCATE
+LOCATE= 310.locate
-.if ${MK_MAN_UTILS} != "no"
-CONFS+= 320.whatis
-.endif
+CONFGROUPS.${MK_MAN_UTILS}+= WHATIS
+WHATISPACKAGE= mandoc
+WHATIS= 320.whatis
.include <bsd.prog.mk>
diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8
index bdf3353c2cf9..cb32f72ea587 100644
--- a/usr.sbin/sysrc/sysrc.8
+++ b/usr.sbin/sysrc/sysrc.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2011-2016 Devin Teske
.\" All rights reserved.
.\"
@@ -408,62 +411,52 @@ and
.It Pa /usr/local/etc/rc.conf.d/name/*
.El
.Sh EXAMPLES
-Below are some simple examples of how
-.Nm
-can be used to query certain values from the
-.Xr rc.conf 5
-collection of system configuration files:
-.Pp
-.Nm
-sshd_enable
-.Dl returns the value of $sshd_enable, usually YES or NO .
+.Ss Working with rc.conf files
+Ask the value of
+.Cm sshd_enable ,
+usually YES or NO:
+.Dl sysrc sshd_enable
.Pp
-.Nm
-defaultrouter
-.Dl returns IP address of default router Pq if configured .
-.Pp
-Working on other files, such as
+Return the IP address of default router
+.Pq if configured :
+.Dl sysrc defaultrouter
+.Ss Working with other files
+Return the value of the MAILTO setting, if configured, from
.Xr crontab 5 :
+.Dl sysrc -f /etc/crontab MAILTO
.Pp
-.Nm
--f /etc/crontab MAILTO
-.Dl returns the value of the MAILTO setting Pq if configured .
-.Pp
-Appending to existing values:
-.Pp
-.Nm
-\&cloned_interfaces+=gif0
-.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES .
-.Pp
-.Nm
-\&cloned_interfaces-=gif0
-.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES .
-.Pp
-In addition to the above syntax,
-.Nm
-also supports inline
-.Xr sh 1
-PARAMETER expansion for changing the way values are reported, shown below:
+Append
+.Dq gif0
+to $cloned_interfaces
+.Pq see Sx APPENDING VALUES :
+.Dl sysrc cloned_interfaces+=gif0
.Pp
-.Nm
-\&'hostname%%.*'
-.Dl returns $hostname up to (but not including) first `.' .
+Remove
+.Dq gif0
+from $cloned_interfaces
+.Pq see Sx SUBTRACTING VALUES :
+.Dl sysrc cloned_interfaces-=gif0
+.Ss Inline shell parameter expansion
+Return $hostname up to, but not including, first
+.Ql \&. :
+.Dl sysrc 'hostname%%.*'
.Pp
-.Nm
-\&'network_interfaces%%[$IFS]*'
-.Dl returns first word of $network_interfaces .
+Return first word of $network_interfaces:
+.Dl sysrc 'network_interfaces%%[$IFS]*'
.Pp
-.Nm
-\&'ntpdate_flags##*[$IFS]'
-.Dl returns last word of $ntpdate_flags (time server address) .
+Return last word of $ntpdate_flags
+.Pq time server address :
+.Dl sysrc 'ntpdate_flags##*[$IFS]'
.Pp
-.Nm
-usbd_flags-"default"
-.Dl returns $usbd_flags or "default" if unset or NULL .
+Return $usbd_flags or
+.Dq default
+if unset or NULL:
+.Dl sysrc usbd_flags-"default"
.Pp
-.Nm
-cloned_interfaces+"alternate"
-.Dl returns "alternate" if $cloned_interfaces is set .
+Return
+.Dq alternate
+if $cloned_interfaces is set:
+.Dl sysrc cloned_interfaces+"alternate"
.Sh SEE ALSO
.Xr rc.conf 5 ,
.Xr jail 8 ,
diff --git a/usr.sbin/utx/utx.8 b/usr.sbin/utx/utx.8
index ddcdcc08b2d2..354691e7138f 100644
--- a/usr.sbin/utx/utx.8
+++ b/usr.sbin/utx/utx.8
@@ -92,4 +92,4 @@ utility replaced
in
.Fx 10.0 .
.Sh AUTHORS
-.An Ed Schouten Aq Mt ed@FreeBSD.org
+.An \&Ed Schouten Aq Mt ed@FreeBSD.org