Deleted Added
full compact
defaultroute (48687) defaultroute (48842)
1#!/bin/sh -
2#
1#!/bin/sh -
2#
3# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
3# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
4# From: @(#)netstart 5.9 (Berkeley) 3/30/91
5
6# Note that almost all the user-configurable behavior is no longer in
7# this file, but rather in /etc/rc.conf. Please check that file
8# first before contemplating any changes here. If you do need to change
9# this file for some reason, we would like to know about it.
10
11# First pass startup stuff.
12
13network_pass1() {
14 echo -n 'Doing initial network setup:'
15 # Set the host name if it is not already set
16 if [ -z "`hostname -s`" ] ; then
17 hostname $hostname
18 echo -n ' hostname'
19 fi
20
21 # Set the domainname if we're using NIS
22 if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
23 domainname $nisdomainname
24 echo -n ' domain'
25 fi
26 echo '.'
27
28 # Initial ATM interface configuration
29 if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
30 . /etc/rc.atm
31 atm_pass1
32 fi
33
34 # ISDN subsystem startup
35 if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
36 . /etc/rc.isdn
37 fi
38
39 # Special options for sppp(4) interfaces go here. These need
40 # to go _before_ the general ifconfig section, since in the case
41 # of hardwired (no link1 flag) but required authentication, you
42 # cannot pass auth parameters down to the already running interface.
43 for ifn in ${sppp_interfaces}; do
44 eval spppcontrol_args=\$spppconfig_${ifn}
45 if [ -n "${spppcontrol_args}" ] ; then
46 # The auth secrets might contain spaces; in order
47 # to retain the quotation, we need to eval them
48 # here.
49 eval spppcontrol ${ifn} ${spppcontrol_args}
50 fi
51 done
52
53 # Set up all the network interfaces, calling startup scripts if needed
54 if [ "x${network_interfaces}" = "xauto" ]; then
55 network_interfaces="`ifconfig -l`"
56 fi
57 for ifn in ${network_interfaces}; do
58 showstat=false
59 if [ -e /etc/start_if.${ifn} ]; then
60 . /etc/start_if.${ifn}
61 showstat=true
62 fi
63 # Do the primary ifconfig if specified
64 eval ifconfig_args=\$ifconfig_${ifn}
65 if [ -n "${ifconfig_args}" ] ; then
4# From: @(#)netstart 5.9 (Berkeley) 3/30/91
5
6# Note that almost all the user-configurable behavior is no longer in
7# this file, but rather in /etc/rc.conf. Please check that file
8# first before contemplating any changes here. If you do need to change
9# this file for some reason, we would like to know about it.
10
11# First pass startup stuff.
12
13network_pass1() {
14 echo -n 'Doing initial network setup:'
15 # Set the host name if it is not already set
16 if [ -z "`hostname -s`" ] ; then
17 hostname $hostname
18 echo -n ' hostname'
19 fi
20
21 # Set the domainname if we're using NIS
22 if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
23 domainname $nisdomainname
24 echo -n ' domain'
25 fi
26 echo '.'
27
28 # Initial ATM interface configuration
29 if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
30 . /etc/rc.atm
31 atm_pass1
32 fi
33
34 # ISDN subsystem startup
35 if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
36 . /etc/rc.isdn
37 fi
38
39 # Special options for sppp(4) interfaces go here. These need
40 # to go _before_ the general ifconfig section, since in the case
41 # of hardwired (no link1 flag) but required authentication, you
42 # cannot pass auth parameters down to the already running interface.
43 for ifn in ${sppp_interfaces}; do
44 eval spppcontrol_args=\$spppconfig_${ifn}
45 if [ -n "${spppcontrol_args}" ] ; then
46 # The auth secrets might contain spaces; in order
47 # to retain the quotation, we need to eval them
48 # here.
49 eval spppcontrol ${ifn} ${spppcontrol_args}
50 fi
51 done
52
53 # Set up all the network interfaces, calling startup scripts if needed
54 if [ "x${network_interfaces}" = "xauto" ]; then
55 network_interfaces="`ifconfig -l`"
56 fi
57 for ifn in ${network_interfaces}; do
58 showstat=false
59 if [ -e /etc/start_if.${ifn} ]; then
60 . /etc/start_if.${ifn}
61 showstat=true
62 fi
63 # Do the primary ifconfig if specified
64 eval ifconfig_args=\$ifconfig_${ifn}
65 if [ -n "${ifconfig_args}" ] ; then
66 ifconfig ${ifn} ${ifconfig_args}
66 # See if we are using DHCP
67 if [ X"${ifconfig_args}" = X"DHCP" ]; then
68 ${dhcp_program} ${dhcp_flags} ${ifn}
69 else
70 ifconfig ${ifn} ${ifconfig_args}
71 fi
67 showstat=true
68 fi
69 # Check to see if aliases need to be added
70 alias=0
71 while :
72 do
73 eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
74 if [ -n "${ifconfig_args}" ]; then
75 ifconfig ${ifn} ${ifconfig_args} alias
76 showstat=true
77 alias=`expr ${alias} + 1`
78 else
79 break;
80 fi
81 done
82 # Do ipx address if specified
83 eval ifconfig_args=\$ifconfig_${ifn}_ipx
84 if [ -n "${ifconfig_args}" ]; then
85 ifconfig ${ifn} ${ifconfig_args}
86 showstat=true
87 fi
88 if [ "${showstat}" = "true" ]
89 then
90 ifconfig ${ifn}
91 fi
92 done
93
94 # Initialize IP filtering using ipfw
95 echo ""
96 /sbin/ipfw -q flush > /dev/null 2>&1
97 if [ $? = 0 ] ; then
98 firewall_in_kernel=1
99 else
100 firewall_in_kernel=0
101 fi
102
103 if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
104 if kldload ipfw; then
105 firewall_in_kernel=1 # module loaded successfully
106 echo "Kernel firewall module loaded."
107 else
108 echo "Warning: firewall kernel module failed to load."
109 fi
110 fi
111
112 # Load the filters if required
113 if [ $firewall_in_kernel = 1 ]; then
114 if [ -z "${firewall_script}" ] ; then
115 firewall_script="/etc/rc.firewall"
116 fi
117 if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
118 . ${firewall_script}
119 echo -n 'Firewall rules loaded, starting divert daemons:'
120
121 # Network Address Translation daemon
122 if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
123 if echo ${natd_interface} | \
124 grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
125 natd_ifarg="-a ${natd_interface}"
126 else
127 natd_ifarg="-n ${natd_interface}"
128 fi
129 echo -n ' natd'; ${natd_program} ${natd_flags} ${natd_ifarg}
130 fi
131 echo '.'
132 else
133 IPFW_DEFAULT=`ipfw l 65535`
134 if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
135 echo -n "Warning: kernel has firewall functionality, "
136 echo "but firewall rules are not enabled."
137 echo " All ip services are disabled."
138 fi
139 fi
140 fi
141
142 # Additional ATM interface configuration
143 if [ -n "${atm_pass1_done}" ]; then
144 atm_pass2
145 fi
146
147 # Configure routing
148
149 if [ "x$defaultrouter" != "xNO" ] ; then
150 static_routes="default ${static_routes}"
151 route_default="default ${defaultrouter}"
152 fi
153
154 # Set up any static routes. This should be done before router discovery.
155 if [ "x${static_routes}" != "x" ]; then
156 for i in ${static_routes}; do
157 eval route_args=\$route_${i}
158 route add ${route_args}
159 done
160 fi
161
162 echo -n 'Additional routing options:'
163 if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
164 echo -n ' tcp extensions=NO'
165 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
166 fi
167
168 if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
169 echo -n ' log_in_vain=YES'
170 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
171 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
172 fi
173
174 if [ X"$icmp_bmcastecho" = X"YES" ]; then
175 echo -n ' broadcast ping responses=YES'
176 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
177 fi
178
179 if [ "X$gateway_enable" = X"YES" ]; then
180 echo -n ' IP gateway=YES'
181 sysctl -w net.inet.ip.forwarding=1 >/dev/null
182 fi
183
184 if [ "X$forward_sourceroute" = X"YES" ]; then
185 echo -n ' do source routing=YES'
186 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
187 fi
188
189 if [ "X$accept_sourceroute" = X"YES" ]; then
190 echo -n ' accept source routing=YES'
191 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
192 fi
193
194 if [ "X$tcp_keepalive" = X"YES" ]; then
195 echo -n ' TCP keepalive=YES'
196 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
197 fi
198
199 if [ "X$ipxgateway_enable" = X"YES" ]; then
200 echo -n ' IPX gateway=YES'
201 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
202 fi
203
204 if [ "X$arpproxy_all" = X"YES" ]; then
205 echo -n ' ARP proxyall=YES'
206 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
207 fi
208 echo '.'
209
210 echo -n 'routing daemons:'
211 if [ "X$router_enable" = X"YES" ]; then
212 echo -n " ${router}"; ${router} ${router_flags}
213 fi
214
215 if [ "X$ipxrouted_enable" = X"YES" ]; then
216 echo -n ' IPXrouted'
217 IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
218 fi
219
220 if [ "X${mrouted_enable}" = X"YES" ]; then
221 echo -n ' mrouted'; mrouted ${mrouted_flags}
222 fi
223
224 if [ "X$rarpd_enable" = X"YES" ]; then
225 echo -n ' rarpd'; rarpd ${rarpd_flags}
226 fi
227 echo '.'
228 network_pass1_done=YES # Let future generations know we made it.
229}
230
231network_pass2() {
232 echo -n 'Doing additional network setup:'
233 if [ "X${named_enable}" = X"YES" ]; then
234 echo -n ' named'; ${named_program-"named"} ${named_flags}
235 fi
236
237 if [ "X${ntpdate_enable}" = X"YES" ]; then
238 echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
239 fi
240
241 if [ "X${xntpd_enable}" = X"YES" ]; then
242 echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
243 fi
244
245 if [ "X${timed_enable}" = X"YES" ]; then
246 echo -n ' timed'; timed ${timed_flags}
247 fi
248
249 if [ "X${portmap_enable}" = X"YES" ]; then
250 echo -n ' portmap'; ${portmap_program} ${portmap_flags}
251 fi
252
253 # Start ypserv if we're an NIS server.
254 # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
255 if [ "X${nis_server_enable}" = X"YES" ]; then
256 echo -n ' ypserv'; ypserv ${nis_server_flags}
257
258 if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
259 echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
260 fi
261
262 if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
263 echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
264 fi
265 fi
266
267 # Start ypbind if we're an NIS client
268 if [ "X${nis_client_enable}" = X"YES" ]; then
269 echo -n ' ypbind'; ypbind ${nis_client_flags}
270 if [ "X${nis_ypset_enable}" = X"YES" ]; then
271 echo -n ' ypset'; ypset ${nis_ypset_flags}
272 fi
273 fi
274
275 # Start keyserv if we are running Secure RPC
276 if [ "X${keyserv_enable}" = X"YES" ]; then
277 echo -n ' keyserv'; keyserv ${keyserv_flags}
278 fi
279 # Start ypupdated if we are running Secure RPC and we are NIS master
280 if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
281 echo -n ' rpc.ypupdated'; rpc.ypupdated
282 fi
283
284 # Start ATM daemons
285 if [ -n "${atm_pass2_done}" ]; then
286 atm_pass3
287 fi
288
289 echo '.'
290 network_pass2_done=YES
291}
292
293network_pass3() {
294 echo -n 'Starting final network daemons:'
295
296 if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
297 echo -n ' mountd'
298 if [ "X${weak_mountd_authentication}" = X"YES" ]; then
299 mountd_flags="-n"
300 fi
301 mountd ${mountd_flags}
302 if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
303 echo -n ' NFS on reserved port only=YES'
304 sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
305 fi
306 echo -n ' nfsd'; nfsd ${nfs_server_flags}
307 if [ "X$rpc_lockd_enable" = X"YES" ]; then
308 echo -n ' rpc.lockd'; rpc.lockd
309 fi
310 if [ "X$rpc_statd_enable" = X"YES" ]; then
311 echo -n ' rpc.statd'; rpc.statd
312 fi
313 fi
314
315 if [ "X${nfs_client_enable}" = X"YES" ]; then
316 echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
317 if [ "X${nfs_access_cache}" != X ]; then
318 echo -n " NFS access cache time=${nfs_access_cache}"
319 sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
320 >/dev/null
321 fi
322 fi
323
324 if [ "X${amd_enable}" = X"YES" ]; then
325 echo -n ' amd'
326 if [ "X${amd_map_program}" != X"NO" ]; then
327 amd_flags="${amd_flags} `eval ${amd_map_program}`"
328 fi
329 if [ -n "$amd_flags" ]
330 then
331 amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
332 else
333 amd 2> /dev/null
334 fi
335 fi
336
337 if [ "X${rwhod_enable}" = X"YES" ]; then
338 echo -n ' rwhod'; rwhod ${rwhod_flags}
339 fi
340
341 # Kerberos runs ONLY on the Kerberos server machine
342 if [ "X${kerberos_server_enable}" = X"YES" ]; then
343 if [ "X${kerberos_stash}" = "XYES" ]; then
344 stash_flag=-n
345 else
346 stash_flag=
347 fi
348 echo -n ' kerberos'; \
349 kerberos ${stash_flag} >> /var/log/kerberos.log &
350 if [ "X${kadmind_server_enable}" = "XYES" ]; then
351 echo -n ' kadmind'; \
352 (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
353 fi
354 unset stash_flag
355 fi
356
357 echo '.'
358 network_pass3_done=YES
359}
72 showstat=true
73 fi
74 # Check to see if aliases need to be added
75 alias=0
76 while :
77 do
78 eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
79 if [ -n "${ifconfig_args}" ]; then
80 ifconfig ${ifn} ${ifconfig_args} alias
81 showstat=true
82 alias=`expr ${alias} + 1`
83 else
84 break;
85 fi
86 done
87 # Do ipx address if specified
88 eval ifconfig_args=\$ifconfig_${ifn}_ipx
89 if [ -n "${ifconfig_args}" ]; then
90 ifconfig ${ifn} ${ifconfig_args}
91 showstat=true
92 fi
93 if [ "${showstat}" = "true" ]
94 then
95 ifconfig ${ifn}
96 fi
97 done
98
99 # Initialize IP filtering using ipfw
100 echo ""
101 /sbin/ipfw -q flush > /dev/null 2>&1
102 if [ $? = 0 ] ; then
103 firewall_in_kernel=1
104 else
105 firewall_in_kernel=0
106 fi
107
108 if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
109 if kldload ipfw; then
110 firewall_in_kernel=1 # module loaded successfully
111 echo "Kernel firewall module loaded."
112 else
113 echo "Warning: firewall kernel module failed to load."
114 fi
115 fi
116
117 # Load the filters if required
118 if [ $firewall_in_kernel = 1 ]; then
119 if [ -z "${firewall_script}" ] ; then
120 firewall_script="/etc/rc.firewall"
121 fi
122 if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
123 . ${firewall_script}
124 echo -n 'Firewall rules loaded, starting divert daemons:'
125
126 # Network Address Translation daemon
127 if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
128 if echo ${natd_interface} | \
129 grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
130 natd_ifarg="-a ${natd_interface}"
131 else
132 natd_ifarg="-n ${natd_interface}"
133 fi
134 echo -n ' natd'; ${natd_program} ${natd_flags} ${natd_ifarg}
135 fi
136 echo '.'
137 else
138 IPFW_DEFAULT=`ipfw l 65535`
139 if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
140 echo -n "Warning: kernel has firewall functionality, "
141 echo "but firewall rules are not enabled."
142 echo " All ip services are disabled."
143 fi
144 fi
145 fi
146
147 # Additional ATM interface configuration
148 if [ -n "${atm_pass1_done}" ]; then
149 atm_pass2
150 fi
151
152 # Configure routing
153
154 if [ "x$defaultrouter" != "xNO" ] ; then
155 static_routes="default ${static_routes}"
156 route_default="default ${defaultrouter}"
157 fi
158
159 # Set up any static routes. This should be done before router discovery.
160 if [ "x${static_routes}" != "x" ]; then
161 for i in ${static_routes}; do
162 eval route_args=\$route_${i}
163 route add ${route_args}
164 done
165 fi
166
167 echo -n 'Additional routing options:'
168 if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
169 echo -n ' tcp extensions=NO'
170 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
171 fi
172
173 if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
174 echo -n ' log_in_vain=YES'
175 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
176 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
177 fi
178
179 if [ X"$icmp_bmcastecho" = X"YES" ]; then
180 echo -n ' broadcast ping responses=YES'
181 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
182 fi
183
184 if [ "X$gateway_enable" = X"YES" ]; then
185 echo -n ' IP gateway=YES'
186 sysctl -w net.inet.ip.forwarding=1 >/dev/null
187 fi
188
189 if [ "X$forward_sourceroute" = X"YES" ]; then
190 echo -n ' do source routing=YES'
191 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
192 fi
193
194 if [ "X$accept_sourceroute" = X"YES" ]; then
195 echo -n ' accept source routing=YES'
196 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
197 fi
198
199 if [ "X$tcp_keepalive" = X"YES" ]; then
200 echo -n ' TCP keepalive=YES'
201 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
202 fi
203
204 if [ "X$ipxgateway_enable" = X"YES" ]; then
205 echo -n ' IPX gateway=YES'
206 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
207 fi
208
209 if [ "X$arpproxy_all" = X"YES" ]; then
210 echo -n ' ARP proxyall=YES'
211 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
212 fi
213 echo '.'
214
215 echo -n 'routing daemons:'
216 if [ "X$router_enable" = X"YES" ]; then
217 echo -n " ${router}"; ${router} ${router_flags}
218 fi
219
220 if [ "X$ipxrouted_enable" = X"YES" ]; then
221 echo -n ' IPXrouted'
222 IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
223 fi
224
225 if [ "X${mrouted_enable}" = X"YES" ]; then
226 echo -n ' mrouted'; mrouted ${mrouted_flags}
227 fi
228
229 if [ "X$rarpd_enable" = X"YES" ]; then
230 echo -n ' rarpd'; rarpd ${rarpd_flags}
231 fi
232 echo '.'
233 network_pass1_done=YES # Let future generations know we made it.
234}
235
236network_pass2() {
237 echo -n 'Doing additional network setup:'
238 if [ "X${named_enable}" = X"YES" ]; then
239 echo -n ' named'; ${named_program-"named"} ${named_flags}
240 fi
241
242 if [ "X${ntpdate_enable}" = X"YES" ]; then
243 echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
244 fi
245
246 if [ "X${xntpd_enable}" = X"YES" ]; then
247 echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
248 fi
249
250 if [ "X${timed_enable}" = X"YES" ]; then
251 echo -n ' timed'; timed ${timed_flags}
252 fi
253
254 if [ "X${portmap_enable}" = X"YES" ]; then
255 echo -n ' portmap'; ${portmap_program} ${portmap_flags}
256 fi
257
258 # Start ypserv if we're an NIS server.
259 # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
260 if [ "X${nis_server_enable}" = X"YES" ]; then
261 echo -n ' ypserv'; ypserv ${nis_server_flags}
262
263 if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
264 echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
265 fi
266
267 if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
268 echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
269 fi
270 fi
271
272 # Start ypbind if we're an NIS client
273 if [ "X${nis_client_enable}" = X"YES" ]; then
274 echo -n ' ypbind'; ypbind ${nis_client_flags}
275 if [ "X${nis_ypset_enable}" = X"YES" ]; then
276 echo -n ' ypset'; ypset ${nis_ypset_flags}
277 fi
278 fi
279
280 # Start keyserv if we are running Secure RPC
281 if [ "X${keyserv_enable}" = X"YES" ]; then
282 echo -n ' keyserv'; keyserv ${keyserv_flags}
283 fi
284 # Start ypupdated if we are running Secure RPC and we are NIS master
285 if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
286 echo -n ' rpc.ypupdated'; rpc.ypupdated
287 fi
288
289 # Start ATM daemons
290 if [ -n "${atm_pass2_done}" ]; then
291 atm_pass3
292 fi
293
294 echo '.'
295 network_pass2_done=YES
296}
297
298network_pass3() {
299 echo -n 'Starting final network daemons:'
300
301 if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
302 echo -n ' mountd'
303 if [ "X${weak_mountd_authentication}" = X"YES" ]; then
304 mountd_flags="-n"
305 fi
306 mountd ${mountd_flags}
307 if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
308 echo -n ' NFS on reserved port only=YES'
309 sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
310 fi
311 echo -n ' nfsd'; nfsd ${nfs_server_flags}
312 if [ "X$rpc_lockd_enable" = X"YES" ]; then
313 echo -n ' rpc.lockd'; rpc.lockd
314 fi
315 if [ "X$rpc_statd_enable" = X"YES" ]; then
316 echo -n ' rpc.statd'; rpc.statd
317 fi
318 fi
319
320 if [ "X${nfs_client_enable}" = X"YES" ]; then
321 echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
322 if [ "X${nfs_access_cache}" != X ]; then
323 echo -n " NFS access cache time=${nfs_access_cache}"
324 sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
325 >/dev/null
326 fi
327 fi
328
329 if [ "X${amd_enable}" = X"YES" ]; then
330 echo -n ' amd'
331 if [ "X${amd_map_program}" != X"NO" ]; then
332 amd_flags="${amd_flags} `eval ${amd_map_program}`"
333 fi
334 if [ -n "$amd_flags" ]
335 then
336 amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
337 else
338 amd 2> /dev/null
339 fi
340 fi
341
342 if [ "X${rwhod_enable}" = X"YES" ]; then
343 echo -n ' rwhod'; rwhod ${rwhod_flags}
344 fi
345
346 # Kerberos runs ONLY on the Kerberos server machine
347 if [ "X${kerberos_server_enable}" = X"YES" ]; then
348 if [ "X${kerberos_stash}" = "XYES" ]; then
349 stash_flag=-n
350 else
351 stash_flag=
352 fi
353 echo -n ' kerberos'; \
354 kerberos ${stash_flag} >> /var/log/kerberos.log &
355 if [ "X${kadmind_server_enable}" = "XYES" ]; then
356 echo -n ' kadmind'; \
357 (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
358 fi
359 unset stash_flag
360 fi
361
362 echo '.'
363 network_pass3_done=YES
364}