Commit Graph

146 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
db4abd60a3 Don't do an IPv6 operation when the kernel doesn't have
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>
2009-09-30 14:58:10 +00:00
Hiroki Sato
40e0d27fc1 Use RCng coding convention.
MFC after:	3 days
2009-09-12 22:17:52 +00:00
Doug Barton
2b9851690c As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
Mike Makonnen
e2a76fa732 Set the sysctl(8) value in the same shell, not a subshell. This was
causing calls to netoptions_init() to not properly set a global variable,
which ended up being in the parent shell.
2008-06-23 12:06:35 +00:00
Mike Makonnen
8b5adf2fab Do not print anything unless one of the net/routing options is set. 2008-06-23 04:00:45 +00:00
Mike Makonnen
e11cc001a9 Move options that do not have anything to do with routing out of
rc.d/routing and in to rc.d/netoptions. Also instead of saying
"TCP options" say "IP options".
2007-05-02 15:49:30 +00:00
Mike Makonnen
47ba326abe When rc.d/NETWORKING included this script in its REQUIRE line, a circular
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.
2007-05-02 15:32:05 +00:00
Dag-Erling Smørgrav
680aa4e3b8 Apply "additional TCP options" earlier.
Requested by:	andre@
MFC after:	1 week
2007-04-09 10:09:40 +00:00
Mike Makonnen
337338ee00 Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
2004-10-07 13:55:26 +00:00
Pawel Jakub Dawidek
bd57d5b0f5 Mark scripts as not usable inside a jail by adding keyword 'nojail'.
Some suggestions from:	rwatson, Ruben de Groot <mail25@bzerk.org>
2004-03-08 12:25:05 +00:00
Mike Makonnen
41f0e9d32c Rename localdaemons to localpkg.
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
2003-08-06 00:35:13 +00:00
Mike Makonnen
cf6b0ea705 o Repocopied routing and netoptions from network2 and network3, respectively.
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)
2003-06-29 05:09:48 +00:00
Mike Makonnen
575716147b Move securelevel further back in the boot order.
Approved by:	markm (mentor)(implicit)
Reviewed by:	dougb
2003-05-05 15:38:41 +00:00
Jens Schweikhardt
143085107b Fix style bugs:
* 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
2002-10-12 10:31:31 +00:00
Gordon Tetlow
242bd45fb4 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
2002-07-18 05:00:17 +00:00
Dag-Erling Smørgrav
cec161f9e1 Cosmetic changes to the previous commit, bringing it closer to what I
already had in my tree but didn't want to commit.
2002-04-11 22:06:27 +00:00
Peter Wemm
6636027fe4 Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had better
create it.  Also specify protocol v1/v2 in case people wonder why we
generate two RSA keys.
2002-04-10 22:30:54 +00:00
Doug Barton
41cf829909 The good news is that my initial PR was correct... the bad news is that I
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.
2002-04-01 18:33:45 +00:00
Dag-Erling Smørgrav
dde1888c4a Don't try to generate ssh keys if ssh isn't installed. 2002-03-19 03:45:02 +00:00
Crist J. Clark
5b7e37d2b7 IPFilter may need to be re-sync'ed even if we are not filtering, but
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
2002-03-19 01:56:04 +00:00
Doug Barton
4072b4a6a1 Answer the question posed in 1.126. amd won't start without either a
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
2002-03-17 07:35:51 +00:00
Crist J. Clark
7a82d7421f The reload of ipf(8) rules should depend on $ipfilter_enable, not
$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
2002-03-12 20:25:25 +00:00
David E. O'Brien
3cbb824a64 Background the startup of `Amd', it often blocks on startup. 2002-03-12 01:04:35 +00:00
David E. O'Brien
ec6a10cd53 Why shouldn't amd always write its PID to a file?
Since I cannot answer that question, make it.
2002-03-12 01:01:53 +00:00
Dima Dorfman
1998c28f48 Redirect stdout of `ipf -y' to /dev/null. This removes a stray
"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.
2002-03-04 10:30:24 +00:00
Crist J. Clark
29c0f078e2 There is no reason to demand the administrator set 'natd_interface'
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
2002-02-20 10:31:01 +00:00
Crist J. Clark
36a48df48e peter points out that we probably should not mess with the sysctl(8)
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.
2002-02-08 13:25:33 +00:00
Sheldon Hearn
3e38757beb Register amd's dependency on NFS.
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>
2002-01-28 11:05:01 +00:00
Crist J. Clark
f44609fe71 Make the rc.conf(5) 'log_in_vain' knob an integer.
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
2002-01-26 09:05:13 +00:00
Alfred Perlstein
bcb733d069 rpc.lockd needs rpc.statd to be running for it to start up properly.
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
2001-12-13 04:21:18 +00:00
Ruslan Ermilov
d4d2e898a1 s/sysctl -w/sysctl/ 2001-12-11 08:21:46 +00:00
Robert Watson
67b86547da o Update rc.network to reflect the recent change of default in the
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.
2001-12-07 17:03:14 +00:00
Crist J. Clark
68f1d5a354 Protect the '*' in pppoed_provider (the default) from metacharacter
expansion in the rc-scripts.

