Deleted Added
full compact
network.subr (67012) network.subr (70108)
1#!/bin/sh -
2#
3# Copyright (c) 1993 The FreeBSD Project
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1#!/bin/sh -
2#
3# Copyright (c) 1993 The FreeBSD Project
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/etc/network.subr 67012 2000-10-12 11:25:57Z ru $
27# $FreeBSD: head/etc/network.subr 70108 2000-12-17 08:16:06Z dougb $
28# From: @(#)netstart 5.9 (Berkeley) 3/30/91
29#
30
31# Note that almost all of the user-configurable behavior is no longer in
32# this file, but rather in /etc/defaults/rc.conf. Please check that file
33# first before contemplating any changes here. If you do need to change
34# this file for some reason, we would like to know about it.
35
36# First pass startup stuff.
37#
38network_pass1() {
39 echo -n 'Doing initial network setup:'
40
41 # Convert host.conf to nsswitch.conf if necessary
42 if [ -f "/etc/host.conf" ]; then
28# From: @(#)netstart 5.9 (Berkeley) 3/30/91
29#
30
31# Note that almost all of the user-configurable behavior is no longer in
32# this file, but rather in /etc/defaults/rc.conf. Please check that file
33# first before contemplating any changes here. If you do need to change
34# this file for some reason, we would like to know about it.
35
36# First pass startup stuff.
37#
38network_pass1() {
39 echo -n 'Doing initial network setup:'
40
41 # Convert host.conf to nsswitch.conf if necessary
42 if [ -f "/etc/host.conf" ]; then
43 echo ""
44 echo "Warning: /etc/host.conf is no longer used"
43 echo ''
44 echo 'Warning: /etc/host.conf is no longer used'
45 if [ -f "/etc/nsswitch.conf" ]; then
45 if [ -f "/etc/nsswitch.conf" ]; then
46 echo " /etc/nsswitch.conf will be used instead"
46 echo ' /etc/nsswitch.conf will be used instead'
47 else
47 else
48 echo " /etc/nsswitch.conf will be created for you"
48 echo ' /etc/nsswitch.conf will be created for you'
49 convert_host_conf /etc/host.conf /etc/nsswitch.conf
50 fi
51 fi
52
53 # Set the host name if it is not already set
54 #
55 if [ -z "`hostname -s`" ]; then
56 hostname ${hostname}

--- 185 unchanged lines hidden (view full) ---

242 else
243 firewall_in_kernel=0
244 fi
245
246 case ${firewall_enable} in
247 [Yy][Ee][Ss])
248 if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then
249 firewall_in_kernel=1
49 convert_host_conf /etc/host.conf /etc/nsswitch.conf
50 fi
51 fi
52
53 # Set the host name if it is not already set
54 #
55 if [ -z "`hostname -s`" ]; then
56 hostname ${hostname}

--- 185 unchanged lines hidden (view full) ---

242 else
243 firewall_in_kernel=0
244 fi
245
246 case ${firewall_enable} in
247 [Yy][Ee][Ss])
248 if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then
249 firewall_in_kernel=1
250 echo "Kernel firewall module loaded."
250 echo 'Kernel firewall module loaded'
251 elif [ "${firewall_in_kernel}" -eq 0 ]; then
251 elif [ "${firewall_in_kernel}" -eq 0 ]; then
252 echo "Warning: firewall kernel module failed to load."
252 echo 'Warning: firewall kernel module failed to load'
253 fi
254 ;;
255 esac
256
257 # Load the filters if required
258 #
259 case ${firewall_in_kernel} in
260 1)

--- 22 unchanged lines hidden (view full) ---

283 echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg}
284 fi
285 ;;
286 esac
287
288 echo '.'
289
290 elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then
253 fi
254 ;;
255 esac
256
257 # Load the filters if required
258 #
259 case ${firewall_in_kernel} in
260 1)

--- 22 unchanged lines hidden (view full) ---

283 echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg}
284 fi
285 ;;
286 esac
287
288 echo '.'
289
290 elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then
291 echo -n "Warning: kernel has firewall functionality, "
292 echo "but firewall rules are not enabled."
293 echo " All ip services are disabled."
291 echo 'Warning: kernel has firewall functionality,' \
292 'but firewall rules are not enabled.'
293 echo ' All ip services are disabled.'
294 fi
295
296 case ${firewall_logging} in
297 [Yy][Ee][Ss] | '')
298 echo 'Firewall logging=YES'
299 sysctl -w net.inet.ip.fw.verbose=1 >/dev/null
300 ;;
301 *)

--- 144 unchanged lines hidden (view full) ---

446 echo ' ipsec: enabled'
447 setkey -f ${ipsec_file}
448 else
449 echo ' ipsec: file not found'
450 fi
451 ;;
452 esac
453
294 fi
295
296 case ${firewall_logging} in
297 [Yy][Ee][Ss] | '')
298 echo 'Firewall logging=YES'
299 sysctl -w net.inet.ip.fw.verbose=1 >/dev/null
300 ;;
301 *)

--- 144 unchanged lines hidden (view full) ---

446 echo ' ipsec: enabled'
447 setkey -f ${ipsec_file}
448 else
449 echo ' ipsec: file not found'
450 fi
451 ;;
452 esac
453
454 echo -n 'routing daemons:'
454 echo -n 'Routing daemons:'
455 case ${router_enable} in
456 [Yy][Ee][Ss])
457 echo -n " ${router}"; ${router} ${router_flags}
458 ;;
459 esac
460
461 case ${ipxrouted_enable} in
462 [Yy][Ee][Ss])

--- 306 unchanged lines hidden ---
455 case ${router_enable} in
456 [Yy][Ee][Ss])
457 echo -n " ${router}"; ${router} ${router_flags}
458 ;;
459 esac
460
461 case ${ipxrouted_enable} in
462 [Yy][Ee][Ss])

--- 306 unchanged lines hidden ---