aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d/netoptions
Commit message (Collapse)AuthorAgeFilesLines
* Move rc startup scripts from etc/ to sbin/init/Brad Davis2018-07-281-126/+0
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=336845
* - Add descriptions to most of the rc scripts. Those are mostly taken from theirLars Engels2016-04-231-0/+1
| | | | | | | | | | | daemon's manpage and probably improved. - Consistently use "filesystem" not "file system". Approved by: bapt, brueffer Differential Revision: D452 Notes: svn path=/head/; revision=298514
* Add $ipv6_cpe_wanif to enable functionality required for IPv6 CPEHiroki Sato2011-09-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (r225485). When setting an interface name to it, the following configurations will be enabled: 1. "no_radr" is set to all IPv6 interfaces automatically. 2. "-no_radr accept_rtadv" will be set only for $ipv6_cpe_wanif. This is done just before evaluating $ifconfig_IF_ipv6 in the rc.d scripts (this means you can manually supersede this configuration if necessary). 3. The node will add RA-sending routers to the default router list even if net.inet6.ip6.forwarding=1. This mode is added to conform to RFC 6204 (a router which connects the end-user network to a service provider network). To enable packet forwarding, you still need to set ipv6_gateway_enable=YES. Note that accepting router entries into the default router list when packet forwarding capability and a routing daemon are enabled can result in messing up the routing table. To minimize such unexpected behaviors, "no_radr" is set on all interfaces but $ipv6_cpe_wanif. Approved by: re (bz) Notes: svn path=/head/; revision=225521
* Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.Ed Maste2011-03-301-16/+16
| | | | | | | | | This is a further clean up after r202988. SYSCTL_W is still initialized in rc.subr as some ports may still use it. Notes: svn path=/head/; revision=220153
* Add $ipv6_privacy to support net.inet6.ip6.use_tempaddr. Note that thisHiroki Sato2010-09-131-0/+7
| | | | | | | | | will be replaced with a per-IF version later. Based on: changes in r206408 by dougb Notes: svn path=/head/; revision=212576
* Revert changes in r206408.Hiroki Sato2010-09-131-7/+0
| | | | | | | Discussed with: dougb, core.5, and core.6 Notes: svn path=/head/; revision=212574
* Improve the handling of IPv6 configuration in rc.d. The ipv6_enableDoug Barton2010-04-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and ipv6_ifconfig_<interface> options have already been deprecated, these changes do not alter that. With these changes any value set for ipv6_enable will emit a warning. In order to avoid a POLA violation for the deprecation of the option ipv6_enable=NO will still disable configuration for all interfaces other than lo0. ipv6_enable=YES will not have any effect, but will emit an additional warning. Support and warnings for this option will be removed in FreeBSD 10.x. Consistent with the current code, in order for IPv6 to be configured on an interface (other than lo0) an ifconfig_<interface>_ipv6 option will have to be added to /etc/rc.conf[.local]. 1. Clean up and minor optimizations for the following functions: ifconfig_up (the ipv6 elements) ipv6if ipv6_autoconfif get_if_var _ifconfig_getargs The cleanups generally were to move the "easy" tests earlier in the functions, and consolidate duplicate code. 2. Stop overloading ipv6_prefer with the ability to disable IPv6 configuration. 3. Remove noafif() which was only ever called from ipv6_autoconfif. Instead, simplify and integrate the tests into that function, and convert the test to use is_wired_interface() instead of listing wireless interfaces explicitly. 4. Integrate backwards compatibility for ipv6_ifconfig_<interface> into _ifconfig_getargs. This dramatically simplifies the code in all of the callers, and avoids a lot of other code duplication. 5. In rc.d/netoptions, add code for an ipv6_privacy option to use RFC 4193 style pseudo-random addresses (this is what windows does by default, FYI). 6. Add support for the [NO]RTADV options in ifconfig_getargs() and ipv6_autoconfif(). In the latter, include support for the explicit addition of [-]accept_rtadv in ifconfig_<interface>_ipv6 as is done in the current code. 7. In rc.d/netif add a warning if $ipv6_enable is set, and remove the set_rcvar_obsolete for it. Also remove the latter from rc.d/ip6addrctl. 8. In /etc/defaults/rc.conf: Add an example for RTADV configuration. Set ipv6_network_interfaces to AUTO. Switch ipv6_prefer to YES. If ipv6_enable is not set this will have no effect. Add a default for ipv6_privacy (NO). 9. Document all of this in rc.conf.5. Notes: svn path=/head/; revision=206408
* Use double-quotation marks to fix the unexpanded variable issue.Hiroki Sato2009-10-231-3/+3
| | | | | | | Spotted by: swell.k Notes: svn path=/head/; revision=198383
* The net.inet.tcp.log_in_vain accepts 0, 1 or 2, not Y/N.Hiroki Sato2009-10-021-5/+8
| | | | Notes: svn path=/head/; revision=197702
* - Fix logic inversion bug of net.inet.tcp.rfc1323[*].Hiroki Sato2009-10-021-15/+34
| | | | | | | | | | | | | - Split netoptions_start() to netoptions_AF() and add afexists() check for each address family. - Display a message only if the user sets a non-default value, and set a sysctl explicitly even if it is the default value. Spotted by: Pegasus Mc Cleaft[*] Notes: svn path=/head/; revision=197698
* Don't do an IPv6 operation when the kernel doesn't haveHajimu UMEMOTO2009-09-301-5/+8
| | | | | | | | | | | an IPv6 support. Reported by: Alexander Best <alexbestms__at__math.uni-muenster.de> Confirmed by: Paul B. Mahol <onemda__at__gmail.com>, Alexander Best <alexbestms__at__math.uni-muenster.de> Notes: svn path=/head/; revision=197646
* Use RCng coding convention.Hiroki Sato2009-09-121-64/+52
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=197143
* As previously discussed, add the svn:executable property to all scriptsDoug Barton2008-07-161-0/+0
| | | | Notes: svn path=/head/; revision=180563
* Set the sysctl(8) value in the same shell, not a subshell. This wasMike Makonnen2008-06-231-2/+2
| | | | | | | | causing calls to netoptions_init() to not properly set a global variable, which ended up being in the parent shell. Notes: svn path=/head/; revision=179951
* Do not print anything unless one of the net/routing options is set.Mike Makonnen2008-06-231-2/+17
| | | | Notes: svn path=/head/; revision=179940
* Move options that do not have anything to do with routing out ofMike Makonnen2007-05-021-1/+43
| | | | | | | | rc.d/routing and in to rc.d/netoptions. Also instead of saying "TCP options" say "IP options". Notes: svn path=/head/; revision=169217
* When rc.d/NETWORKING included this script in its REQUIRE line, a circularMike Makonnen2007-05-021-1/+1
| | | | | | | | | | | dependency was introduced because this script had rc.d/localpkg (which is *after* rc.d/NETWORKING) in its REQUIRE line. From an examination of its contents it seems that only the availability of a local filesystem is necessary for this script to function properly. Notes: svn path=/head/; revision=169215
* Apply "additional TCP options" earlier.Dag-Erling Smørgrav2007-04-091-1/+0
| | | | | | | | Requested by: andre@ MFC after: 1 week Notes: svn path=/head/; revision=168532
* Remove the requirement for the FreeBSD keyword as it no longerMike Makonnen2004-10-071-1/+1
| | | | | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days Notes: svn path=/head/; revision=136224
* Mark scripts as not usable inside a jail by adding keyword 'nojail'.Pawel Jakub Dawidek2004-03-081-1/+1
| | | | | | | Some suggestions from: rwatson, Ruben de Groot <mail25@bzerk.org> Notes: svn path=/head/; revision=126744
* Rename localdaemons to localpkg.Mike Makonnen2003-08-061-1/+1
| | | | | | | | | | | | | | | | The original name was really a mistake since /usr/local/etc/rc.d scripts can (and usually do) start more than just daemons. Even the output in the script uses 'local packages.' Also, the term 'local daemons' is used by rc.d/local, which was etc/rc.local of rcOG fame. No repo-copy because there isn't much history to save. I will remove localdaemons shortly with all the other files that don't belong in rc.d anymore. Discussed with: dougb, freebsd-rc@yahoogroups.com Notes: svn path=/head/; revision=118515
* o Repocopied routing and netoptions from network2 and network3, respectively.Mike Makonnen2003-06-291-1/+1
| | | | | | | | | | | o Change the provider names. o Separate routing into two parts: static routing and routing options. The start command will run both parts, but they can be run separately using the static and options command, respectively: (/etc/rc.d/routing static; /etc/rc.d/routing options) Notes: svn path=/head/; revision=117019
* Move securelevel further back in the boot order.Mike Makonnen2003-05-051-0/+1
| | | | | | | | Approved by: markm (mentor)(implicit) Reviewed by: dougb Notes: svn path=/head/; revision=114735
* Fix style bugs:Jens Schweikhardt2002-10-121-3/+3
| | | | | | | | | | | | | * Space -> tabs conversion. * Removed blanks before semicolon in "if ... ; then". * Proper indentation of misindented lines. * Put a full stop after some comments. * Removed whitespace at end of line. Approved by: silence from gordon Notes: svn path=/head/; revision=104980
* Merge in all the changes that Mike Makonnen has been maintaining for aGordon Tetlow2002-07-181-965/+31
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=100280
* Cosmetic changes to the previous commit, bringing it closer to what IDag-Erling Smørgrav2002-04-111-7/+7
| | | | | | | already had in my tree but didn't want to commit. Notes: svn path=/head/; revision=94465
* Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had betterPeter Wemm2002-04-101-4/+9
| | | | | | | | create it. Also specify protocol v1/v2 in case people wonder why we generate two RSA keys. Notes: svn path=/head/; revision=94391
* The good news is that my initial PR was correct... the bad news is that IDoug Barton2002-04-011-1/+5
| | | | | | | | | | | | was apparently smoking something when I committed the last fix, because as ume was kindly enough to set me straight on, amd *will* start with no arguments at all, as long as there is an /etc/amd.conf file for it to read. What it won't do is start with *just* -p. In any case, now it's fixed. Notes: svn path=/head/; revision=93566
* Don't try to generate ssh keys if ssh isn't installed.Dag-Erling Smørgrav2002-03-191-7/+11
| | | | Notes: svn path=/head/; revision=92638
* IPFilter may need to be re-sync'ed even if we are not filtering, butCrist J. Clark2002-03-191-1/+3
| | | | | | | | | | | only doing ipnat(8). Go back to using $ipfilter_active, but turn off $ipfilter_active when loading ipl.ko has failed. Submitted by: devet@devet.org (Arjan de Vet) MFC after: 3 days Notes: svn path=/head/; revision=92628
* Answer the question posed in 1.126. amd won't start without either aDoug Barton2002-03-171-2/+11
| | | | | | | | | | | conf file, or command line options. I brought this up in PR 12432, which (ironically) obrien assigned to me after I became a committer. :) PR: conf/12432 Submitted by: Me Notes: svn path=/head/; revision=92478
* The reload of ipf(8) rules should depend on $ipfilter_enable, notCrist J. Clark2002-03-121-2/+1
| | | | | | | | | | $ipfilter_active. $ipfilter_enable is set to "NO" if modules fail to load, and $ipfilter_active can be "YES" when we are not using ipf(8). MFC after: 3 days Notes: svn path=/head/; revision=92184
* Background the startup of `Amd', it often blocks on startup.David E. O'Brien2002-03-121-2/+2
| | | | Notes: svn path=/head/; revision=92127
* Why shouldn't amd always write its PID to a file?David E. O'Brien2002-03-121-6/+2
| | | | | | | Since I cannot answer that question, make it. Notes: svn path=/head/; revision=92126
* Redirect stdout of `ipf -y' to /dev/null. This removes a strayDima Dorfman2002-03-041-1/+1
| | | | | | | | "filter sync'd" in the middle of the boot output if IPFilter is enabled, but does not hide any potential errors, which go to stderr. Notes: svn path=/head/; revision=91626
* There is no reason to demand the administrator set 'natd_interface'Crist J. Clark2002-02-201-5/+4
| | | | | | | | | | | | | | | | when running natd(8) out of the rc-files. It is perfectly valid for the interface or alias address to be set in a natd(8) configuration file, not on the command line. Also, loosen up the restrictions on identifying an IP address argument in 'natd_interface.' Fix the documentation, rc.conf(5), to reflect this change. Take the bogus default for 'natd_interface' out of /etc/defaults/rc.conf. MFC after: 3 days Notes: svn path=/head/; revision=90957
* peter points out that we probably should not mess with the sysctl(8)Crist J. Clark2002-02-081-4/+5
| | | | | | | | | | | | values at all if they are not purposefully set. What if the administrator messed with them in /etc/sysctl.conf? We don't want to overwrite them. If 'log_in_vain' is zero, do not force the issue. If it is non-zero, set it. Notes: svn path=/head/; revision=90403
* Register amd's dependency on NFS.Sheldon Hearn2002-01-281-36/+51
| | | | | | | | | | | This change was submitted to the freebsd-audit mailing list for review but received no feedback. Hindsight-enabled reviews are welcome. PR: conf/31358 Submitted: Thomas Quinot <thomas@cuivre.fr.eu.org> Notes: svn path=/head/; revision=89911
* Make the rc.conf(5) 'log_in_vain' knob an integer.Crist J. Clark2002-01-261-3/+12
| | | | | | | | | | | | | Try this out in -CURRENT, MFC, and then consider dropping the 'log_in_vain' knob all together. It really is something for sysctl.conf(5). PR: bin/32953 Reviewed by: -bugs discussion MFC after: 1 week Notes: svn path=/head/; revision=89808
* rpc.lockd needs rpc.statd to be running for it to start up properly.Alfred Perlstein2001-12-131-4/+15
| | | | | | | | | | | | so swap the order. Also allow rpc.lockd and rpc.statd to be turned on if nfsclient is enabled. They are needed to provide client side locking support. PR: conf/27811 Notes: svn path=/head/; revision=87781
* s/sysctl -w/sysctl/Ruslan Ermilov2001-12-111-19/+19
| | | | Notes: svn path=/head/; revision=87646
* o Update rc.network to reflect the recent change of default in theRobert Watson2001-12-071-3/+3
| | | | | | | | | | | | | | kernel TCP timer code: rather than checking for tcp_keepalive being set to "YES", check for "NO" and turn off keepalives if the variable is set in that manner. o Note: eventually, it would make sense to remove this variable from rc.conf management, and instead rely on sysctl.conf. In fact, this is probably true of a number of rc.conf variables whose sole aim is to drive the setting of sysctls at boot time. Notes: svn path=/head/; revision=87500
* Protect the '*' in pppoed_provider (the default) from metacharacterCrist J. Clark2001-12-061-0/+2
| | | | | | | | | | | | | expansion in the rc-scripts. PR: 32552 Submitted by: Gleb Smirnoff <glebius@rinet.ru> Approved by: ru Obtained from: ru MFC after: 1 day Notes: svn path=/head/; revision=87443
* Spelling police: sucessful -> successful.Dima Dorfman2001-11-241-1/+1
| | | | Notes: svn path=/head/; revision=86882
* Resolve all the ipfilter startup issues in rc.network with one big patchDarren Reed2001-11-241-59/+71
| | | | | | | | | | | | to get it all right, allowing ipnat to be enabled independantly of ipfilter in rc.conf (among other things). PR: multiple Submitted by: Arjan de Vet <devet@devet.org> Reviewed by: Giorgos Keramidas <keramida@FreeBSD.org> Notes: svn path=/head/; revision=86851
* Avoid unnecessary calls to expr(1) by using standard shell arithmeticSheldon Hearn2001-11-141-1/+1
| | | | | | | expansion instead. Notes: svn path=/head/; revision=86342
* Update the nsswitch.conf -> host.conf generator to handle criteria,Bill Fenner2001-11-071-10/+16
| | | | | | | | | | | continuation lines, extra whitespace, and to use the last matching line in the file. This syncs the host.conf generation with how the nsswitch.conf is parsed. Only print " host.conf" instead of a multi-line message, since this happens on every boot. Notes: svn path=/head/; revision=86163
* Modify the way host.conf and nsswitch.conf are treated at boot time:Dag-Erling Smørgrav2001-11-011-7/+34
| | | | | | | | | | | - if nsswitch.conf exists, host.conf is auto-generated for compatibility with legacy applications and libraries. - if host.conf exists but nsswitch.conf does not, nsswitch.conf is auto- generated as usual. Notes: svn path=/head/; revision=85831
* Do an ipf -y after bringing up ppp to ensure rules which mention ppp getDarren Reed2001-10-201-0/+14
| | | | | | | | | | matched. Moification on PR to handle ipnat not being dependant on ipfilter_enable PR: 22859 Notes: svn path=/head/; revision=85222
* Allow ipnat_enable to be set to "yes" without requiring ipfiltre_enable toDarren Reed2001-10-201-11/+16
| | | | | | | | | be set to "yes" PR: 25223 Notes: svn path=/head/; revision=85221