<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rc, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-09-23T00:43:36Z</updated>
<entry>
<title>rc.d/var_run: Add needed "shutdown" keyword</title>
<updated>2022-09-23T00:43:36Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2022-09-20T18:44:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3815600910d2f0c2be9466462795b8d5023bc27f'/>
<id>urn:sha1:3815600910d2f0c2be9466462795b8d5023bc27f</id>
<content type='text'>
The "shutdown" keyword invokes rcorder with the -k flag, for rc scripts
with the keyword at shutdown.

Reported by:	bdrewery
Fixes:		27b9777c28b4

(cherry picked from commit b77b3099685f27fa1da89cb5b8f376bef87b05ec)
</content>
</entry>
<entry>
<title>libexec/rc: Add var_run rc script</title>
<updated>2022-09-12T00:43:42Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2022-08-28T12:48:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eb3e5718bfba6e39d5dd34238b789ffaed974fad'/>
<id>urn:sha1:eb3e5718bfba6e39d5dd34238b789ffaed974fad</id>
<content type='text'>
Users with a tmpfs /var/run will lose the directory tree state of
/var/run at reboot. This rc script will optionally (by default)
capture the state of the directory structure in /var/run prior to
shutdown and recreate it at system boot.

Alternatively a user can save the state of the /var/run directories
manually using service var_run save and disable the autosaving of
/var/run state using the var_run_autosave variable, for those
paranoid SSD users.

PR:			259585, 259699
Reported by:		freebsd@walstatt-de.de,
Reviewed by:		philip, gbe (previous version)
Differential Revision:	https://reviews.freebsd.org/D36386

(cherry picked from commit 27b9777c28b4e9474bdc500c28d04feec48fbb84)
</content>
</entry>
<entry>
<title>ntpd(8): Correct a typo in comment of the rc script</title>
<updated>2022-09-07T07:49:21Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-09-04T11:02:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b07e470bffd708defee524aabae5bbe49f10c2ff'/>
<id>urn:sha1:b07e470bffd708defee524aabae5bbe49f10c2ff</id>
<content type='text'>
- s/the the/the/

(cherry picked from commit 7ed279f58f83499cc62d253487462c1743da6aec)
</content>
</entry>
<entry>
<title>rc.conf: Fix a typo in a comment</title>
<updated>2022-09-06T05:44:07Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-09-03T12:57:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f86105d5f3dfd6dc18cd6709953fb29176aeb75'/>
<id>urn:sha1:8f86105d5f3dfd6dc18cd6709953fb29176aeb75</id>
<content type='text'>
- s/overriden/overridden/

(cherry picked from commit 0a81527da8e51e3dd77af2ef4950d6559684487f)
</content>
</entry>
<entry>
<title>rc.d/wpa_supplicant: Remove the sleep to improve boot time</title>
<updated>2022-08-13T03:35:02Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2022-06-12T19:02:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=25a97fbf46d52553156af9f9f0eb20b23fe47363'/>
<id>urn:sha1:25a97fbf46d52553156af9f9f0eb20b23fe47363</id>
<content type='text'>
bapt@ had discovered a noticeable boot improvement without the sleep.
Without the sleep does not affect warm or cold boot however a
service netif restart may cause dhclient to spend a few extra seconds
to rerequest the DHCP request.

Reported by:	bapt
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D35457

(cherry picked from commit 116679b39cb94fdb94c02dceb1c2cae719bd3f42)
</content>
</entry>
<entry>
<title>[pf] /etc/rc.d/pf should REQUIRE routing</title>
<updated>2022-07-26T14:58:47Z</updated>
<author>
<name>Pawel Biernacki</name>
<email>kaktus@FreeBSD.org</email>
</author>
<published>2020-10-08T11:45:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ca80dd4ed3845c0d783e772bf906911b4c23fdc3'/>
<id>urn:sha1:ca80dd4ed3845c0d783e772bf906911b4c23fdc3</id>
<content type='text'>
When a system with pf_enable="YES" in /etc/rc.conf uses hostnames in
/etc/pf.conf, these hostnames cannot be resolved via external nameservers
because the default route is not yet set. This results in an empty
(all open) ruleset.

Since r195026 already put netif back to REQUIRE, this change does not affect
the issue that the firewall should rather have been setup before any
network traffic can occur.

PR:		211928
Submitted by:	Robert Schulze
Reported by:	Robert Schulze
Tested by:	Mateusz Kwiatkowski
No objections from:	kp
MFC after:	3 days

(cherry picked from commit 9ef917591248e35efea846d0d743b74503387099)

