<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/bsdinstall/scripts/services, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>bsdinstall: Add virtual_oss service option</title>
<updated>2026-06-02T12:05:05+00:00</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2026-05-20T15:51:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eb5aa5c337c8d52fc1a7e867f526ca770bbe6612'/>
<id>eb5aa5c337c8d52fc1a7e867f526ca770bbe6612</id>
<content type='text'>
Since virtual_oss is now part of base, there is no reason not to provide
an installer option to enable it, and make it more visible to new users,
who might also benefit from the devd rules in /etc/devd/snd.conf, which
use virtual_oss, as well as 8532b4a43636 ("rc: virtual_oss: Create a
loopback device in the default configuration").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	ivy
Pull-Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/31
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since virtual_oss is now part of base, there is no reason not to provide
an installer option to enable it, and make it more visible to new users,
who might also benefit from the devd rules in /etc/devd/snd.conf, which
use virtual_oss, as well as 8532b4a43636 ("rc: virtual_oss: Create a
loopback device in the default configuration").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	ivy
Pull-Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/31
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Only offer to enable services which are installed</title>
<updated>2025-09-30T06:02:51+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-09-30T06:02:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2507698b630db3d88b0aab12c348873f827255a2'/>
<id>2507698b630db3d88b0aab12c348873f827255a2</id>
<content type='text'>
With pkgbase, users may decide to install a minimal set of packages
that's missing some daemons.  Check which services are installed, and
only include the ones which are present in the dialogue.

MFC after:	1 day
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52646
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With pkgbase, users may decide to install a minimal set of packages
that's missing some daemons.  Check which services are installed, and
only include the ones which are present in the dialogue.

MFC after:	1 day
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52646
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: avoid conflicts with fd 3</title>
<updated>2023-09-21T06:41:48+00:00</updated>
<author>
<name>Lars Kellogg-Stedman</name>
<email>lars@oddbit.com</email>
</author>
<published>2023-08-15T15:44:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c0e249d32c780ee8240fe8b3b8144078a8eec41f'/>
<id>c0e249d32c780ee8240fe8b3b8144078a8eec41f</id>
<content type='text'>
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to juggle stdout when calling out to other tools, which can
cause the installer to fail with a "Bad file descriptor" error when
f_dprintf attempts to use it.

This commit replaces all constructs like this:

    exec 3&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;3)
    exec 3&gt;&amp;-

With:

    exec 5&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;5)
    exec 5&gt;&amp;-

PR:			273148
Reviewed by:		corvink
Fixes:			1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors")
MFC after:		1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to juggle stdout when calling out to other tools, which can
cause the installer to fail with a "Bad file descriptor" error when
f_dprintf attempts to use it.

This commit replaces all constructs like this:

    exec 3&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;3)
    exec 3&gt;&amp;-

With:

    exec 5&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;5)
    exec 5&gt;&amp;-

PR:			273148
Reviewed by:		corvink
Fixes:			1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors")
MFC after:		1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Fix local_unbound option default on revisit</title>
<updated>2022-11-29T03:33:47+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2022-11-29T03:09:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bad602850e56d9e3b4900c0063a40dd29ea448fe'/>
<id>bad602850e56d9e3b4900c0063a40dd29ea448fe</id>
<content type='text'>
The variable used for the checklist's default value needs to correspond
to the rc.conf variable as that's what's being parsed to determine them.
In the case of local_unbound it's missing the _enable suffix and thus
always defaults to off on revisit.

Fixes:	58eb9abb3157 ("Add a line to the post-installation configuration dialog to enable the local_unbound service.")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variable used for the checklist's default value needs to correspond
to the rc.conf variable as that's what's being parsed to determine them.
In the case of local_unbound it's missing the _enable suffix and thus
always defaults to off on revisit.