PR:		32552
Submitted by:	Gleb Smirnoff <glebius@rinet.ru>
Approved by:	ru
Obtained from:	ru
MFC after:	1 day
2001-12-06 09:34:44 +00:00
Dima Dorfman
a48060a2f7 Spelling police: sucessful -> successful. 2001-11-24 23:41:32 +00:00
Darren Reed
c05c122c97 Resolve all the ipfilter startup issues in rc.network with one big patch
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>
2001-11-24 13:48:30 +00:00
Sheldon Hearn
ce76d9c108 Avoid unnecessary calls to expr(1) by using standard shell arithmetic
expansion instead.
2001-11-14 06:35:43 +00:00
Bill Fenner
85c9d676b5 Update the nsswitch.conf -> host.conf generator to handle criteria,
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.
2001-11-07 00:33:56 +00:00
Dag-Erling Smørgrav
bd0a2a3f93 Modify the way host.conf and nsswitch.conf are treated at boot time:
- 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.
2001-11-01 12:39:01 +00:00
Darren Reed
f645349388 Do an ipf -y after bringing up ppp to ensure rules which mention ppp get
matched.  Moification on PR to handle ipnat not being dependant on
ipfilter_enable

PR:	22859
2001-10-20 04:46:32 +00:00
Darren Reed
9645656d2c Allow ipnat_enable to be set to "yes" without requiring ipfiltre_enable to
be set to "yes"

PR:		25223
2001-10-20 04:41:47 +00:00
Darren Reed
639e6db6e7 Put in place for using ipfs use on shutdown and startup.
PR:		27070
2001-10-20 04:33:02 +00:00
Doug Barton
74e07b9e48 Handle the lack of nfs server or client support in the kernel by
kldload'ing the appropriate modules before enabling the service.
2001-10-19 06:50:52 +00:00
John Baldwin
19d1491b60 Remove references to nfsiod and nfs_client_flags now that they are
obsolete.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2001-10-10 20:36:51 +00:00
Brooks Davis
40995998c5 Add a new rc.conf variable, cloned_interfaces, to create cloned
interfaces at boot.
2001-09-19 21:27:27 +00:00
Peter Wemm
06fec2cf89 The vfs.nfs.bufpackets sysctl is in the client, not the server. Move it
to the client section.  Turn off nfsiod, it no longer exists (now just
kthreads).  I need revisit nfsiod so that we have an argument passthrough.
2001-09-19 00:22:26 +00:00
Darren Reed
e58f466620 Merge in patch to automagically decide whether or not a kldload of ipfilter
is required into rc.network.

Person failed to use a real name so both email addresses from PR included
(Sent was different to From).

PR:		22998
Submitted by:	dl@leo.org/spock@empire.trek.org
2001-07-30 23:12:02 +00:00
Mark Murray
e7f2f42f1b Upgraded launchpad for kerberos. Noe kerberos IV OR kerberos 5
may be started at boot for kerberos servers.
2001-07-28 19:57:57 +00:00
Brooks Davis
cdb5d37b3e Create gif devices in the "gifconfig" stage while configuring them.
Reviewed by:	ru, ume
Obtained from:	NetBSD
MFC after:	1 week
2001-07-02 21:08:48 +00:00
Jens Schweikhardt
03f80507e5 Fix misindented esac.
MFC after:	1 week
2001-06-16 15:48:43 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00