| #
f99f0ee1
|
| 22-May-2024 |
Alexander Leidinger <netchild@FreeBSD.org> |
rc.d: add a service jails config to all base system services
This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic servic
rc.d: add a service jails config to all base system services
This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic service jail.
The sshd patch is important for the sshd-related functionality as described in the man-page in the service jails part.
The location of the added env vars is supposed to allow overriding them in rc.conf, and to hard-disable the use of svcj for some parts where it doesn't make sense or will not work.
Only a subset of all of the services are fully tested (I'm running this since more than a year with various services started as service jails). The untested parts should be most of the time ok, in some edge-cases more permissions are needed inside the service jail. Differential Revision: https://reviews.freebsd.org/D40371
show more ...
|
| #
d0b2dbfa
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
ccc806a0
|
| 02-Jul-2023 |
Eugene Grosbein <eugen@FreeBSD.org> |
dumpdev: respect kenv for stable branches
We have somewhat twisted logic to determine actions for dumpdev considering three sources of information:
* kenv "dumpdev" tunnable supposed to point to sp
dumpdev: respect kenv for stable branches
We have somewhat twisted logic to determine actions for dumpdev considering three sources of information:
* kenv "dumpdev" tunnable supposed to point to specific device; * /etc/defaults/rc.conf "dumpdev" variable; * /etc/rc.conf that may be unset or set to "NO", "AUTO" or device name.
For CURRENT without any setting in kenv or /etc/rc.conf the default is "AUTO". For STABLE branches the default is "NO".
Current implementation breaks for STABLE branches if kenv points to specific device but /etc/rc.conf does not set "dumpdev" at all.
Let us fix it commenting out "dumpdev" in /etc/defaults/rc.conf for STABLE branches and making the code to consult kenv if "dumpdev" is not set elsewhere.
MFC-after: 1 month
show more ...
|
| #
325ebf37
|
| 13-Mar-2022 |
Jose Luis Duran <jlduran@gmail.com> |
Introduce startmsg and use it in rc scripts
startmsg is a new rc.subr(8) function function to be used instead of echo(1) when for boot messages. It replaces the often forgotten
check_startmsgs
Introduce startmsg and use it in rc scripts
startmsg is a new rc.subr(8) function function to be used instead of echo(1) when for boot messages. It replaces the often forgotten
check_startmsgs && echo ...
with
startmsg ...
No functional change intended.
I adjusted the commit message and did some final clean-ups of the patch before committing.
PR: 255207 Reported by: Jose Luis Duran <jlduran@gmail.com> Reviewed by: imp, 0mp Approved by: imp (src) Differential Revision: https://reviews.freebsd.org/D34514
show more ...
|
| #
0696600c
|
| 17-Oct-2018 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Move the rc framework out of sbin/init into libexec/rc.
The reasons for this are forward looking to pkgbase: * /sbin/init is a special binary; try not to replace it with every package update bec
Move the rc framework out of sbin/init into libexec/rc.
The reasons for this are forward looking to pkgbase: * /sbin/init is a special binary; try not to replace it with every package update because an rc script was touched. (a follow-up commit will make init its own package) * having rc in its own place will allow more easy replacement of the rc framework with alternatives, such as openrc.
Discussed with: brd (during BSDCam), kmoore Requested by: cem, bz PR: 231522 Approved by: re (gjb)
show more ...
|
| #
1135e97b
|
| 28-Jul-2018 |
Brad Davis <brd@FreeBSD.org> |
Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from back during BSDCan.
Approved by: will (mentor) Differential Revision:
Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from back during BSDCan.
Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16466
show more ...
|
| #
1f1ed24c
|
| 01-Jun-2017 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
crashinfo: add "batch" mode and use it during boot
In batch mode, most messages go into the core.txt.N file instead of stdout.
Reviewed by: jhb MFC after: 3 days Sponsored by: Dell EMC Differential
crashinfo: add "batch" mode and use it during boot
In batch mode, most messages go into the core.txt.N file instead of stdout.
Reviewed by: jhb MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10429
show more ...
|
| #
7f5ddefe
|
| 29-Apr-2016 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Add a savecore_enable variable support for the savecore rc script
By default set to 'YES' so it does not change the current behaviour for users, this variable allows to decide to not extract crach d
Add a savecore_enable variable support for the savecore rc script
By default set to 'YES' so it does not change the current behaviour for users, this variable allows to decide to not extract crach dumps from the dump device at boot time by setting it to "NO" in rc.conf.
Sponsored by: Gandi.net
show more ...
|
| #
6c1a5e83
|
| 23-Apr-2016 |
Lars Engels <lme@FreeBSD.org> |
- Add descriptions to most of the rc scripts. Those are mostly taken from their daemon's manpage and probably improved. - Consistently use "filesystem" not "file system".
Approved by: bapt, brueff
- Add descriptions to most of the rc scripts. Those are mostly taken from their daemon's manpage and probably improved. - Consistently use "filesystem" not "file system".
Approved by: bapt, brueffer Differential Revision: D452
show more ...
|
| #
9e9a57a3
|
| 28-Aug-2013 |
Gavin Atkinson <gavin@FreeBSD.org> |
After writing a kernel core dump into /var/crash, call sync(8).
If we panic again shortly after boot (say, within 30 seconds), any core dump we wrote out may be lost on reboot. In this situation, w
After writing a kernel core dump into /var/crash, call sync(8).
If we panic again shortly after boot (say, within 30 seconds), any core dump we wrote out may be lost on reboot. In this situation, we really want to keep that core file, as it may be the only way to have the issue resolved. Call sync(8) after writing out the core file and running crashinfo(8), in the hope that these will not be lost if we panic again. sync(8) is only called in the case where there is a core dump to be written out, so won't be called during normal boots.
Discovered by: Trying to debug an IPSEC panic MFC after: 1 week
show more ...
|
| #
953bb385
|
| 19-Mar-2013 |
Colin Percival <cperciva@FreeBSD.org> |
Fix typo in previous commit: Exit if */dev/dumpdev* does not exist, not if */bin/realpath* does not exist...
Submitted by: markj Pointy hat to: cperciva
|
| #
510a7a86
|
| 19-Mar-2013 |
Colin Percival <cperciva@FreeBSD.org> |
If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap space configured for rc.d/dumpon to designate for dumping -- then exit silently rather than with a > realpath: /dev/dumpde
If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap space configured for rc.d/dumpon to designate for dumping -- then exit silently rather than with a > realpath: /dev/dumpdev: No such file or directory error message.
An argument could be made that we should print a (more informative) warning message; but given that under the same conditions the rc.d/dumpon script will already print a > No suitable dump device was found warning, it seems that printing an additional > Dump device does not exist. Savecore not run. warning would be superfluous.
show more ...
|
| #
349d039b
|
| 14-Dec-2012 |
Pawel Jakub Dawidek <pjd@FreeBSD.org> |
- When checking if a dump exists on the given device there is no need to provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warnin
- When checking if a dump exists on the given device there is no need to provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warning will be printed about directory given as device.
- Update usage of -C option.
- When clearing dump header from the given device there is also no need to provide dump directory, although additional arguments for -c were not documented.
- Document that -v can be used with -c and that list of devices can be given.
Obtained from: WHEEL Systems
show more ...
|
| #
2822c33f
|
| 19-May-2010 |
Doug Barton <dougb@FreeBSD.org> |
This change does the following for the scripts that run up through FILESYSTEMS (the default early_late_divider): 1. Move sysctl to run first 2. Move as many BEFOREs to REQUIREs as possible. 3. Minor
This change does the following for the scripts that run up through FILESYSTEMS (the default early_late_divider): 1. Move sysctl to run first 2. Move as many BEFOREs to REQUIREs as possible. 3. Minor effect, move hostid_save from right before mdconfig to right after.
A lot of the early scripts make use of sysctl one way or another so running this first makes a lot of sense given that system-critical values are often placed in sysctl.conf.
My original purpose for working on this was that while doing some debugging on other stuff I noticed that the order of execution was different in the first pass through the early scripts and the second. In practice that doesn't matter because the scripts are not executed the second time. However this _can_ result in problems if the difference in the rcorder moves a script from the late section to the early section in the second pass (which would mean the script would not get executed). So, I wanted to make the order of execution of the scripts in the early section more deterministic.
In the course of debugging the ordering problems I noticed that moving the BEFOREs to REQUIREs prevented the changes in order from the first pass to the second pass without having to make any substantial changes. (Of course it's no secret that I think BEFORE should be avoided as much as possible, but this is a good example of why.)
Reviewed by: silence on freebsd-rc@ MFC after: 8.1-RELEASE
show more ...
|
| #
70d4ef1e
|
| 10-Oct-2009 |
Doug Barton <dougb@FreeBSD.org> |
In regards to the "Starting foo:" type messages at boot time, create and employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test:
1. Add check_star
In regards to the "Starting foo:" type messages at boot time, create and employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test:
1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. In the following scripts substitute if/then/fi for the simpler (and more consistent) check_startmsgs &&: faith stf 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency
show more ...
|
| #
a0f01ecb
|
| 29-Aug-2008 |
John Baldwin <jhb@FreeBSD.org> |
Add the ability to run /usr/sbin/crashinfo on a new core dump automatically during boot. Right now this is disabled by default, but it can be enabled by setting 'crashinfo_enable=YES' in rc.conf.
M
Add the ability to run /usr/sbin/crashinfo on a new core dump automatically during boot. Right now this is disabled by default, but it can be enabled by setting 'crashinfo_enable=YES' in rc.conf.
MFC after: 2 weeks
show more ...
|
| #
9300b74c
|
| 06-Jul-2008 |
Mike Makonnen <mtm@FreeBSD.org> |
Remove the $DUMPDIR variable. It's redundant and the rest of the script uses $dumpdir directly.
|
| #
f5629102
|
| 06-Jul-2008 |
Mike Makonnen <mtm@FreeBSD.org> |
Make checking for the availability of core dumps work in the case that $dumpdev is not set to "AUTO".
Reported by: Paul B. Mahol <onemda@gmail.com>
|
| #
27940590
|
| 23-Jun-2008 |
Mike Makonnen <mtm@FreeBSD.org> |
Run savecore(8) only if there is a core dump to save. If there is no core dump hide the message to that effect behind $rc_quiet.
|
| #
94789e5c
|
| 23-Jun-2008 |
Mike Makonnen <mtm@FreeBSD.org> |
Move a lot of diagnostic output behind $rc_quiet in scripts that implement their own start command.
|
| #
e3c46a33
|
| 08-Dec-2007 |
Doug Barton <dougb@FreeBSD.org> |
Remove $NetBSD$ CVS tags. We no longer attempt to synch our rc.d files with theirs, so this information doesn't need to be in the live file. Having it in our CVS history is enough.
|
| #
82a21971
|
| 24-Oct-2004 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
- use `realpath /dev/dumpdev` instead of just /dev/dumpdev so messages will show the real device name - show different error messages for missing dump device and directory
|
| #
e30c35ed
|
| 18-Oct-2004 |
Thomas Quinot <thomas@FreeBSD.org> |
When dumpdev is set to 'auto', and a suitable swap device is found, create a symbolic link /dev/dumpdev designating that device so savecore can find and save a previous kernel dump.
|
| #
337338ee
|
| 07-Oct-2004 |
Mike Makonnen <mtm@FreeBSD.org> |
Remove the requirement for the FreeBSD keyword as it no longer makes any sense.
Discussed with: dougb, brooks MFC after: 3 days
|
| #
450e8255
|
| 18-Mar-2004 |
Chad David <davidc@FreeBSD.org> |
Echo and pass dumpdev as the device argument to savecore.
PR: bin/51655
|