Fixes:	58eb9abb3157 ("Add a line to the post-installation configuration dialog to enable the local_unbound service.")
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Fix issues parsing rc.conf.services on revisit</title>
<updated>2022-11-29T03:33:47+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2022-11-29T02:56:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=91985bc5adace75a938d51a97099c2a44cf5c661'/>
<id>91985bc5adace75a938d51a97099c2a44cf5c661</id>
<content type='text'>
There are a few issues here, some of which are hiding others. The first
is that we don't use double quotes around the command substitution so
every word in the conf file is treated as a separate argument to eval,
resulting in spaces being used in place of newlines and thus comments in
the file commenting out the rest of the file, not just to the end of
their line. In particular, we insert one comment just before the dumpdev
entry (the final one in the file) and so we never see dumpdev as set,
and thus set a default value of on for the menu.

The second issue is that, for dumpdev, it takes a value of AUTO not YES
when set, but we don't replace this with on when eval'ing, so then end
up giving AUTO to bsddialog which is interpreted the same as off (which
seems to match GPL dialog). Thus handle AUTO like YES otherwise it will
always appear as unchecked on revisit.

The final issue is that our case-insensitive YES/NO (and now AUTO)
replacements have no word boundaries around them so match the middle of
words too. As it happens this doesn't matter in practice at the moment,
but it could in future; currently the only effect is that it rewrites
moused_nondefault_enable to moused_offndefault_enable, but since this
variable is never read, only written based on moused(_enable) this is
harmless, but we should fix it in case a service comes along in future
that does get affected by it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a few issues here, some of which are hiding others. The first
is that we don't use double quotes around the command substitution so
every word in the conf file is treated as a separate argument to eval,
resulting in spaces being used in place of newlines and thus comments in
the file commenting out the rest of the file, not just to the end of
their line. In particular, we insert one comment just before the dumpdev
entry (the final one in the file) and so we never see dumpdev as set,
and thus set a default value of on for the menu.

The second issue is that, for dumpdev, it takes a value of AUTO not YES
when set, but we don't replace this with on when eval'ing, so then end
up giving AUTO to bsddialog which is interpreted the same as off (which
seems to match GPL dialog). Thus handle AUTO like YES otherwise it will
always appear as unchecked on revisit.

The final issue is that our case-insensitive YES/NO (and now AUTO)
replacements have no word boundaries around them so match the middle of
words too. As it happens this doesn't matter in practice at the moment,
but it could in future; currently the only effect is that it rewrites
moused_nondefault_enable to moused_offndefault_enable, but since this
variable is never read, only written based on moused(_enable) this is
harmless, but we should fix it in case a service comes along in future
that does get affected by it.
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Fix ntpd_sync_on_start service option</title>
<updated>2022-11-29T03:33:47+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2022-11-29T00:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1843da3edb2fa64384d06698ffcd62a3bdff4f7f'/>
<id>1843da3edb2fa64384d06698ffcd62a3bdff4f7f</id>
<content type='text'>
This installer option is currently totally useless, as it ends up
creating an ntpd_sync_on_start_enable="YES" entry in rc.conf, not an
ntpd_sync_on_start="YES" entry, as is the correct name. This can also be
noticed by revisiting the services menu, which parses the previously
written rc.conf.services file to set variables governing the default
menu entry values so that selecting OK regenerates the same file, as the
menu entry will use the correct variable name and thus think the entry
was not selected last time, defaulting back to off and losing the
setting.

Thus, add a special case in the loop for this option. The only other
entry that doesn't follow the *_enable pattern is dumpdev (even moused
does, it just also sets a second variable), but that also deviates in
terms of being explicitly set either way and using AUTO rather than YES,
hence why ntpd_sync_on_start follows a different pattern here and is
special-cased rather than introducing a whole new variable that governs
behaviour outside the loop.

Fixes:	c153a35bfd71 ("bsdinstall: replace ntpdate by ntpd_sync_on_start")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This installer option is currently totally useless, as it ends up
creating an ntpd_sync_on_start_enable="YES" entry in rc.conf, not an
ntpd_sync_on_start="YES" entry, as is the correct name. This can also be
noticed by revisiting the services menu, which parses the previously
written rc.conf.services file to set variables governing the default
menu entry values so that selecting OK regenerates the same file, as the
menu entry will use the correct variable name and thus think the entry
was not selected last time, defaulting back to off and losing the
setting.

