summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
Commit message (Collapse)AuthorAgeFilesLines
* 'all' argument for list_net_interfaces() is now unused, remove it.pjd2004-12-051-4/+0
|
* Use "ifconfig -l" instead of "list_network_interfaces all" inrse2004-12-051-1/+1
| | | | | | | | | | | | ifnet_rename() to support situations where rc.conf's $network_interfaces variable is set to an explicit list of network interfaces (instead of the default "auto"). Using "list_network_interfaces all" resulted in using $network_interfaces for both interface _renaming_ and interface _configuration_ which obviously cannot work either before (if the new name is in $network_interfaces) or after (if the old name is in $network_interfaces) renaming the interface.
* fix typo: s/intefraces/interfaces/rse2004-12-051-1/+1
|
* Allow to change interfaces name on boot time.pjd2004-10-301-0/+21
| | | | | | | | | Now, one should be able to put something like this into /etc/rc.conf: ifconfig_fxp0_name="net0" ifconfig_net0="inet 10.0.0.1/16" Reviewed by: green
* Avoid double appearing of cloned interfaces in the outputyar2004-08-281-3/+4
| | | | | | | | | | | | | | | from list_net_interfaces() when network_interfaces=auto. Rationale: Since the auto case is special, the lesser evil had to be chosen among not adding cloned interfaces to _tmplist or removing duplicates from _tmplist after adding cloned interfaces. Since list_net_interfaces() must not use /usr/bin tools, the former "evil" appeared clearer and much more efficient. (See the PR audit trail for discussion.) PR: conf/63700 Reviewed by: brooks MFC after: 5 days
* Fix a typo in a variable name.yar2004-08-271-1/+1
|
* Removed whitespace at BOF, EOL & EOF.schweikh2004-06-061-1/+1
|
* Improve the handling dhcp handling of pccard_ether.mbr2003-08-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are now many configurations which have a NIC on board, and pccard slots. If a dhclient is running on the internal nic, the Improve the handling dhcp handling of pccard_ether. Improve the dhcp handling of pccard_ether. There are now many configurations which have a NIC on board and Improve the dhcp handling of pccard_ether. There are now many configurations which have a NIC on board and cardbus slots too. If a dhclient was already running on the internal NIC, the user was forced to kill a running dhclient manually. If now a pccard is included at startup time, /etc/rc.d/dhclient start does include it into the startup list for dhcp devices. That means you can now do dhcp on the internal and the pccard devices at the same time. If the card is plugged in later, a running dhclient (working for the internal interface only) is killed, and restarted, but the interface name of the new pccard is added to the internal name. After removal, /etc/rc.d/dhclient is started again. This script does nothing if there are no devices in /etc/rc.conf This is only a workaround for a well known problem. After we have a dhcp client which handles device adding and removal, it will go away.
* add rtsol_flags.ume2003-08-081-1/+1
| | | | MFC after: 1 week
* Check by [ $? -eq 0 ] rather than $?.kuriyama2003-06-241-2/+2
| | | | Reviewed by: mtm
* o Fix a typomtm2003-06-091-3/+23
| | | | | | o Fill in the ipx_down() routine. Submitted by: ceri
* - Remove a debugging echo.mtm2003-06-081-1/+3
| | | | | - When we change the IFS make sure to return it to its previous value before executing a command.
* Implement *_down network routines for ifconfig'ed interfaces, clonedmtm2003-06-081-0/+75
| | | | | | interfaces, interface aliases, user supplied ifconfig scripts, and ipx interfaces. The ipx routine fails unconditionaly at the moment. Someone who has a need for it can fill it in with the appropriate incantations.
* pccard_ether didn't setup IPv6 after rcTOS sweep.ume2003-05-121-0/+296
| | | | | Reviewed by: mtm and dougb Approved by: re (scott)
* Break out and rewrite the network setup scripts.mtm2003-04-181-171/+159
| | | | | | | | | | | | | | o /etc/network.subr contains common subroutines used for seting up network interfaces o rc.d/hostname sets the hostname if not already set o rc.d/nisdomain sets the nis domain *after* rpcbind but before the yp* daemons. This fixes issues with temporary hangs when looking up informaion in nis before it's ready. o rc.d/netif brings network interfaces (minus dhcp) up. o rc.d/network1 has been disabled and will be retired before RELENG_5. It will be replaced by rc.d/netif Approved by: markm (mentor)
* Back out 1.143 and 1.144. They are no longer needed now that we startimp2003-02-121-6/+0
| | | | | | devd later in the boot process. This should fix all the problems people have had with those commits. Diskless should be working again, and those that mount /usr with nfs should be able to do that again too.
* o Don't consider LOOPBACK devices as configured...imp2002-12-131-1/+2
|
* o redirect the grep to /dev/nullimp2002-12-121-0/+5
| | | | | | | o use ifn rather than interface in rc.network o merge into rc.d/network1 Approved by: (re blanket)
* Fix style bugs:schweikh2002-10-121-40/+40
| | | | | | | | | | * 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
* up gif during setup.ume2002-09-201-0/+1
|
* Correct commentgordon2002-08-091-1/+1
| | | | Submitted by: Mike Makonnen <makonnen@pacbell.net>
* Remove spurious "echo '.'".dd2002-07-181-2/+0
|
* Make nisdomainname=NO DTRTdougb2002-07-181-2/+6
| | | | Submitted by: des, via Mike Makonnen <makonnen@pacbell.net>
* Cleanup some pollution from the NetBSD sync, and add gif setup.dougb2002-07-181-144/+29
| | | | Submitted by: Mike Makonnen <makonnen@pacbell.net>
* Fix a typo that caused dhclient not to work.gordon2002-07-181-2/+2
| | | | | Submitted by: Dennis Kristensen <snicki@snicki.dk> Reviewed by: Mike Makonnen <makonnen@pacbell.net>
* Merge in all the changes that Mike Makonnen has been maintaining for agordon2002-07-181-827/+196
| | | | | | | | 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
* Cosmetic changes to the previous commit, bringing it closer to what Ides2002-04-111-7/+7
| | | | already had in my tree but didn't want to commit.
* Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had betterpeter2002-04-101-4/+9
| | | | | create it. Also specify protocol v1/v2 in case people wonder why we generate two RSA keys.
* The good news is that my initial PR was correct... the bad news is that Idougb2002-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.
* Don't try to generate ssh keys if ssh isn't installed.des2002-03-191-7/+11
|
* IPFilter may need to be re-sync'ed even if we are not filtering, butcjc2002-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
* Answer the question posed in 1.126. amd won't start without either adougb2002-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
* The reload of ipf(8) rules should depend on $ipfilter_enable, notcjc2002-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
* Background the startup of `Amd', it often blocks on startup.obrien2002-03-121-2/+2
|
* Why shouldn't amd always write its PID to a file?obrien2002-03-121-6/+2
| | | | Since I cannot answer that question, make it.
* Redirect stdout of `ipf -y' to /dev/null. This removes a straydd2002-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.
* There is no reason to demand the administrator set 'natd_interface'cjc2002-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
* peter points out that we probably should not mess with the sysctl(8)cjc2002-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.
* Register amd's dependency on NFS.sheldonh2002-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>
* Make the rc.conf(5) 'log_in_vain' knob an integer.cjc2002-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
* rpc.lockd needs rpc.statd to be running for it to start up properly.alfred2001-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
* s/sysctl -w/sysctl/ru2001-12-111-19/+19
|
* o Update rc.network to reflect the recent change of default in therwatson2001-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.
* Protect the '*' in pppoed_provider (the default) from metacharactercjc2001-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
* Spelling police: sucessful -> successful.dd2001-11-241-1/+1
|
* Resolve all the ipfilter startup issues in rc.network with one big patchdarrenr2001-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>
* Avoid unnecessary calls to expr(1) by using standard shell arithmeticsheldonh2001-11-141-1/+1
| | | | expansion instead.
* Update the nsswitch.conf -> host.conf generator to handle criteria,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.
* Modify the way host.conf and nsswitch.conf are treated at boot time:des2001-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.
* Do an ipf -y after bringing up ppp to ensure rules which mention ppp getdarrenr2001-10-201-0/+14
| | | | | | | matched. Moification on PR to handle ipnat not being dependant on ipfilter_enable PR: 22859
OpenPOWER on IntegriCloud