History log of /freebsd-10.1-release/etc/rc.d/sysctl
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 261153 25-Jan-2014 demon

Merge r260987:

Do not exit with non-zero return code if sysctl.conf or sysctl.conf.local files
are absent.

Approved by: delphij


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 248620 22-Mar-2013 jilles

rc.d/sysctl: Fix error messages about unknown OIDs.

There are three situations where the sysctl script is called:
1. "start", very early
2. "lastload", near the end of rc
3. "reload", at admin request while the system is booted

Ignore unknown OIDs in situation 1 because kernel modules may not be loaded
yet and complain about them in situations 2 and 3.

PR: conf/174595
Submitted by: Olivier Smedts


# 244198 13-Dec-2012 delphij

Teach sysctl(8) about parsing a file (while I'm there also give it
capability of parsing both = and : formats).

Submitted by: hrs (initial version, bugs are mine)
MFC after: 3 months


# 208307 19-May-2010 dougb

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


# 197139 12-Sep-2009 hrs

Integrate rc.d/network_ipv6 into rc.d/netif:

- Add rc.d/stf and rc.d/faith for stf(4) and faith(4).
- Remove rc.d/auto_linklocal and rc.d/network_ipv6.
- Move rc.d/sysctl to just before FILESYSTEMS because rc.d/netif
depends on some sysctl variables.

Reviewed by: brooks
MFC after: 3 days


# 181071 31-Jul-2008 jhb

Oops, restore the recent changes to make startup messages quieter.


# 181070 31-Jul-2008 jhb

Parse sysctl settings from /etc/sysctl.conf.local after /etc/sysctl.conf
if it exists. This mirrors similar behavior for /boot/loader.conf and
/etc/rc.conf.

Obtained from: Yahoo!
MFC after: 1 week


# 180563 16-Jul-2008 dougb

As previously discussed, add the svn:executable property to all scripts


# 179965 23-Jun-2008 mtm

The sysctl(8) program exits on some errors and only emits warnings on
others. In the case where it displayed warnings it would still return
succesfully. Modify it so that it returns the number of sysctls that
it was not able to set.

Make use of this in rc.d to display only *unsuccessfull* attempts to
set sysctls.


# 174438 08-Dec-2007 dougb

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.


# 158876 24-May-2006 glebius

Quote the parameter to sysctl(1), allowing to use whitespaces in
sysctl values.

PR: conf/96509
Submitted by: Gregory Bond <gnb itga.com.au>


# 136224 07-Oct-2004 mtm

Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days


# 124625 17-Jan-2004 mtm

o Rename the start command to conform to rc.d style.
o Move the additional commands list to the end of the
variable initialization to conform to rc.d style


# 124622 17-Jan-2004 mtm

Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, remove
NetBSD specific stuff (which made our scripts more complicated
than necessary).

The NetBSD ident string will be left intact, both for history and
also incase we wish to pull in future versions.


# 124616 17-Jan-2004 mtm

Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, begin removal
of NetBSD specific stuff (which made our scripts more complicated
than necessary), starting with the NetBSD KEYWORD.


# 113959 24-Apr-2003 mtm

Make ipfilter, ipnat, ipmon, and ipfs behave more like the old rc.
o group them together so they run one right after another
o use the NetBSD supplied ipfs script instead of tacking
it on to the end of ipnat
o Load the ipl module in ipnat and ipfilter, if it's not already
loaded
o In ipmon and ipnat show a warning if neither ipfilter nor
ipnat is enabled or the ipl module is not loaded, and exit

Approved by: markm (mentor) (implicit)
Tested by: leafy <leafy@leafy.idv.tw>


# 105968 25-Oct-2002 fenner

Fix two typos. Using "-eq" instead of "=" in a [ caused an error when
an entry in /etc/sysctl.conf didn't exist. Fixing this exposed a minor
typo "exits" vs. "exist".

However, there doesn't appear to be any provision to run this with
the "lastload" argument, meaning that the error will never appear.


# 103019 06-Sep-2002 gordon

Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation on
OS-dependent case switches.


# 100280 18-Jul-2002 gordon

Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by: Mike Makonnen <makonnen@pacbell.net>
Reviewed by: silence on -current and -hackers
Prodded by: rwatson


# 92516 17-Mar-2002 dougb

Distinguish between first and last passes of rc.sysctl, and only set
mibs whose values are not already what is specified in sysctl.conf.


# 79839 17-Jul-2001 jhb

sysctl(8) doesn't need '-w' to write to sysctl variables anymore.


# 66830 08-Oct-2000 obrien

Add copyright notices. Other systems have been barrowing our /etc files
w/o giving any credit.


# 64446 09-Aug-2000 chris

Use shell matching instead of sed(1) to strip comments and blank lines.
Since it doesn't depend on anything in /usr, it should work with a NFS-mounted
/usr partition.

Thanks to Bruce Evans to bringing this to my attention.


# 56118 16-Jan-2000 chris

Add and document support for handling comments and blank lines
in /etc/sysctl.conf.

Reviewed by: imp, jkh


# 50472 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 50357 25-Aug-1999 sheldonh

Style clean-up:

* All variables are now embraced: ${foo}

* All comparisons against some value now take the form:
[ "${foo}" ? "value" ]
where ? is a comparison operator

* All empty string tests now take the form:
[ -z "${foo}" ]

* All non-empty string tests now take the form:
[ -n "${foo}" ]

Submitted by: jkh


# 45096 28-Mar-1999 imp

Add two features:
log_in_vain:
log_in_vain turns on logging for packets to ports for which
there is no listener.
rc.sysctl:
A generic way to set sysctl values. It reads /etc/syslog.conf
and sets values based on that. No /etc/syslog.conf has been
checked in yet, and I've not added this to the makefile yet
until I get more feedback.

Reviewed by: -current, -hackers and bde especially