Thus, add a special case in the loop for this option. The only other
entry that doesn't follow the *_enable pattern is dumpdev (even moused
does, it just also sets a second variable), but that also deviates in
terms of being explicitly set either way and using AUTO rather than YES,
hence why ntpd_sync_on_start follows a different pattern here and is
special-cased rather than introducing a whole new variable that governs
behaviour outside the loop.

Fixes:	c153a35bfd71 ("bsdinstall: replace ntpdate by ntpd_sync_on_start")
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: replace ntpdate by ntpd_sync_on_start</title>
<updated>2022-09-27T09:04:20+00:00</updated>
<author>
<name>Vinícius Zavam</name>
<email>egypcio@FreeBSD.org</email>
</author>
<published>2022-09-27T09:04:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c153a35bfd716fd74e4b3955cc60541b78ab3d8e'/>
<id>c153a35bfd716fd74e4b3955cc60541b78ab3d8e</id>
<content type='text'>
  * change current NTP services offered by the FreeBSD Installer;
  * no longer offer ntpdate to be enabled and started on boot;
  * start offering the option to make ntpd set the date and time on boot itself.

The motivation for this change comes from the ntpdate(8) manpage:

  Note: The functionality of this program is now available in the ntpd(8)
  program. See the -q command line option in the ntpd(8) page. After a
  suitable period of mourning, the ntpdate utility is to be retired from
  this distribution.

Approved by:		cy (src), dteske (src)
Differential Revision:	https://reviews.freebsd.org/D36206
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  * change current NTP services offered by the FreeBSD Installer;
  * no longer offer ntpdate to be enabled and started on boot;
  * start offering the option to make ntpd set the date and time on boot itself.

The motivation for this change comes from the ntpdate(8) manpage:

  Note: The functionality of this program is now available in the ntpd(8)
  program. See the -q command line option in the ntpd(8) page. After a
  suitable period of mourning, the ntpdate utility is to be retired from
  this distribution.

Approved by:		cy (src), dteske (src)
Differential Revision:	https://reviews.freebsd.org/D36206
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: allow whitelabeling the scripts</title>
<updated>2022-05-24T15:49:06+00:00</updated>
<author>
<name>Brad Davis</name>
<email>brd@FreeBSD.org</email>
</author>
<published>2022-05-24T15:49:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cc42ef5328963ee55c3305b136e9a86145f24594'/>
<id>cc42ef5328963ee55c3305b136e9a86145f24594</id>
<content type='text'>
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35197
Sponsored by:		Rubicon Communications, LLC ("Netgate")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35197
Sponsored by:		Rubicon Communications, LLC ("Netgate")
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall services: Improve mouse configuration</title>
<updated>2022-05-21T14:42:23+00:00</updated>
<author>
<name>Alfonso S. Siciliano</name>
<email>asiciliano@FreeBSD.org</email>
</author>
<published>2022-05-21T14:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8cfbeb56aa160de1ea4f492abeb3aa029e84269f'/>
<id>8cfbeb56aa160de1ea4f492abeb3aa029e84269f</id>
<content type='text'>
bsdinstall(8) has an option to enable moused support.
However, if it is not selected, moused is still started
through the configuration of nondefault devices.
So, automatically add the moused_nondefault_enable="NO"
setting to rc.conf unless moused support is selected.

PR:			227999
Reported by:		bcran
Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35193
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bsdinstall(8) has an option to enable moused support.
However, if it is not selected, moused is still started
through the configuration of nondefault devices.
So, automatically add the moused_nondefault_enable="NO"
setting to rc.conf unless moused support is selected.

PR:			227999
Reported by:		bcran
Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35193
</pre>
</div>
</content>
</entry>
</feed>
