Age | Commit message (Collapse) | Author |
|
script) did 'ifconfig <if> down' before starting dhclient(8). This was
a way of ensuring old running copies of dhclient were killed before a
new one started. Current dhclient does not need this assist, so change
"ifconfig <if> down" to "ifconfig <if> up" pending further script
optimizations.
Similar to a 2014 attempt by halex@. Prompted by a misc@ report
from Kristjan Komlosi reporting hanging diskless setups.
ok halex@ kn@
|
|
Show proper error message if a regular user executes netstart.
Only do the privilege check if the id binary is available,
which might not be the case during diskless system startup.
ok deraadt, jasper, jca, krw, rpe (who wrote the same diff), sthen
|
|
Suggested by and OK jmc.
OK tb
|
|
displaying usage();
ok tb
|
|
From jmc@, ok tb@
|
|
OK tb
|
|
OK tb
|
|
to skip backup or temp files.
- test if the patterns matched actual files
- warn if ifcreate() fails on an interface and continue with the
subsequent interfaces in the list instead of return'ing
OK dlg sthen tb
|
|
- In ifcreate() use the exit code of the {} block directly
- In vifscreate(), use the ifconfig -C output directly in the for _vif loop
- Remove superfluous and somewhat confusing comment
OK dlg kn sthen
|
|
this resolves an ordering problem when adding pseudo interfaces to bridges
tweaks from kn@
ok mpi@ sthen@
|
|
by the ::0.0.0.0/96 reject route added to deny all IPv4 mapped addresses.
Makes the inet6 routing table almost fit in one screen.
OK benno@
|
|
Add soii.key to changelist (pointed out by semarie) and mtree/special
(suggest by Craig Skinner).
OK naddy, sthen, rpe, tb
|
|
route(s). Simply print the command(s) to be issued instead.
tweak & ok rpe
|
|
currently serves no purpose.
ok rpe, agreement from deraadt and halex
|
|
in hostname.if(5)
OK mpi@ deraadt@ florian@
OK jmc@ from doc perspective
|
|
- in netstart, rename _file to _hn referencing hostname.if files
- in install.sub switch ifstart() to be used with _if instead of
_hn as parameter
ok krw@ tb@
|
|
OK jung@, deraadt@, jmc@
|
|
OK tb@, krw@ (for [[]])
Feedback and OK halex@
|
|
OK tb@ halex@
|
|
The id binary is not available in nfs diskless setups at this point.
reported by Andreas Kusalananda, thanks.
discussed with deraadt@
|
|
done in ifstart(). Remove ipv6autoconf() and replace rtsolif with a boolean
variable V6_AUTOCONF. Replace dhcpif with a boolean variable V4_DHCPCONF.
Both are later used in defaultroute() to decide whether or not to configre
defaultroutes from /etc/mygate.
OK krw@
|
|
Now that route are automatically G/C with the address they are attached
to there's no reason to duplicate the kernel's job.
Fix a regression introduced with multipath default routes.
ok deraadt@
|
|
or carp. Ensure that the noglob option is disabled at the end of
parse_hn_line() and ifstart().
Reported by Christer Solskogen and Stefan Wollny, thanks!
|
|
hostname.if(5) parsing code in ifstart().
Add a -n option to netstart to only print the interface configuration
commands instead of executing them.
Add a HN_DIR variable, that points to the directory of the hostname.if
files (default /etc) that allows for future regression tests.
- add new parse_hn_line() function
- change ifstart()
- rename $if to $_if
- don't ifconfig or ifconfig create if -n option is used
- replace hostname.if(5) parsing code with new parse_hn_line()
- just print configuration commands if -n option is used
- autoconf now happens in ifstart(), remove ifv6autoconf()
- introduce HN_DIR variable for the hostname.if file location
- add handling of the -n option to only print config commands
- ensure -n is only used if interfaces are specified as parameters
Discussed with and positive feedback from many
'commit' deraadt@
OK sthen@
|
|
variables are not named like commands.
- change test from [] to [[]]
OK tb@ halex@
|
|
install.sub which makes it easier to spot changes in the future.
- comments and formatting
- quotes on assignments are not needed (netstart)
- remove stray space in test (netstart)
- use $file variable with while-loop (netstart)
- although valid, instead of i use $i in arithmetic test (install.sub)
OK krw@, tb@
Looks good deraadt@
|
|
|
|
|
|
the interface pointed to by the default route.
Since the kernel no longer keep routes with dangling address pointer,
netstart(8) has to re-add the default route when the corresponding ifa
has been deleted and re-created.
deraadt@ points out that even if the previous semantic was not necessarily
better, a script like netstart(8) cannot totally fix the default route
problem.
Regression reported by and fix tested by Hrvoje Popovski.
ksh foo checked by halex@
|
|
like vether(4).
nits from and ok benno@, phessler@
|
|
through and try whatever it can do with the invoking user's perms
feedback/ok aja@ rpe@
|
|
pseudo-interfaces.
This unbreak vlan(4) on top of tap(4) since the refactoring to turn it
MP-safe.
ok claudio@, deraadt@
|
|
a -reject route can be added. Restores the ability to set an interface route
before daemons are started, lost during the previous simplification.
ok millert mpi
|
|
OK halex@
|
|
OK halex@
|
|
prodded by tim@, ok mpi@
|
|
towards other YES|NO options and drop the error warning.
with and ok tim@, ok rpe@ on an earlier diff
|
|
default one is good enough.
So merge rc.conf(8)'s 'multicast_router' and 'multicast_host' into a
single 'multicast'. If set to YES the reject route for 224/4 is not
inserted by netstart(8).
Manual bits from jmc@
ok henning@, ajacoutot@
|
|
- Rename function to ifv6autoconf() to make IPv6 relation clearer
- Localize and rename variables
OK krw@
|
|
- Change comments to make it clearer that ifmstart() takes two lists
of interface driver names (of which the second is optional) and not
the actual interface instances.
- Use localized variables and use slightly more verbose names.
- Use continue 2 to skip to the next hostname.if file.
- Use shell pattern @() instead of testing _sif individually.
OK krw@
|
|
- Align comments with /etc/rc version
- Use localized variables
- Use safer "print -r --" instead of plain echo
Changes to ifstart():
- Tweak comment
- Add usage
OK krw@
|
|
General changes:
- apply a similar 'style' as used in the installer scripts
- improve comments to be more to the point, remove where code is obvious
- document usage of functions if they have arguments
- rename variables where it improves readability
- replace really old-school shell code with more contemporary idioms
Other changes:
- No need to care about "autoboot" because netstart doesn't inherit the
positional parameters from /etc/rc anymore. /etc/rc executes netstart
instead of sourcing it since r1.439.
- Use simpler for-loop to process list of interfaces with ifstart.
OK halex@
|
|
stripcom() output directly with the hostname command.
OK deraadt@ krw@
|
|
|
|
ok florian@ rpe@
|
|
feedback/ok rpe
|
|
hostname.if, previously netstart tried to configure them all at once
("ifconfig if0 if1 if2 inet6 autoconf"). From Delan Azabani, ok phessler@
|
|
able to use ksh syntax within these scripts. This way init doesn't
need to be changed, which starts /etc/rc using /bin/sh and people
can still use "sh /etc/netstart ifname".
Idea from and OK halex@
OK deraadt@ krw@ guenther@
|
|
any of the other interfaces.
OK deraadt, phessler, benno
|
|
to get the network related vars from rc.conf. This is even necessary
if netstart is run from within /etc/rc. Remove test of $INRC which
unintentionally evaluated always to true.
problem with previous change found by nigel@
OK sthen@ aja@ halex@
|