Approved by:    kp
</content>
</entry>
<entry>
<title>rc.subr: Make sure oomprotect protects existing children</title>
<updated>2022-07-22T00:09:30Z</updated>
<author>
<name>Mike Walker</name>
<email>mike.walker@napkindrawing.com</email>
</author>
<published>2022-07-07T20:28:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=62cd401b90ea2597e446e17b9d76045cfec59770'/>
<id>urn:sha1:62cd401b90ea2597e446e17b9d76045cfec59770</id>
<content type='text'>
The rc(8) framework support protecting services from OOM killer.
The current implementation applies the protection after the service has
already started. This works fine if only the main process is to be
protected (*_oomprotect=yes). However, the current implementation fails
to protect existing children when children are also to be protected
(*_oomprotect=all). This patch fixes that.

Note: it is not easy to apply the protectoin earlier because we want to
support both the services which use the "command" variable and those
that use the "start_cmd" variable.

PR:		256148
Approved by:	adrian, osogbo
Tested by:	Jamie Landeg-Jones &lt;jamie@catflap.org&gt;
Fixes:		3bead71e959d - Add a global option where we can protect
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D35747

(cherry picked from commit 68e035c0172b441db772de41ad0f8977679bfedc)
</content>
</entry>
<entry>
<title>mountd startup: enable NFSv4 if needed on restart</title>
<updated>2022-07-11T12:45:02Z</updated>
<author>
<name>Mike Karels</name>
<email>karels@FreeBSD.org</email>
</author>
<published>2022-07-03T23:04:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1668ea8284b230b15fc8f096fe2110ef3546f933'/>
<id>urn:sha1:1668ea8284b230b15fc8f096fe2110ef3546f933</id>
<content type='text'>
The mountd script in rc.d sets vfs.nfsd.server_max_nfsvers correctly
when it is run at system startup, relying on the kernel default.
However, if NFSv4 was enabled in /etc/rc.conf later, and the script
was re-run to restart mountd, the sysctl was still set to 3.
Set the sysctl to the right value in all cases.

Reviewed by:	rmacklem

(cherry picked from commit 1cf8e6339e9add47107a6c9988a0f509225b7ef6)
</content>
</entry>
<entry>
<title>rc.subr: use _pidcmd to determine pid for protect</title>
<updated>2022-07-07T18:13:24Z</updated>
<author>
<name>Mariusz Zaborski</name>
<email>oshogbo@FreeBSD.org</email>
</author>
<published>2021-06-24T18:14:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c54008fe2a3b9dbb1cf9e443f38593228242918b'/>
<id>urn:sha1:c54008fe2a3b9dbb1cf9e443f38593228242918b</id>
<content type='text'>
This is a more reliable method that accounts for existing pidfiles,
procname and interpreter settings.

Current method of obtaining the pid for oomprotect="YES"|"ALL" processes
in certain cases fails to find a unique pid.

One such case are rc.d scripts defining command as:
command="daemon"

which results in all processes started via daemon being selected and
passed to protect(1) which fails and prints usage:

$ /etc/rc.d/exampled restart
Stopping exampled.
Starting exampled.
usage: protect [-i] command
   protect [-cdi] -g pgrp | -p pid

Running the same with -x reveals what happens:

+ pid='3051 4268 4390 4421 4427 4470 4588 4733 4740 4870 4949 4954 4979
5835 5866 55487 55583 56525 57643 57789 57882 58072 58167 99419'
+ /usr/bin/protect -p 3051 4268 4390 4421 4427 4470 4588 4733 4740 4870
4949 4954 4979 5835 5866 55487 55583 56525 57643 57789 57882 58072 58167
99419
usage: protect [-i] command
   protect [-cdi] -g pgrp | -p pid

We have a more reliable way of obtaining pid already defined in rc.subr
and available when protect(1) needs it. We can simply `eval $_pidcmd`
which also invokes `check_process` but properly accounts for existing
pidfile, procname and interpreter settings.

With the change the pidfile is properly obtained.

Submitted by:	Adam Wolk &lt;a.wolk at fudosecurity.com&gt;
Sponsored by:	Fudo Security
Differential Revision:	https://reviews.freebsd.org/D30367

Approved by:	oshogbo

(cherry picked from commit 6ba108e52d175b6833437c8627ae5d0546a4e102)
</content>
</entry>
<entry>
<title>libexec/rc.d/hostapd: Down/up interface when interface is specified</title>
<updated>2022-04-25T13:51:12Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2022-04-22T16:03:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d818ef7df7330e8b3aac43f5160e102d6a702862'/>
<id>urn:sha1:d818ef7df7330e8b3aac43f5160e102d6a702862</id>
<content type='text'>
When no interface is specified results in a syntax error in the rc
script. Only execute poststart when an interface has been specified.

PR:		263358
Submitted by:	markj
Reported by:	Joshua Kinard &lt;freebsd@kumba.dev&gt;
Fixes:		0da2c91e64528d896f69d36670e25b4b4a140579

(cherry picked from commit 1452bfcd9bbcb2f5bbb89fa38d01ce51dd9b6d44)
</content>
</entry>
</feed>
