defaultroute revision 51231
120253Sjoerg#!/bin/sh -
220302Sjoerg#
320302Sjoerg# $FreeBSD: head/etc/rc.d/routing 51231 1999-09-13 15:44:20Z sheldonh $
420253Sjoerg#	From: @(#)netstart	5.9 (Berkeley) 3/30/91
520253Sjoerg
620253Sjoerg# Note that almost all of the user-configurable behavior is no longer in
720253Sjoerg# this file, but rather in /etc/defaults/rc.conf.  Please check that file
820253Sjoerg# first before contemplating any changes here.  If you do need to change
920302Sjoerg# this file for some reason, we would like to know about it.
1020253Sjoerg
1120253Sjoerg# First pass startup stuff.
1220253Sjoerg#
1320253Sjoergnetwork_pass1() {
1420302Sjoerg	echo -n 'Doing initial network setup:'
1520253Sjoerg
1620253Sjoerg	# Set the host name if it is not already set
1720302Sjoerg	#
1820253Sjoerg	if [ -z "`hostname -s`" ]; then
1920253Sjoerg		hostname ${hostname}
2020253Sjoerg		echo -n ' hostname'
2120253Sjoerg	fi
2220253Sjoerg
2320253Sjoerg	# Set the domainname if we're using NIS
2420253Sjoerg	#
2544229Sdavidn	case ${nisdomainname} in
2620253Sjoerg	[Nn][Oo] | '')
2720253Sjoerg		;;
2830259Scharnier	*)
2930259Scharnier		domainname ${nisdomainname}
3050479Speter		echo -n ' domain'
3130259Scharnier		;;
3230259Scharnier	esac
3330259Scharnier
3430259Scharnier	echo '.'
3520253Sjoerg
3620253Sjoerg	# Initial ATM interface configuration
3720253Sjoerg	#
3830259Scharnier	case ${atm_enable} in
3920253Sjoerg	[Yy][Ee][Ss])
4020555Sdavidn		if [ -r /etc/rc.atm ]; then
4120555Sdavidn			. /etc/rc.atm
4220555Sdavidn			atm_pass1
4364918Sgreen		fi
44242349Sbapt		;;
45242349Sbapt	esac
46242349Sbapt
4720253Sjoerg	# ISDN subsystem startup
4820253Sjoerg	#
4920253Sjoerg	case ${isdn_enable} in
5023318Sache	[Yy][Ee][Ss])
5122394Sdavidn		if [ -r /etc/rc.isdn ]; then
5252512Sdavidn			. /etc/rc.isdn
5324214Sache		fi
5444386Sdavidn		;;
5520253Sjoerg	esac
5620253Sjoerg
5720253Sjoerg	# Special options for sppp(4) interfaces go here.  These need
5820253Sjoerg	# to go _before_ the general ifconfig section, since in the case
5920253Sjoerg	# of hardwired (no link1 flag) but required authentication, you
6020253Sjoerg	# cannot pass auth parameters down to the already running interface.
6120253Sjoerg	#
6220253Sjoerg	for ifn in ${sppp_interfaces}; do
6320253Sjoerg		eval spppcontrol_args=\$spppconfig_${ifn}
6485145Sache		if [ -n "${spppcontrol_args}" ]; then
6520253Sjoerg			# The auth secrets might contain spaces; in order
66283961Sbapt			# to retain the quotation, we need to eval them
67283961Sbapt			# here.
68283961Sbapt			eval spppcontrol ${ifn} ${spppcontrol_args}
69283961Sbapt		fi
70283961Sbapt	done
71283961Sbapt
72283961Sbapt	# Set up all the network interfaces, calling startup scripts if needed
73283961Sbapt	#
74283961Sbapt	case ${network_interfaces} in
75283961Sbapt	[Aa][Uu][Tt][Oo])
76283961Sbapt		network_interfaces="`ifconfig -l`"
77283961Sbapt		;;
78283961Sbapt	esac
79283961Sbapt
80283961Sbapt	for ifn in ${network_interfaces}; do
81283961Sbapt		showstat=false
82283961Sbapt		if [ -r /etc/start_if.${ifn} ]; then
83283961Sbapt			. /etc/start_if.${ifn}
84283961Sbapt			showstat=true
85283961Sbapt		fi
86283961Sbapt
87283961Sbapt		# Do the primary ifconfig if specified
8820253Sjoerg		#
8920253Sjoerg		eval ifconfig_args=\$ifconfig_${ifn}
9020253Sjoerg
9120253Sjoerg		case ${ifconfig_args} in
9220253Sjoerg		'')
9320253Sjoerg			;;
9420253Sjoerg		[Dd][Hh][Cc][Pp])
9520253Sjoerg			${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
9620253Sjoerg			showstat=true
9720253Sjoerg			;;
9820253Sjoerg		*)
9920253Sjoerg			ifconfig ${ifn} ${ifconfig_args}
10020253Sjoerg			showstat=true
10120253Sjoerg			;;
10220253Sjoerg		esac
10320253Sjoerg
10420253Sjoerg		# Check to see if aliases need to be added
105124382Siedowse		#
10620253Sjoerg		alias=0
10720253Sjoerg		while : ; do
10820253Sjoerg			eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
10920253Sjoerg			if [ -n "${ifconfig_args}" ]; then
11020253Sjoerg				ifconfig ${ifn} ${ifconfig_args} alias
11120253Sjoerg				showstat=true
11220253Sjoerg				alias=`expr ${alias} + 1`
11320253Sjoerg			else
11420253Sjoerg				break;
11520253Sjoerg			fi
11620253Sjoerg		done
11720253Sjoerg
11820253Sjoerg		# Do ipx address if specified
11920253Sjoerg		#
12020253Sjoerg		eval ifconfig_args=\$ifconfig_${ifn}_ipx
12120253Sjoerg		if [ -n "${ifconfig_args}" ]; then
12220253Sjoerg			ifconfig ${ifn} ${ifconfig_args}
12352527Sdavidn			showstat=true
12420253Sjoerg		fi
12552512Sdavidn
12620253Sjoerg		case ${showstat} in
12720253Sjoerg		true)
12820253Sjoerg			ifconfig ${ifn}
12920253Sjoerg			;;
13020253Sjoerg		esac
13120253Sjoerg	done
13220747Sdavidn
133283961Sbapt	# Warm up user ppp if required, must happen before natd.
13482868Sdd	#
135167919Sle	case ${ppp_enable} in
136167919Sle	[Yy][Ee][Ss])
13720253Sjoerg		# Establish ppp mode.
13820253Sjoerg		#
13920253Sjoerg		if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
14020253Sjoerg			-a "${ppp_mode}" != "dedicated" \
14120253Sjoerg			-a "${ppp_mode}" != "background" ]; then
14220253Sjoerg			ppp_mode="auto";
14320253Sjoerg		fi
14420253Sjoerg
14520253Sjoerg		ppp_command="-${ppp_mode} ";
14620253Sjoerg
14756000Sdavidn		# Switch on alias mode?
14820253Sjoerg		#
14920253Sjoerg		case ${ppp_nat} in
15056000Sdavidn		[Yy][Ee][Ss])
15156000Sdavidn			ppp_command="${ppp_command} -nat";
15256000Sdavidn			;;
15320253Sjoerg		esac
15420253Sjoerg
15552512Sdavidn		echo -n 'Starting ppp: '; ppp ${ppp_command} -quiet ${ppp_profile}
15620253Sjoerg		;;
15720267Sjoerg	esac
15820267Sjoerg
15920267Sjoerg	# Initialize IP filtering using ipfw
16020267Sjoerg	#
16120267Sjoerg	echo ''
16220267Sjoerg
16320267Sjoerg	if /sbin/ipfw -q flush > /dev/null 2>&1; then
16420267Sjoerg		firewall_in_kernel=1
165283842Sbapt	else
16620267Sjoerg		firewall_in_kernel=0
16720267Sjoerg	fi
16820267Sjoerg
16920267Sjoerg	case ${firewall_enable} in
17020267Sjoerg	[Yy][Ee][Ss])
17120253Sjoerg		if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then
17220253Sjoerg			firewall_in_kernel=1
17320253Sjoerg			echo "Kernel firewall module loaded."
17420253Sjoerg		elif [ "${firewall_in_kernel}" -eq 0 ]; then
17520267Sjoerg			echo "Warning: firewall kernel module failed to load."
17620253Sjoerg		fi
17721052Sdavidn		;;
178167919Sle	esac
179167919Sle
180167919Sle	# Load the filters if required
181167919Sle	#
182167919Sle	case ${firewall_in_kernel} in
183219408Sjkim	1)
184167919Sle		if [ -z "${firewall_script}" ]; then
185168044Sle			firewall_script=/etc/rc.firewall
186167919Sle		fi
18721052Sdavidn
18821052Sdavidn		case ${firewall_enable} in
18921052Sdavidn		[Yy][Ee][Ss])
19021052Sdavidn			if [ -r ${firewall_script} ]; then
191224535Sdelphij				. ${firewall_script}
19221052Sdavidn				echo -n 'Firewall rules loaded, starting divert daemons:'
19321052Sdavidn
19421052Sdavidn				# Network Address Translation daemon
19521052Sdavidn				#
19621052Sdavidn				case ${natd_enable} in
19721052Sdavidn				[Yy][Ee][Ss])
19830259Scharnier					if [ -n "${natd_interface}" ]; then
19921052Sdavidn						if echo ${natd_interface} | \
20021052Sdavidn							grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
20121052Sdavidn							natd_ifarg="-a ${natd_interface}"
20221052Sdavidn						else
20321242Sdavidn							natd_ifarg="-n ${natd_interface}"
20421242Sdavidn						fi
20521242Sdavidn
20621242Sdavidn						echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg}
20721242Sdavidn					fi
20821242Sdavidn					;;
20921242Sdavidn				esac
210282683Sbapt
211219408Sjkim				echo '.'
21221242Sdavidn
213148584Spjd			elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then
214148584Spjd				echo -n "Warning: kernel has firewall functionality, "
215148584Spjd				echo "but firewall rules are not enabled."
216148584Spjd				echo "		 All ip services are disabled."
217148584Spjd			fi
21821242Sdavidn			;;
21921242Sdavidn		esac
22021242Sdavidn		;;
221130633Srobert	esac
222130633Srobert
22321242Sdavidn	# Additional ATM interface configuration
224252377Skientzle	#
22521242Sdavidn	if [ -n "${atm_pass1_done}" ]; then
22621242Sdavidn		atm_pass2
227219408Sjkim	fi
22821242Sdavidn
22921242Sdavidn	# Configure routing
23021242Sdavidn	#
23130259Scharnier	case ${defaultrouter} in
23221242Sdavidn	[Nn][Oo] | '')
23321242Sdavidn		;;
23421052Sdavidn	*)
23521242Sdavidn		static_routes="default ${static_routes}"
236219408Sjkim		route_default="default ${defaultrouter}"
23730259Scharnier		;;
23821052Sdavidn	esac
23921052Sdavidn
24021052Sdavidn	# Set up any static routes.  This should be done before router discovery.
24121052Sdavidn	#
24230259Scharnier	if [ -n "${static_routes}" ]; then
24321052Sdavidn		for i in ${static_routes}; do
24421052Sdavidn			eval route_args=\$route_${i}
24520253Sjoerg			route add ${route_args}
24620253Sjoerg		done
24720253Sjoerg	fi
24821330Sdavidn
24921330Sdavidn	echo -n 'Additional routing options:'
25021330Sdavidn	case ${tcp_extensions} in
25120253Sjoerg	[Yy][Ee][Ss] | '')
25220253Sjoerg		;;
25320253Sjoerg	*)
25420253Sjoerg		echo -n ' tcp extensions=NO'
25563596Sdavidn		sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
25663596Sdavidn		;;
25763596Sdavidn	esac
25863596Sdavidn
25963596Sdavidn	case ${log_in_vain} in
26063596Sdavidn	[Nn][Oo] | '')
26163596Sdavidn		;;
26263596Sdavidn	*)
26320253Sjoerg		echo -n ' log_in_vain=YES'
26420253Sjoerg		sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
26520253Sjoerg		sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
26620679Sdavidn		;;
26720253Sjoerg	esac
26820253Sjoerg
26952527Sdavidn	case ${icmp_bmcastecho} in
27020253Sjoerg	[Yy][Ee][Ss])
27120747Sdavidn		echo -n ' broadcast ping responses=YES'
27244229Sdavidn		sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
27361957Sache		;;
27430259Scharnier	esac
27520253Sjoerg
27620747Sdavidn	case ${icmp_drop_redirect} in
27720747Sdavidn	[Yy][Ee][Ss])
27820253Sjoerg		echo -n ' ignore ICMP redirect=YES'
27920747Sdavidn		sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
28020253Sjoerg		;;
28120253Sjoerg	esac
28252527Sdavidn
28320253Sjoerg	case ${icmp_log_redirect} in
28426088Sdavidn	[Yy][Ee][Ss])
28530259Scharnier		echo -n ' log ICMP redirect=YES'
28620253Sjoerg		sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
28752527Sdavidn		;;
28820253Sjoerg	esac
28920253Sjoerg
29020253Sjoerg	case ${gateway_enable} in
29163600Sdavidn	[Yy][Ee][Ss])
29263600Sdavidn		echo -n ' IP gateway=YES'
29320253Sjoerg		sysctl -w net.inet.ip.forwarding=1 >/dev/null
29420253Sjoerg		;;
29530259Scharnier	esac
29620253Sjoerg
29720253Sjoerg	case ${forward_sourceroute} in
29820253Sjoerg	[Yy][Ee][Ss])
29920253Sjoerg		echo -n ' do source routing=YES'
30020253Sjoerg		sysctl -w net.inet.ip.sourceroute=1 >/dev/null
30120253Sjoerg		;;
30220253Sjoerg	esac
30320253Sjoerg
30420253Sjoerg	case ${accept_sourceroute} in
30520253Sjoerg	[Yy][Ee][Ss])
30620253Sjoerg		echo -n ' accept source routing=YES'
30720253Sjoerg		sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
30820253Sjoerg		;;
30920253Sjoerg	esac
31020253Sjoerg
31120267Sjoerg	case ${tcp_keepalive} in
312283814Sbapt	[Yy][Ee][Ss])
31320253Sjoerg		echo -n ' TCP keepalive=YES'
31452527Sdavidn		sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
31520253Sjoerg		;;
31620267Sjoerg	esac
31744386Sdavidn
31844229Sdavidn	case ${tcp_restrict_rst} in
31944229Sdavidn	[Yy][Ee][Ss])
32044386Sdavidn		echo -n ' restrict TCP reset=YES'
32144229Sdavidn		sysctl -w net.inet.tcp.restrict_rst=1 >/dev/null
32220267Sjoerg		;;
32320253Sjoerg	esac
32452527Sdavidn
32520253Sjoerg	case ${tcp_drop_synfin} in
32644229Sdavidn	[Yy][Ee][Ss])
32720253Sjoerg		echo -n ' drop SYN+FIN packets=YES'
32820253Sjoerg		sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null
32920253Sjoerg		;;
33020253Sjoerg	esac
33130259Scharnier
33220253Sjoerg	case ${ipxgateway_enable} in
33320253Sjoerg	[Yy][Ee][Ss])
33420253Sjoerg		echo -n ' IPX gateway=YES'
33520253Sjoerg		sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
33620253Sjoerg		;;
33720253Sjoerg	esac
33843780Sdes
339241108Sbapt	case ${arpproxy_all} in
340241108Sbapt	[Yy][Ee][Ss])
34120253Sjoerg		echo -n ' ARP proxyall=YES'
34220253Sjoerg		sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
34320253Sjoerg		;;
344273787Sbapt	esac
345277764Sbapt	echo '.'
346273787Sbapt
34720253Sjoerg	echo -n 'routing daemons:'
34852527Sdavidn	case ${router_enable} in
34920253Sjoerg	[Yy][Ee][Ss])
35020253Sjoerg		echo -n " ${router}";	${router} ${router_flags}
35120253Sjoerg		;;
35252512Sdavidn	esac
35352512Sdavidn
35452527Sdavidn	case ${ipxrouted_enable} in
35520253Sjoerg	[Yy][Ee][Ss])
35644229Sdavidn		echo -n ' IPXrouted'
35720253Sjoerg		IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
35820253Sjoerg		;;
35920253Sjoerg	esac
36020253Sjoerg
361283841Sbapt	case ${mrouted_enable} in
36244386Sdavidn	[Yy][Ee][Ss])
36344386Sdavidn		echo -n ' mrouted';	mrouted ${mrouted_flags}
36444386Sdavidn		;;
36520253Sjoerg	esac
36620253Sjoerg
36730259Scharnier	case ${rarpd_enable} in
36830259Scharnier	[Yy][Ee][Ss])
36920253Sjoerg		echo -n ' rarpd';	rarpd ${rarpd_flags}
37052527Sdavidn		;;
37120253Sjoerg	esac
37220253Sjoerg	echo '.'
37320253Sjoerg
37420253Sjoerg	# Let future generations know we made it.
37552512Sdavidn	#
37652512Sdavidn	network_pass1_done=YES
37752512Sdavidn}
37852512Sdavidn
37952512Sdavidnnetwork_pass2() {
38052512Sdavidn	echo -n 'Doing additional network setup:'
38152512Sdavidn	case ${named_enable} in
38252512Sdavidn	[Yy][Ee][Ss])
38352512Sdavidn		echo -n ' named';	${named_program:-named} ${named_flags}
38452512Sdavidn		;;
38552512Sdavidn	esac
38652512Sdavidn
387282685Sbapt	case ${ntpdate_enable} in
38852512Sdavidn	[Yy][Ee][Ss])
38952512Sdavidn		echo -n ' ntpdate'
39052512Sdavidn		${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1
39152527Sdavidn		;;
39252512Sdavidn	esac
39352512Sdavidn
39452512Sdavidn	case ${xntpd_enable} in
39552512Sdavidn	[Yy][Ee][Ss])
39652527Sdavidn		echo -n ' xntpd';	${xntpd_program:-xntpd} ${xntpd_flags}
39752527Sdavidn		;;
39852527Sdavidn	esac
39952527Sdavidn
40052527Sdavidn	case ${timed_enable} in
40120253Sjoerg	[Yy][Ee][Ss])
40220253Sjoerg		echo -n ' timed';	timed ${timed_flags}
40320253Sjoerg		;;
404263114Sdteske	esac
405263114Sdteske
40620253Sjoerg	case ${portmap_enable} in
40720253Sjoerg	[Yy][Ee][Ss])
40830259Scharnier		echo -n ' portmap';	${portmap_program:-/usr/sbin/portmap} ${portmap_flags}
40920253Sjoerg		;;
41044229Sdavidn	esac
41144229Sdavidn
41285145Sache	# Start ypserv if we're an NIS server.
41344229Sdavidn	# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
41420747Sdavidn	#
41585145Sache	case ${nis_server_enable} in
41620747Sdavidn	[Yy][Ee][Ss])
41744229Sdavidn		echo -n ' ypserv'; ypserv ${nis_server_flags}
41844229Sdavidn
41944229Sdavidn		case ${nis_ypxfrd_enable} in
420243895Seadler		[Yy][Ee][Ss])
42144229Sdavidn			echo -n ' rpc.ypxfrd'
422282700Sbapt			rpc.ypxfrd ${nis_ypxfrd_flags}
42344229Sdavidn			;;
42444229Sdavidn		esac
42520253Sjoerg
42620253Sjoerg		case ${nis_yppasswdd_enable} in
42720253Sjoerg		[Yy][Ee][Ss])
42820253Sjoerg			echo -n ' rpc.yppasswdd'
42920253Sjoerg			rpc.yppasswdd ${nis_yppasswdd_flags}
430282700Sbapt			;;
431130633Srobert		esac
432263114Sdteske		;;
433263114Sdteske	esac
434263114Sdteske
435263114Sdteske	# Start ypbind if we're an NIS client
436263114Sdteske	#
43720253Sjoerg	case ${nis_client_enable} in
43852502Sdavidn	[Yy][Ee][Ss])
43952502Sdavidn		echo -n ' ypbind'; ypbind ${nis_client_flags}
44052502Sdavidn		case ${nis_ypset_enable} in
441283814Sbapt		[Yy][Ee][Ss])
442283814Sbapt			echo -n ' ypset';	ypset ${nis_ypset_flags}
44321330Sdavidn			;;
44452502Sdavidn		esac
44552502Sdavidn		;;
44652502Sdavidn	esac
44752502Sdavidn
44852502Sdavidn	# Start keyserv if we are running Secure RPC
44956000Sdavidn	#
45052502Sdavidn	case ${keyserv_enable} in
45152502Sdavidn	[Yy][Ee][Ss])
45252502Sdavidn		echo -n ' keyserv';	keyserv ${keyserv_flags}
453242349Sbapt		;;
454262865Sjulian	esac
455263114Sdteske
456263114Sdteske	# Start ypupdated if we are running Secure RPC and we are NIS master
457242349Sbapt	#
458242349Sbapt	case ${rpc_ypupdated_enable} in
459242349Sbapt	[Yy][Ee][Ss])
460267970Smjg		echo -n ' rpc.ypupdated';	rpc.ypupdated
461242349Sbapt		;;
462262865Sjulian	esac
463262865Sjulian
464262865Sjulian	# Start ATM daemons
465267970Smjg	if [ -n "${atm_pass2_done}" ]; then
466267970Smjg		atm_pass3
467262865Sjulian	fi
468262865Sjulian
469262865Sjulian	echo '.'
470242349Sbapt	network_pass2_done=YES
471242349Sbapt}
472242349Sbapt
473242349Sbaptnetwork_pass3() {
47420253Sjoerg	echo -n 'Starting final network daemons:'
475283842Sbapt
47620253Sjoerg	case ${nfs_server_enable} in
477283961Sbapt	[Yy][Ee][Ss])
47844229Sdavidn		if [ -r /etc/exports ]; then
47944229Sdavidn			echo -n ' mountd'
48044229Sdavidn
48144229Sdavidn			case ${weak_mountd_authentication} in
48220253Sjoerg			[Yy][Ee][Ss])
48344229Sdavidn				mountd_flags="-n"
48444229Sdavidn				;;
48544229Sdavidn			esac
48644229Sdavidn
48744229Sdavidn			mountd ${mountd_flags}
48820253Sjoerg
48944229Sdavidn			case ${nfs_reserved_port_only} in
49044229Sdavidn			[Yy][Ee][Ss])
49144229Sdavidn				echo -n ' NFS on reserved port only=YES'
49244229Sdavidn				sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
49344229Sdavidn				;;
49444229Sdavidn			esac
495283842Sbapt
496283842Sbapt			echo -n ' nfsd';	nfsd ${nfs_server_flags}
49744229Sdavidn
49844229Sdavidn			case ${rpc_lockd_enable} in
49920253Sjoerg			[Yy][Ee][Ss])
50020253Sjoerg				echo -n ' rpc.lockd';	rpc.lockd
50120267Sjoerg				;;
50220253Sjoerg			esac
50344386Sdavidn
50444386Sdavidn			case ${rpc_statd_enable} in
50544386Sdavidn			[Yy][Ee][Ss])
50620253Sjoerg				echo -n ' rpc.statd';	rpc.statd
50720253Sjoerg				;;
50820253Sjoerg			esac
50920253Sjoerg		fi
51020253Sjoerg		;;
51120253Sjoerg	esac
51230259Scharnier
51320679Sdavidn	case ${nfs_client_enable} in
51452527Sdavidn	[Yy][Ee][Ss])
51520253Sjoerg		echo -n ' nfsiod';	nfsiod ${nfs_client_flags}
51652527Sdavidn		if [ -n "${nfs_access_cache}" ]; then
51761957Sache		echo -n " NFS access cache time=${nfs_access_cache}"
51820253Sjoerg		sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
51952527Sdavidn			>/dev/null
52020253Sjoerg		fi
52130259Scharnier		;;
52220253Sjoerg	esac
52330259Scharnier
52420253Sjoerg	case ${amd_enable} in
52520253Sjoerg	[Yy][Ee][Ss])
52652527Sdavidn		echo -n ' amd'
52752527Sdavidn		case ${amd_map_program} in
52852527Sdavidn		[Nn][Oo] | '')
52952527Sdavidn			;;
53061762Sdavidn		*)
53152527Sdavidn			amd_flags="${amd_flags} `eval ${amd_map_program}`"
53252527Sdavidn			;;
53352527Sdavidn		esac
53420253Sjoerg
53552527Sdavidn		if [ -n "${amd_flags}" ]; then
53652527Sdavidn			amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
53752527Sdavidn		else
53852527Sdavidn			amd 2> /dev/null
53952527Sdavidn		fi
54052527Sdavidn		;;
54120253Sjoerg	esac
54220253Sjoerg
54320253Sjoerg	case ${rwhod_enable} in
54420253Sjoerg	[Yy][Ee][Ss])
54552527Sdavidn		echo -n ' rwhod';	rwhod ${rwhod_flags}
54652527Sdavidn		;;
54752527Sdavidn	esac
54852527Sdavidn
54920253Sjoerg	# Kerberos runs ONLY on the Kerberos server machine
55020253Sjoerg	case ${kerberos_server_enable} in
55152527Sdavidn	[Yy][Ee][Ss])
55220267Sjoerg		case ${kerberos_stash} in
55352527Sdavidn		[Yy][Ee][Ss])
55452527Sdavidn			stash_flag=-n
55552527Sdavidn			;;
55652527Sdavidn		*)
55752527Sdavidn			stash_flag=
55852527Sdavidn			;;
55920253Sjoerg		esac
56020253Sjoerg
56120253Sjoerg		echo -n ' kerberos'
56220253Sjoerg		kerberos ${stash_flag} >> /var/log/kerberos.log &
56352527Sdavidn
56452527Sdavidn		case ${kadmind_server_enable} in
56552527Sdavidn		[Yy][Ee][Ss])
56652527Sdavidn			echo -n ' kadmind'
56720253Sjoerg			(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
56820253Sjoerg			;;
56920253Sjoerg		esac
57052527Sdavidn		unset stash_flag
57152527Sdavidn		;;
57252527Sdavidn	esac
57352527Sdavidn
57452527Sdavidn	echo '.'
57552527Sdavidn	network_pass3_done=YES
57652527Sdavidn}
57752527Sdavidn