Style clean-up:

* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
This commit is contained in:
Sheldon Hearn 1999-08-25 16:01:45 +00:00
parent 4e0eaf6924
commit b68adff6b7
31 changed files with 759 additions and 762 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.alpha,v 1.2 1998/08/31 08:57:56 dfr Exp $
# $Id: rc.alpha,v 1.3 1999/04/24 20:58:37 peter Exp $
# Do alpha specific processing
#
@ -18,63 +18,63 @@ viddev=/dev/ttyv0
echo -n "rc.alpha configuring syscons:"
# keymap
if [ "X${keymap}" != X"NO" ]; then
if [ "${keymap}" != "NO" ]; then
echo -n ' keymap'; kbdcontrol <${kbddev} -l ${keymap}
fi
# keyrate
if [ "X${keyrate}" != X"NO" ]; then
if [ "${keyrate}" != "NO" ]; then
echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
fi
# keybell
if [ "X${keybell}" != X"NO" ]; then
if [ "${keybell}" != "NO" ]; then
echo -n ' keybell'; kbdcontrol <${kbddev} -b ${keybell}
fi
# change function keys
if [ "X${keychange}" != X"NO" ]; then
if [ "${keychange}" != "NO" ]; then
echo -n " keychange"
set - ${keychange}
while [ $# -gt 0 ]
do
kbdcontrol <${kbddev} -f "$1" "$2"
kbdcontrol < ${kbddev} -f "$1" "$2"
shift; shift
done
fi
# cursor type
if [ "X${cursor}" != X"NO" ]; then
echo -n ' cursor'; vidcontrol <${viddev} -c ${cursor}
if [ "${cursor}" != "NO" ]; then
echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor}
fi
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
echo -n ' screen_map'; vidcontrol <${viddev} -l ${scrnmap}
if [ "${scrnmap}" != "NO" ]; then
echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap}
fi
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 ${font8x16}
if [ "${font8x16}" != "NO" ]; then
echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
fi
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 ${font8x14}
if [ "${font8x14}" != "NO" ]; then
echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
fi
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 ${font8x8}
if [ "${font8x8}" != "NO" ]; then
echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
fi
# blank time
if [ "X${blanktime}" != X"NO" ]; then
echo -n ' blank_time'; vidcontrol <${viddev} -t ${blanktime}
if [ "${blanktime}" != "NO" ]; then
echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime}
fi
# screen saver
if [ "X${saver}" != X"NO" ] ; then
if [ "${saver}" != "NO" ] ; then
echo -n ' screensaver'
for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
kldunload $i
@ -83,18 +83,18 @@ if [ "X${saver}" != X"NO" ] ; then
fi
# mouse daemon
if [ "X${moused_enable}" = X"YES" ] ; then
if [ "${moused_enable}" = "YES" ] ; then
echo -n ' moused'
moused ${moused_flags} -p ${moused_port} -t ${moused_type}
vidcontrol <${viddev} -m on
vidcontrol < ${viddev} -m on
fi
# set this mode for all virtual screens
if [ "X${allscreens_flags}" != X"" ] ; then
if [ -n "${allscreens_flags}" ] ; then
echo -n ' allscreens'
for ttyv in /dev/ttyv*
do
vidcontrol <$ttyv ${allscreens_flags}
vidcontrol < ${ttyv} ${allscreens_flags}
done
fi
echo '.'

View File

@ -1,35 +1,35 @@
#!/bin/sh -
#
# $Id: rc.i386,v 1.41 1999/07/11 04:05:45 iwasaki Exp $
# $Id: rc.i386,v 1.42 1999/07/12 17:20:29 iwasaki Exp $
# Do i386 specific processing
#
echo -n 'Initial rc.i386 initialization:'
if [ "X$apm_enable" = X"YES" -o "X$apmd_enable" = X"YES" ] ; then
if [ "${apm_enable}" = "YES" -o "${apmd_enable}" = "YES" ] ; then
echo -n ' apm'
apmconf -e > /dev/null 2>&1
fi
if [ "X$apmd_enable" = X"YES" ] ; then
if [ "${apmd_enable}" = "YES" ] ; then
echo -n ' apmd'; apmd ${apmd_flags}
fi
# Start the SCO binary emulation if requested.
if [ "X${ibcs2_enable}" = X"YES" ]; then
if [ "${ibcs2_enable}" = "YES" ]; then
echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1
fi
# Start the Linux binary emulation if requested.
if [ "X${linux_enable}" = X"YES" ]; then
if [ "${linux_enable}" = "YES" ]; then
echo -n ' linux'; linux > /dev/null 2>&1
fi
# Start the SysVR4 binary emulation if requested.
if [ "X${svr4_enable}" = X"YES" ]; then
if [ "${svr4_enable}" = "YES" ]; then
echo -n ' svr4'; svr4 > /dev/null 2>&1
fi
if [ "X${xtend_enable}" = X"YES" ]; then
if [ "${xtend_enable}" = "YES" ]; then
echo -n ' xtend'; /usr/libexec/xtend
fi
echo '.'
@ -45,22 +45,22 @@ viddev=/dev/ttyv0
echo -n "rc.i386 configuring syscons:"
# keymap
if [ "X${keymap}" != X"NO" ]; then
echo -n ' keymap'; kbdcontrol <${kbddev} -l ${keymap}
if [ "${keymap}" != "NO" ]; then
echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap}
fi
# keyrate
if [ "X${keyrate}" != X"NO" ]; then
echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
if [ "${keyrate}" != "NO" ]; then
echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate}
fi
# keybell
if [ "X${keybell}" != X"NO" ]; then
echo -n ' keybell'; kbdcontrol <${kbddev} -b ${keybell}
if [ "${keybell}" != "NO" ]; then
echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell}
fi
# change function keys
if [ "X${keychange}" != X"NO" ]; then
if [ "${keychange}" != "NO" ]; then
echo -n " keychange"
set - ${keychange}
while [ $# -gt 0 ]
@ -71,63 +71,63 @@ if [ "X${keychange}" != X"NO" ]; then
fi
# cursor type
if [ "X${cursor}" != X"NO" ]; then
echo -n ' cursor'; vidcontrol <${viddev} -c ${cursor}
if [ "${cursor}" != "NO" ]; then
echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor}
fi
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
echo -n ' screen_map'; vidcontrol <${viddev} -l ${scrnmap}
if [ "${scrnmap}" != "NO" ]; then
echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap}
fi
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 ${font8x16}
if [ "${font8x16}" != "NO" ]; then
echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
fi
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 ${font8x14}
if [ "${font8x14}" != "NO" ]; then
echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
fi
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 ${font8x8}
if [ "${font8x8}" != "NO" ]; then
echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
fi
# blank time
if [ "X${blanktime}" != X"NO" ]; then
echo -n ' blank_time'; vidcontrol <${viddev} -t ${blanktime}
if [ "${blanktime}" != "NO" ]; then
echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime}
fi
# screen saver
if [ "X${saver}" != X"NO" ] ; then
if [ "${saver}" != "NO" ] ; then
echo -n ' screensaver'
for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
kldunload $i
kldunload ${i}
done
kldstat -v | grep -q _saver || kldload ${saver}_saver
fi
# mouse daemon
if [ "X${moused_enable}" = X"YES" ] ; then
if [ "${moused_enable}" = "YES" ] ; then
echo -n ' moused'
moused ${moused_flags} -p ${moused_port} -t ${moused_type}
vidcontrol <${viddev} -m on
vidcontrol < ${viddev} -m on
fi
# set this mode for all virtual screens
if [ "X${allscreens_flags}" != X"" ] ; then
if [ -n "${allscreens_flags}" ] ; then
echo -n ' allscreens'
for ttyv in /dev/ttyv*
do
vidcontrol <$ttyv ${allscreens_flags}
vidcontrol < ${ttyv} ${allscreens_flags}
done
fi
echo '.'
# interrupts for /dev/random device
if [ "X${rand_irqs}" != X"NO" ] ; then
if [ "${rand_irqs}" != "NO" ] ; then
echo -n 'entropy IRQs:'
for irq in ${rand_irqs}; do
echo -n " ${irq}" && rndcontrol -q -s ${irq}

View File

@ -1,35 +1,35 @@
#!/bin/sh -
#
# $Id: rc.i386,v 1.41 1999/07/11 04:05:45 iwasaki Exp $
# $Id: rc.i386,v 1.42 1999/07/12 17:20:29 iwasaki Exp $
# Do i386 specific processing
#
echo -n 'Initial rc.i386 initialization:'
if [ "X$apm_enable" = X"YES" -o "X$apmd_enable" = X"YES" ] ; then
if [ "${apm_enable}" = "YES" -o "${apmd_enable}" = "YES" ] ; then
echo -n ' apm'
apmconf -e > /dev/null 2>&1
fi
if [ "X$apmd_enable" = X"YES" ] ; then
if [ "${apmd_enable}" = "YES" ] ; then
echo -n ' apmd'; apmd ${apmd_flags}
fi
# Start the SCO binary emulation if requested.
if [ "X${ibcs2_enable}" = X"YES" ]; then
if [ "${ibcs2_enable}" = "YES" ]; then
echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1
fi
# Start the Linux binary emulation if requested.
if [ "X${linux_enable}" = X"YES" ]; then
if [ "${linux_enable}" = "YES" ]; then
echo -n ' linux'; linux > /dev/null 2>&1
fi
# Start the SysVR4 binary emulation if requested.
if [ "X${svr4_enable}" = X"YES" ]; then
if [ "${svr4_enable}" = "YES" ]; then
echo -n ' svr4'; svr4 > /dev/null 2>&1
fi
if [ "X${xtend_enable}" = X"YES" ]; then
if [ "${xtend_enable}" = "YES" ]; then
echo -n ' xtend'; /usr/libexec/xtend
fi
echo '.'
@ -45,22 +45,22 @@ viddev=/dev/ttyv0
echo -n "rc.i386 configuring syscons:"
# keymap
if [ "X${keymap}" != X"NO" ]; then
echo -n ' keymap'; kbdcontrol <${kbddev} -l ${keymap}
if [ "${keymap}" != "NO" ]; then
echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap}
fi
# keyrate
if [ "X${keyrate}" != X"NO" ]; then
echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
if [ "${keyrate}" != "NO" ]; then
echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate}
fi
# keybell
if [ "X${keybell}" != X"NO" ]; then
echo -n ' keybell'; kbdcontrol <${kbddev} -b ${keybell}
if [ "${keybell}" != "NO" ]; then
echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell}
fi
# change function keys
if [ "X${keychange}" != X"NO" ]; then
if [ "${keychange}" != "NO" ]; then
echo -n " keychange"
set - ${keychange}
while [ $# -gt 0 ]
@ -71,63 +71,63 @@ if [ "X${keychange}" != X"NO" ]; then
fi
# cursor type
if [ "X${cursor}" != X"NO" ]; then
echo -n ' cursor'; vidcontrol <${viddev} -c ${cursor}
if [ "${cursor}" != "NO" ]; then
echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor}
fi
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
echo -n ' screen_map'; vidcontrol <${viddev} -l ${scrnmap}
if [ "${scrnmap}" != "NO" ]; then
echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap}
fi
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 ${font8x16}
if [ "${font8x16}" != "NO" ]; then
echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
fi
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 ${font8x14}
if [ "${font8x14}" != "NO" ]; then
echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
fi
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 ${font8x8}
if [ "${font8x8}" != "NO" ]; then
echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
fi
# blank time
if [ "X${blanktime}" != X"NO" ]; then
echo -n ' blank_time'; vidcontrol <${viddev} -t ${blanktime}
if [ "${blanktime}" != "NO" ]; then
echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime}
fi
# screen saver
if [ "X${saver}" != X"NO" ] ; then
if [ "${saver}" != "NO" ] ; then
echo -n ' screensaver'
for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
kldunload $i
kldunload ${i}
done
kldstat -v | grep -q _saver || kldload ${saver}_saver
fi
# mouse daemon
if [ "X${moused_enable}" = X"YES" ] ; then
if [ "${moused_enable}" = "YES" ] ; then
echo -n ' moused'
moused ${moused_flags} -p ${moused_port} -t ${moused_type}
vidcontrol <${viddev} -m on
vidcontrol < ${viddev} -m on
fi
# set this mode for all virtual screens
if [ "X${allscreens_flags}" != X"" ] ; then
if [ -n "${allscreens_flags}" ] ; then
echo -n ' allscreens'
for ttyv in /dev/ttyv*
do
vidcontrol <$ttyv ${allscreens_flags}
vidcontrol < ${ttyv} ${allscreens_flags}
done
fi
echo '.'
# interrupts for /dev/random device
if [ "X${rand_irqs}" != X"NO" ] ; then
if [ "${rand_irqs}" != "NO" ] ; then
echo -n 'entropy IRQs:'
for irq in ${rand_irqs}; do
echo -n " ${irq}" && rndcontrol -q -s ${irq}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: pccard_ether,v 1.10 1999/02/10 18:08:16 jkh Exp $
# $Id: pccard_ether,v 1.11 1999/02/22 02:55:18 steve Exp $
#
# pccard_ether interfacename [ifconfig option]
#
@ -14,8 +14,8 @@ elif [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
if [ "x$pccard_ifconfig" != "xNO" ] ; then
if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
if [ "${pccard_ifconfig}" != "NO" ] ; then
if [ "${pccard_ifconfig}" = "DHCP" ] ; then
if [ -f /sbin/dhclient ] ; then
if [ -s /var/run/dhclient.pid ] ; then
kill `cat /var/run/dhclient.pid`
@ -34,17 +34,17 @@ if [ "x$pccard_ifconfig" != "xNO" ] ; then
else
interface=$1
shift
ifconfig $interface $pccard_ifconfig $*
ifconfig ${interface} ${pccard_ifconfig} $*
fi
fi
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
# flush beforehand, just in case....
route -n flush
arp -d -a

108
etc/rc
View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: rc,v 1.192 1999/08/06 06:20:19 peter Exp $
# $Id: rc,v 1.193 1999/08/06 06:22:43 peter Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@ -45,15 +45,15 @@ if [ -f /etc/ccd.conf ]; then
ccdconfig -C
fi
if [ X$start_vinum = XYES ]; then
if [ "${start_vinum}" = "YES" ]; then
vinum start
elif [ -n "$vinum_drives" ]; then
vinum read $vinum_drives
elif [ -n "${vinum_drives}" ]; then
vinum read ${vinum_drives}
fi
swapon -a
if [ $1x = autobootx ]; then
if [ "$1" = "autoboot" ]; then
echo Automatic reboot in progress...
fsck -p
case $? in
@ -95,7 +95,7 @@ trap "echo 'Reboot interrupted'; exit 1" 3
# diskless boot it does not have to be.
#
if [ "X$root_rw_mount" != "XNO" ]; then
if [ "${root_rw_mount}" != "NO" ]; then
mount -u -o rw /
fi
@ -106,7 +106,7 @@ fi
umount -a >/dev/null 2>&1
if [ "X$early_nfs_mounts" != "XYES" ]; then
if [ "${early_nfs_mounts}" != "YES" ]; then
mount -a -t nonfs
else
mount -a
@ -119,9 +119,9 @@ fi
# Run custom disk mounting function here
#
if [ "X$diskless_mount" != "X" ]; then
if [ -f $diskless_mount ]; then
sh $diskless_mount
if [ -n "${diskless_mount}" ]; then
if [ -f "${diskless_mount}" ]; then
sh ${diskless_mount}
fi
fi
@ -148,9 +148,9 @@ if [ -d /var/run -a -d /var/spool/lock -a -d /var/spool/uucp/.Temp ]; then
fi
# Add additional swapfile, if configured.
if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
echo "Adding $swapfile as additional swap."
vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
if [ "${swapfile}" != "NO" -a -w "${swapfile}" -a -b /dev/vn0b ]; then
echo "Adding ${swapfile} as additional swap."
vnconfig /dev/vn0b ${swapfile} && swapon /dev/vn0b
fi
# set sysctl variables early as we can
@ -195,7 +195,7 @@ rm /var/run/clean_var
#
# See also the example of another cleanup policy in /etc/periodic/daily.
#
if [ "X${clear_tmp_enable}" = X"YES" ]; then
if [ "${clear_tmp_enable}" = "YES" ]; then
echo clearing /tmp
# prune quickly with one rm, then use find to clean up /tmp/[lq]*
@ -217,7 +217,7 @@ echo -n 'additional daemons:'
# start system logging and name service (named needs to start before syslogd
# if you don't have a /etc/resolv.conf)
#
if [ "X${syslogd_enable}" = X"YES" ]; then
if [ "${syslogd_enable}" = "YES" ]; then
# Transitional symlink (for the next couple of years :) until all
# binaries had a chance to move towards /var/run/log.
if [ ! -h /dev/log ] ; then
@ -233,21 +233,21 @@ echo '.'
# enable dumpdev so that savecore can see it
# /var/crash should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} -a -d /var/crash ]; then
if [ "${dumpdev}" != "NO" -a -e ${dumpdev} -a -d /var/crash ]; then
dumpon ${dumpdev}
echo -n checking for core dump...
savecore /var/crash
fi
if [ -n "$network_pass1_done" ]; then
if [ -n "${network_pass1_done}" ]; then
network_pass2
fi
# Enable/Check the quotas (must be after ypbind if using NIS)
if [ "X${enable_quotas}" = X"YES" ]; then
if [ "${enable_quotas}" = "YES" ]; then
# Only check quotas if they have been previously enabled, and requested
if [ "X${check_quotas}" = X"YES" ]; then
if [ "${check_quotas}" = "YES" ]; then
echo -n 'checking quotas:'
quotacheck -a
echo ' done.'
@ -258,7 +258,7 @@ if [ "X${enable_quotas}" = X"YES" ]; then
echo ' done.'
fi
if [ -n "$network_pass2_done" ]; then
if [ -n "${network_pass2_done}" ]; then
network_pass3
fi
@ -274,7 +274,7 @@ then
"password file may be incorrect -- /etc/ptmp exists"
fi
if [ "X${accounting_enable}" = X"YES" -a -d /var/account ]; then
if [ "${accounting_enable}" = "YES" -a -d /var/account ]; then
echo 'turning on accounting'
if [ ! -e /var/account/acct ]; then
touch /var/account/acct
@ -285,11 +285,11 @@ fi
# Make shared lib searching a little faster. Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
if [ X"`/usr/bin/objformat`" = X"elf" ]; then
if [ "`/usr/bin/objformat`" = "elf" ]; then
_LDC=/usr/lib
for i in $ldconfig_paths; do
if test -d $i; then
_LDC="${_LDC} $i"
for i in ${ldconfig_paths}; do
if test -d ${i}; then
_LDC="${_LDC} ${i}"
fi
done
echo 'setting ELF ldconfig path:' ${_LDC}
@ -297,13 +297,13 @@ if [ -x /sbin/ldconfig ]; then
fi
# Legacy aout support for i386 only
if [ X"`sysctl -n hw.machine`" = X"i386" ]; then
if [ "`sysctl -n hw.machine`" = "i386" ]; then
# Default the a.out ldconfig path.
: ${ldconfig_paths_aout=${ldconfig_paths}}
_LDC=/usr/lib/aout
for i in $ldconfig_paths_aout; do
if test -d $i; then
_LDC="${_LDC} $i"
for i in ${ldconfig_paths_aout}; do
if test -d ${i}; then
_LDC="${_LDC} ${i}"
fi
done
echo 'setting a.out ldconfig path:' ${_LDC}
@ -314,23 +314,23 @@ fi
# Now start up miscellaneous daemons that don't belong anywhere else
#
echo -n starting standard daemons:
if [ "X${inetd_enable}" != X"NO" ]; then
if [ "${inetd_enable}" != "NO" ]; then
echo -n ' inetd'; inetd ${inetd_flags}
fi
if [ "X${cron_enable}" != X"NO" ]; then
if [ "${cron_enable}" != "NO" ]; then
echo -n ' cron'; cron
fi
if [ "X${lpd_enable}" = X"YES" ]; then
if [ "${lpd_enable}" = "YES" ]; then
echo -n ' printer'; ${lpd_program} ${lpd_flags}
fi
if [ "X${sendmail_enable}" = X"YES" -a -r /etc/sendmail.cf ]; then
if [ "${sendmail_enable}" = "YES" -a -r /etc/sendmail.cf ]; then
echo -n ' sendmail'; /usr/sbin/sendmail ${sendmail_flags}
fi
if [ "X${usbd_enable}" = X"YES" ]; then
if [ "${usbd_enable}" = "YES" ]; then
echo -n ' usbd'; /usr/sbin/usbd ${usbd_flags}
fi
@ -344,39 +344,39 @@ fi
# Recover vi editor files.
vibackup=`echo /var/tmp/vi.recover/vi.*`
if [ "$vibackup" != '/var/tmp/vi.recover/vi.*' ]; then
if [ "${vibackup}" != '/var/tmp/vi.recover/vi.*' ]; then
echo 'Recovering vi editor sessions'
for i in $vibackup; do
for i in ${vibackup}; do
# Only test files that are readable.
if test ! -r $i; then
if test ! -r ${i}; then
continue
fi
# Unmodified nvi editor backup files either have the
# execute bit set or are zero length. Delete them.
if test -x $i -o ! -s $i; then
rm -f $i
if test -x ${i} -o ! -s ${i}; then
rm -f ${i}
fi
done
# It is possible to get incomplete recovery files, if the editor
# crashes at the right time.
virecovery=`echo /var/tmp/vi.recover/recover.*`
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
for i in $virecovery; do
if [ "${virecovery}" != "/var/tmp/vi.recover/recover.*" ]; then
for i in ${virecovery}; do
# Only test files that are readable.
if test ! -r $i; then
if test ! -r ${i}; then
continue
fi
# Delete any recovery files that are zero length,
# corrupted, or that have no corresponding backup file.
# Else send mail to the user.
recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
if test -n "$recfile" -a -s "$recfile"; then
sendmail -t < $i
recfile=`awk '/^X-vi-recover-path:/{print $2}' < ${i}`
if test -n "${recfile}" -a -s "${recfile}"; then
sendmail -t < ${i}
else
rm -f $i
rm -f ${i}
fi
done
fi
@ -388,7 +388,7 @@ if [ ! -f /var/msgs/bounds ]; then
fi
# for each valid dir in $local_startup, search for init scripts matching *.sh
if [ "X${local_startup}" != X"NO" ]; then
if [ "${local_startup}" != "NO" ]; then
echo -n 'Local package initialization:'
for dir in ${local_startup}; do
[ -d ${dir} ] && for script in ${dir}/*.sh; do
@ -399,16 +399,16 @@ if [ "X${local_startup}" != X"NO" ]; then
echo .
fi
if [ "X${update_motd}" != X"NO" ]; then
if [ "${update_motd}" != "NO" ]; then
T=`mktemp /tmp/_motd.XXXXXX`
if [ $? -eq 0 ]; then
uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
cmp -s $T /etc/motd || {
cp $T /etc/motd
uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T}
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T}
cmp -s ${T} /etc/motd || {
cp ${T} /etc/motd
chmod 644 /etc/motd
}
rm -f $T
rm -f ${T}
fi
fi
@ -437,7 +437,7 @@ fi
# Raise kernel security level. This should be done only after `fsck' has
# repaired local file systems if you want the securelevel to be greater than 1.
if [ "X${kern_securelevel_enable}" = X"YES" -a "${kern_securelevel}" -ge 0 ];
if [ "${kern_securelevel_enable}" = "YES" -a "${kern_securelevel}" -ge 0 ];
then
echo 'Raising kernel security level'
sysctl -w kern.securelevel=${kern_securelevel}

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -3,7 +3,7 @@
# ATM networking startup script
#
# $Id$
# $Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
#
# Initial interface configuration.
@ -122,7 +122,7 @@ atm_pass2() {
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${scsparp_args}" = "YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
@ -135,7 +135,7 @@ atm_pass2() {
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
if [ -n "${atm_pvcs}" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
@ -143,7 +143,7 @@ atm_pass2() {
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
if [ -n "${atm_arps}" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
@ -157,7 +157,7 @@ atm_pass2() {
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
if [ "${atm_scspd}" -eq 1 ]; then
echo -n " scspd"
scspd
fi

View File

@ -57,9 +57,9 @@ chkerr $? "mount of /usr"
#
bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'`
bootp_ipa=`ifconfig $bootp_ifc | fgrep inet | head -1 | awk '{ print $2; }'`
bootp_ipa=`ifconfig ${bootp_ifc} | fgrep inet | head -1 | awk '{ print $2; }'`
echo "Interface $bootp_ifc IP-Address $bootp_ipa"
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa}"
umount /usr
@ -97,4 +97,3 @@ sysctl -w kern.bootfile=/conf/ME/kernel
# system /etc/rc.diskless2
diskless_mount="/etc/rc.diskless2"

View File

@ -6,11 +6,11 @@
#
# last edit-date: [Mon Mar 8 12:15:56 1999]
#
# $Id: rc.isdn,v 1.1 1999/01/13 08:20:55 hm Exp $
# $Id: rc.isdn,v 1.2 1999/03/08 11:28:45 hm Exp $
#
#---------------------------------------------------------------------------
if [ "X${isdn_enable}" = X"YES" ] ; then
if [ "${isdn_enable}" = "YES" ] ; then
echo -n 'ISDN subsystem setup:'
@ -24,14 +24,14 @@ if [ "X${isdn_enable}" = X"YES" ] ; then
fi
fi
if [ "X${isdn_flags}" = X"NO" ] ; then
if [ "${isdn_flags}" = "NO" ] ; then
isdn_flags=""
fi
# start the isdn daemon
if [ -x /usr/sbin/isdnd ] ; then
echo -n ' isdnd'
if [ "X${isdn_fsdev}" = X"NO" ] ; then
if [ "${isdn_fsdev}" = "NO" ] ; then
/usr/sbin/isdnd ${isdn_flags}
else
/usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype}
@ -39,7 +39,7 @@ if [ "X${isdn_enable}" = X"YES" ] ; then
fi
# start isdntrace
if [ "X${isdn_trace}" = X"YES" -a -x /usr/sbin/isdntrace ] ; then
if [ "${isdn_trace}" = "YES" -a -x /usr/sbin/isdntrace ] ; then
echo -n ' isdntrace'
nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,16 +1,16 @@
#!/bin/sh -
# PC-card startup script
# $Id: rc.pccard,v 1.15 1999/07/07 01:26:55 hosokawa Exp $
# $Id: rc.pccard,v 1.16 1999/07/26 01:08:16 obrien Exp $
if [ "X$pccard_enable" = X"YES" ] ; then
if [ "x$pccard_mem" != "xDEFAULT" ] ; then
pccardc pccardmem $pccard_mem
if [ "${pccard_enable}" = "YES" ] ; then
if [ "${pccard_mem}" != "DEFAULT" ] ; then
pccardc pccardmem ${pccard_mem}
else
pccardc pccardmem 0xd0000
fi
if [ "X$pccard_conf" != "X" ] ; then
pccardd_flags="$pccardd_flags -f $pccard_conf"
if [ -n "${pccard_conf}" ] ; then
pccardd_flags="${pccardd_flags} -f ${pccard_conf}"
fi
echo -n "Enable PC-card."
pccardd $pccardd_flags 2>&1 > /var/log/pccardd.debug
pccardd ${pccardd_flags} 2>&1 > /var/log/pccardd.debug
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: rc.serial,v 1.10 1998/03/13 13:33:09 danny Exp $
# $Id: rc.serial,v 1.11 1998/03/13 22:03:03 danny Exp $
# Change some defaults for serial devices.
# Standard defaults are:
@ -20,11 +20,11 @@ default() {
for i in $*
do
comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
stty </dev/cual$co$i -clocal -crtscts -hupcl 0
comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0
stty < /dev/ttyi${ci}${i} -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/ttyl${ci}${i} -clocal -crtscts -hupcl 0
stty < /dev/cuai${co}${i} -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/cual${co}${i} -clocal -crtscts -hupcl 0
done
}
@ -37,14 +37,14 @@ maybe() {
for i in $*
do
# Don't use ^R; it breaks bash's ^R when typed ahead.
stty </dev/ttyi$ci$i reprint undef
stty </dev/cuai$co$i reprint undef
stty < /dev/ttyi${ci}${i} reprint undef
stty < /dev/cuai${co}${i} reprint undef
# Lock clocal off on dialin device for security.
stty </dev/ttyl$ci$i clocal
stty < /dev/ttyl${ci}${i} clocal
# Lock the speeds to use old binaries that don't support them.
# Any legal speed works to lock the initial speed.
stty </dev/ttyl$ci$i 300
stty </dev/cual$co$i 300
stty < /dev/ttyl${ci}${i} 300
stty < /dev/cual${co}${i} 300
done
}
@ -57,13 +57,13 @@ modem() {
for i in $*
do
# may depend on modem
comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
comcontrol /dev/tty${ci}${i} dtrwait 100 drainwait 180
# Lock crtscts on.
# Speed reasonable for V42bis.
stty </dev/ttyi$ci$i crtscts 57600
stty </dev/ttyl$ci$i crtscts
stty </dev/cuai$co$i crtscts 57600
stty </dev/cual$co$i crtscts
stty < /dev/ttyi${ci}${i} crtscts 57600
stty < /dev/ttyl${ci}${i} crtscts
stty < /dev/cuai${co}${i} crtscts 57600
stty < /dev/cual${co}${i} crtscts
done
}
@ -77,10 +77,10 @@ mouse() {
do
# Lock clocal on, hupcl off.
# Standard speed for Microsoft mouse.
stty </dev/ttyi$ci$i clocal -hupcl 1200
stty </dev/ttyl$ci$i clocal hupcl
stty </dev/cuai$co$i clocal -hupcl 1200
stty </dev/cual$co$i clocal hupcl
stty < /dev/ttyi${ci}${i} clocal -hupcl 1200
stty < /dev/ttyl${ci}${i} clocal hupcl
stty < /dev/cuai${co}${i} clocal -hupcl 1200
stty < /dev/cual${co}${i} clocal hupcl
done
}
@ -95,12 +95,12 @@ terminal() {
ci=$1; shift
co=$1; shift
modem $ci $co $*
modem ${ci} ${co} $*
for i in $*
do
comcontrol /dev/tty$ci$i dtrwait 0
stty </dev/ttyi$ci$i 115200
stty </dev/cuai$co$i 115200
comcontrol /dev/tty${ci}${i} dtrwait 0
stty < /dev/ttyi${ci}${i} 115200
stty < /dev/cuai${co}${i} 115200
done
}

View File

@ -2,12 +2,12 @@
#
# Read in /etc/sysctl.conf and set things accordingly
#
# $Id:$
# $Id: rc.sysctl,v 1.1 1999/03/28 20:36:03 imp Exp $
if [ -f /etc/sysctl.conf ]; then
3< /etc/sysctl.conf
while read 0<&3 var;
do
sysctl -w $var
sysctl -w ${var}
done
3<&-
fi

View File

@ -57,9 +57,9 @@ chkerr $? "mount of /usr"
#
bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'`
bootp_ipa=`ifconfig $bootp_ifc | fgrep inet | head -1 | awk '{ print $2; }'`
bootp_ipa=`ifconfig ${bootp_ifc} | fgrep inet | head -1 | awk '{ print $2; }'`
echo "Interface $bootp_ifc IP-Address $bootp_ipa"
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa}"
umount /usr
@ -97,4 +97,3 @@ sysctl -w kern.bootfile=/conf/ME/kernel
# system /etc/rc.diskless2
diskless_mount="/etc/rc.diskless2"

View File

@ -1,6 +1,6 @@
############
# Setup system for firewall service.
# $Id: rc.firewall,v 1.19 1998/04/25 00:40:55 alex Exp $
# $Id: rc.firewall,v 1.20 1999/02/10 18:08:16 jkh Exp $
# Suck in the configuration variables.
if [ -f /etc/defaults/rc.conf ]; then
@ -44,13 +44,13 @@ fi
# http://www.awl.com/
#
if [ "x$1" != "x" ]; then
if [ -n "$1" ]; then
firewall_type=$1
fi
############
# Set quiet mode if requested
if [ "x$firewall_quiet" = "xYES" ]; then
if [ "${firewall_quiet}" = "YES" ]; then
fwcmd="/sbin/ipfw -q"
else
fwcmd="/sbin/ipfw"
@ -58,15 +58,15 @@ fi
############
# Flush out the list before we begin.
$fwcmd -f flush
${fwcmd} -f flush
############
# These rules are required for using natd. All packets are passed to
# natd before they encounter your remaining rules. The firewall rules
# will then be run again on each packet after translation by natd,
# minus any divert rules (see natd(8)).
if [ "X${natd_enable}" = X"YES" -a "X${natd_interface}" != X"" ]; then
$fwcmd add divert natd all from any to any via ${natd_interface}
if [ "${natd_enable}" = "YES" -a "${natd_interface}" != "X" ]; then
${fwcmd} add divert natd all from any to any via ${natd_interface}
fi
############
@ -75,18 +75,18 @@ fi
# they you will want to change the default policy to open. You can also
# do this as your only action by setting the firewall_type to ``open''.
# $fwcmd add 65000 pass all from any to any
# ${fwcmd} add 65000 pass all from any to any
############
# Only in rare cases do you want to change these rules
$fwcmd add 100 pass all from any to any via lo0
$fwcmd add 200 deny all from any to 127.0.0.0/8
${fwcmd} add 100 pass all from any to any via lo0
${fwcmd} add 200 deny all from any to 127.0.0.0/8
# Prototype setups.
if [ "${firewall_type}" = "open" -o "${firewall_type}" = "OPEN" ]; then
$fwcmd add 65000 pass all from any to any
${fwcmd} add 65000 pass all from any to any
elif [ "${firewall_type}" = "client" ]; then
@ -101,28 +101,28 @@ elif [ "${firewall_type}" = "client" ]; then
ip="192.168.4.17"
# Allow any traffic to or from my own net.
$fwcmd add pass all from ${ip} to ${net}:${mask}
$fwcmd add pass all from ${net}:${mask} to ${ip}
${fwcmd} add pass all from ${ip} to ${net}:${mask}
${fwcmd} add pass all from ${net}:${mask} to ${ip}
# Allow TCP through if setup succeeded
$fwcmd add pass tcp from any to any established
${fwcmd} add pass tcp from any to any established
# Allow setup of incoming email
$fwcmd add pass tcp from any to ${ip} 25 setup
${fwcmd} add pass tcp from any to ${ip} 25 setup
# Allow setup of outgoing TCP connections only
$fwcmd add pass tcp from ${ip} to any setup
${fwcmd} add pass tcp from ${ip} to any setup
# Disallow setup of all other TCP connections
$fwcmd add deny tcp from any to any setup
${fwcmd} add deny tcp from any to any setup
# Allow DNS queries out in the world
$fwcmd add pass udp from any 53 to ${ip}
$fwcmd add pass udp from ${ip} to any 53
${fwcmd} add pass udp from any 53 to ${ip}
${fwcmd} add pass udp from ${ip} to any 53
# Allow NTP queries out in the world
$fwcmd add pass udp from any 123 to ${ip}
$fwcmd add pass udp from ${ip} to any 123
${fwcmd} add pass udp from any 123 to ${ip}
${fwcmd} add pass udp from ${ip} to any 123
# Everything else is denied as default.
@ -147,45 +147,45 @@ elif [ "${firewall_type}" = "simple" ]; then
iip="192.168.3.17"
# Stop spoofing
$fwcmd add deny all from ${inet}:${imask} to any in via ${oif}
$fwcmd add deny all from ${onet}:${omask} to any in via ${iif}
${fwcmd} add deny all from ${inet}:${imask} to any in via ${oif}
${fwcmd} add deny all from ${onet}:${omask} to any in via ${iif}
# Stop RFC1918 nets on the outside interface
$fwcmd add deny all from 192.168.0.0:255.255.0.0 to any via ${oif}
$fwcmd add deny all from any to 192.168.0.0:255.255.0.0 via ${oif}
$fwcmd add deny all from 172.16.0.0:255.240.0.0 to any via ${oif}
$fwcmd add deny all from any to 172.16.0.0:255.240.0.0 via ${oif}
$fwcmd add deny all from 10.0.0.0:255.0.0.0 to any via ${oif}
$fwcmd add deny all from any to 10.0.0.0:255.0.0.0 via ${oif}
${fwcmd} add deny all from 192.168.0.0:255.255.0.0 to any via ${oif}
${fwcmd} add deny all from any to 192.168.0.0:255.255.0.0 via ${oif}
${fwcmd} add deny all from 172.16.0.0:255.240.0.0 to any via ${oif}
${fwcmd} add deny all from any to 172.16.0.0:255.240.0.0 via ${oif}
${fwcmd} add deny all from 10.0.0.0:255.0.0.0 to any via ${oif}
${fwcmd} add deny all from any to 10.0.0.0:255.0.0.0 via ${oif}
# Allow TCP through if setup succeeded
$fwcmd add pass tcp from any to any established
${fwcmd} add pass tcp from any to any established
# Allow setup of incoming email
$fwcmd add pass tcp from any to ${oip} 25 setup
${fwcmd} add pass tcp from any to ${oip} 25 setup
# Allow access to our DNS
$fwcmd add pass tcp from any to ${oip} 53 setup
${fwcmd} add pass tcp from any to ${oip} 53 setup
# Allow access to our WWW
$fwcmd add pass tcp from any to ${oip} 80 setup
${fwcmd} add pass tcp from any to ${oip} 80 setup
# Reject&Log all setup of incoming connections from the outside
$fwcmd add deny log tcp from any to any in via ${oif} setup
${fwcmd} add deny log tcp from any to any in via ${oif} setup
# Allow setup of any other TCP connection
$fwcmd add pass tcp from any to any setup
${fwcmd} add pass tcp from any to any setup
# Allow DNS queries out in the world
$fwcmd add pass udp from any 53 to ${oip}
$fwcmd add pass udp from ${oip} to any 53
${fwcmd} add pass udp from any 53 to ${oip}
${fwcmd} add pass udp from ${oip} to any 53
# Allow NTP queries out in the world
$fwcmd add pass udp from any 123 to ${oip}
$fwcmd add pass udp from ${oip} to any 123
${fwcmd} add pass udp from any 123 to ${oip}
${fwcmd} add pass udp from ${oip} to any 123
# Everything else is denied as default.
elif [ "${firewall_type}" != "UNKNOWN" -a -r "${firewall_type}" ]; then
$fwcmd ${firewall_type}
${fwcmd} ${firewall_type}
fi

View File

@ -57,9 +57,9 @@ chkerr $? "mount of /usr"
#
bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'`
bootp_ipa=`ifconfig $bootp_ifc | fgrep inet | head -1 | awk '{ print $2; }'`
bootp_ipa=`ifconfig ${bootp_ifc} | fgrep inet | head -1 | awk '{ print $2; }'`
echo "Interface $bootp_ifc IP-Address $bootp_ipa"
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa}"
umount /usr
@ -97,4 +97,3 @@ sysctl -w kern.bootfile=/conf/ME/kernel
# system /etc/rc.diskless2
diskless_mount="/etc/rc.diskless2"

View File

@ -6,11 +6,11 @@
#
# last edit-date: [Mon Mar 8 12:15:56 1999]
#
# $Id: rc.isdn,v 1.1 1999/01/13 08:20:55 hm Exp $
# $Id: rc.isdn,v 1.2 1999/03/08 11:28:45 hm Exp $
#
#---------------------------------------------------------------------------
if [ "X${isdn_enable}" = X"YES" ] ; then
if [ "${isdn_enable}" = "YES" ] ; then
echo -n 'ISDN subsystem setup:'
@ -24,14 +24,14 @@ if [ "X${isdn_enable}" = X"YES" ] ; then
fi
fi
if [ "X${isdn_flags}" = X"NO" ] ; then
if [ "${isdn_flags}" = "NO" ] ; then
isdn_flags=""
fi
# start the isdn daemon
if [ -x /usr/sbin/isdnd ] ; then
echo -n ' isdnd'
if [ "X${isdn_fsdev}" = X"NO" ] ; then
if [ "${isdn_fsdev}" = "NO" ] ; then
/usr/sbin/isdnd ${isdn_flags}
else
/usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype}
@ -39,7 +39,7 @@ if [ "X${isdn_enable}" = X"YES" ] ; then
fi
# start isdntrace
if [ "X${isdn_trace}" = X"YES" -a -x /usr/sbin/isdntrace ] ; then
if [ "${isdn_trace}" = "YES" -a -x /usr/sbin/isdntrace ] ; then
echo -n ' isdntrace'
nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.54 1999/08/19 21:15:16 brian Exp $
# $Id: rc.network,v 1.55 1999/08/22 23:26:03 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -14,25 +14,25 @@ network_pass1() {
echo -n 'Doing initial network setup:'
# Set the host name if it is not already set
if [ -z "`hostname -s`" ] ; then
hostname $hostname
hostname ${hostname}
echo -n ' hostname'
fi
# Set the domainname if we're using NIS
if [ -n "$nisdomainname" -a "x$nisdomainname" != "xNO" ] ; then
domainname $nisdomainname
if [ -n "${nisdomainname}" -a "${nisdomainname}" != "NO" ] ; then
domainname ${nisdomainname}
echo -n ' domain'
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
if [ "${atm_enable}" = "YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# ISDN subsystem startup
if [ "X${isdn_enable}" = X"YES" -a -f /etc/rc.isdn ]; then
if [ "${isdn_enable}" = "YES" -a -f /etc/rc.isdn ]; then
. /etc/rc.isdn
fi
@ -51,7 +51,7 @@ network_pass1() {
done
# Set up all the network interfaces, calling startup scripts if needed
if [ "x${network_interfaces}" = "xauto" ]; then
if [ "${network_interfaces}" = "auto" ]; then
network_interfaces="`ifconfig -l`"
fi
for ifn in ${network_interfaces}; do
@ -64,7 +64,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
# See if we are using DHCP
if [ X"${ifconfig_args}" = X"DHCP" ]; then
if [ "${ifconfig_args}" = "XDHCP" ]; then
${dhcp_program} ${dhcp_flags} ${ifn}
else
ifconfig ${ifn} ${ifconfig_args}
@ -97,16 +97,16 @@ network_pass1() {
done
# Warm up user ppp if required, must happen before natd.
if [ "X$ppp_enable" = X"YES" ]; then
if [ "${ppp_enable}" = "YES" ]; then
# Establish ppp mode.
if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
-a "X$ppp_mode" != X"dedicated" ]; then \
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" ]; then \
ppp_mode="auto";
fi
ppp_command="-${ppp_mode} ";
# Switch on alias mode?
if [ "X$ppp_nat" = X"YES" ]; then
if [ "${ppp_nat}" = "YES" ]; then
ppp_command="${ppp_command} -nat";
fi
@ -122,7 +122,7 @@ network_pass1() {
firewall_in_kernel=0
fi
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
if [ ${firewall_in_kernel} = 0 -a "${firewall_enable}" = "YES" ] ; then
if kldload ipfw; then
firewall_in_kernel=1 # module loaded successfully
echo "Kernel firewall module loaded."
@ -132,16 +132,16 @@ network_pass1() {
fi
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
if [ ${firewall_in_kernel} = 1 ]; then
if [ -z "${firewall_script}" ] ; then
firewall_script="/etc/rc.firewall"
fi
if [ -f ${firewall_script} -a X"$firewall_enable" = X"YES" ]; then
if [ -f ${firewall_script} -a "${firewall_enable}" = "YES" ]; then
. ${firewall_script}
echo -n 'Firewall rules loaded, starting divert daemons:'
# Network Address Translation daemon
if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
if [ "${natd_enable}" = "YES" -a -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
natd_ifarg="-a ${natd_interface}"
@ -153,7 +153,7 @@ network_pass1() {
echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
if [ "${IPFW_DEFAULT}" = "65535 deny ip from any to any" ]; then
echo -n "Warning: kernel has firewall functionality, "
echo "but firewall rules are not enabled."
echo " All ip services are disabled."
@ -168,13 +168,13 @@ network_pass1() {
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes. This should be done before router discovery.
if [ "x${static_routes}" != "x" ]; then
if [ -n "${static_routes}" ]; then
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
@ -182,78 +182,78 @@ network_pass1() {
fi
echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
if [ -n "${tcp_extensions}" -a "${tcp_extensions}" != "YES" ] ; then
echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
if [ -n "${log_in_vain}" -a "${log_in_vain}" != "NO" ] ; then
echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then
if [ "${icmp_bmcastecho}" = "YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi
if [ "X$icmp_drop_redirect" = X"YES" ]; then
if [ "${icmp_drop_redirect}" = "YES" ]; then
echo -n ' ignore ICMP redirect=YES'
sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null
fi
if [ "X$icmp_log_redirect" = X"YES" ]; then
if [ "${icmp_log_redirect}" = "YES" ]; then
echo -n ' log ICMP redirect=YES'
sysctl -w net.inet.icmp.log_redirect=1 >/dev/null
fi
if [ "X$gateway_enable" = X"YES" ]; then
if [ "${gateway_enable}" = "YES" ]; then
echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi
if [ "X$forward_sourceroute" = X"YES" ]; then
if [ "${forward_sourceroute}" = "YES" ]; then
echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi
if [ "X$accept_sourceroute" = X"YES" ]; then
if [ "${accept_sourceroute}" = "YES" ]; then
echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi
if [ "X$tcp_keepalive" = X"YES" ]; then
if [ "${tcp_keepalive}" = "YES" ]; then
echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi
if [ "X$ipxgateway_enable" = X"YES" ]; then
if [ "${ipxgateway_enable}" = "YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi
if [ "X$arpproxy_all" = X"YES" ]; then
if [ "${arpproxy_all}" = "YES" ]; then
echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi
echo '.'
echo -n 'routing daemons:'
if [ "X$router_enable" = X"YES" ]; then
if [ "${router_enable}" = "YES" ]; then
echo -n " ${router}"; ${router} ${router_flags}
fi
if [ "X$ipxrouted_enable" = X"YES" ]; then
if [ "${ipxrouted_enable}" = "YES" ]; then
echo -n ' IPXrouted'
IPXrouted ${ipxrouted_flags} > /dev/null 2>&1
fi
if [ "X${mrouted_enable}" = X"YES" ]; then
if [ "${mrouted_enable}" = "YES" ]; then
echo -n ' mrouted'; mrouted ${mrouted_flags}
fi
if [ "X$rarpd_enable" = X"YES" ]; then
if [ "${rarpd_enable}" = "YES" ]; then
echo -n ' rarpd'; rarpd ${rarpd_flags}
fi
echo '.'
@ -262,54 +262,54 @@ network_pass1() {
network_pass2() {
echo -n 'Doing additional network setup:'
if [ "X${named_enable}" = X"YES" ]; then
if [ "${named_enable}" = "YES" ]; then
echo -n ' named'; ${named_program-"named"} ${named_flags}
fi
if [ "X${ntpdate_enable}" = X"YES" ]; then
if [ "${ntpdate_enable}" = "YES" ]; then
echo -n ' ntpdate'; ${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
fi
if [ "X${xntpd_enable}" = X"YES" ]; then
if [ "${xntpd_enable}" = "YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
if [ "X${timed_enable}" = X"YES" ]; then
if [ "${timed_enable}" = "YES" ]; then
echo -n ' timed'; timed ${timed_flags}
fi
if [ "X${portmap_enable}" = X"YES" ]; then
if [ "${portmap_enable}" = "YES" ]; then
echo -n ' portmap'; ${portmap_program} ${portmap_flags}
fi
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_server_enable}" = X"YES" ]; then
if [ "${nis_server_enable}" = "YES" ]; then
echo -n ' ypserv'; ypserv ${nis_server_flags}
if [ "X${nis_ypxfrd_enable}" = X"YES" ]; then
if [ "${nis_ypxfrd_enable}" = "YES" ]; then
echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${nis_ypxfrd_flags}
fi
if [ "X${nis_yppasswdd_enable}" = X"YES" ]; then
if [ "${nis_yppasswdd_enable}" = "YES" ]; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${nis_yppasswdd_flags}
fi
fi
# Start ypbind if we're an NIS client
if [ "X${nis_client_enable}" = X"YES" ]; then
if [ "${nis_client_enable}" = "YES" ]; then
echo -n ' ypbind'; ypbind ${nis_client_flags}
if [ "X${nis_ypset_enable}" = X"YES" ]; then
if [ "${nis_ypset_enable}" = "YES" ]; then
echo -n ' ypset'; ypset ${nis_ypset_flags}
fi
fi
# Start keyserv if we are running Secure RPC
if [ "X${keyserv_enable}" = X"YES" ]; then
if [ "${keyserv_enable}" = "YES" ]; then
echo -n ' keyserv'; keyserv ${keyserv_flags}
fi
# Start ypupdated if we are running Secure RPC and we are NIS master
if [ "X$rpc_ypupdated_enable" = X"YES" ]; then
if [ "${rpc_ypupdated_enable}" = "YES" ]; then
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
@ -325,40 +325,40 @@ network_pass2() {
network_pass3() {
echo -n 'Starting final network daemons:'
if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
if [ "${nfs_server_enable}" = "YES" -a -r /etc/exports ]; then
echo -n ' mountd'
if [ "X${weak_mountd_authentication}" = X"YES" ]; then
if [ "${weak_mountd_authentication}" = "YES" ]; then
mountd_flags="-n"
fi
mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
if [ "${nfs_reserved_port_only}" = "YES" ]; then
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi
echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then
if [ "${rpc_lockd_enable}" = "YES" ]; then
echo -n ' rpc.lockd'; rpc.lockd
fi
if [ "X$rpc_statd_enable" = X"YES" ]; then
if [ "${rpc_statd_enable}" = "YES" ]; then
echo -n ' rpc.statd'; rpc.statd
fi
fi
if [ "X${nfs_client_enable}" = X"YES" ]; then
if [ "${nfs_client_enable}" = "YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then
if [ "${nfs_access_cache}" != "X" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null
fi
fi
if [ "X${amd_enable}" = X"YES" ]; then
if [ "${amd_enable}" = "YES" ]; then
echo -n ' amd'
if [ "X${amd_map_program}" != X"NO" ]; then
if [ "${amd_map_program}" != "NO" ]; then
amd_flags="${amd_flags} `eval ${amd_map_program}`"
fi
if [ -n "$amd_flags" ]
if [ -n "${amd_flags}" ]
then
amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
else
@ -366,20 +366,20 @@ network_pass3() {
fi
fi
if [ "X${rwhod_enable}" = X"YES" ]; then
if [ "${rwhod_enable}" = "YES" ]; then
echo -n ' rwhod'; rwhod ${rwhod_flags}
fi
# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server_enable}" = X"YES" ]; then
if [ "X${kerberos_stash}" = "XYES" ]; then
if [ "${kerberos_server_enable}" = "YES" ]; then
if [ "${kerberos_stash}" = "YES" ]; then
stash_flag=-n
else
stash_flag=
fi
echo -n ' kerberos'; \
kerberos ${stash_flag} >> /var/log/kerberos.log &
if [ "X${kadmind_server_enable}" = "XYES" ]; then
if [ "${kadmind_server_enable}" = "YES" ]; then
echo -n ' kadmind'; \
(sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) &
fi

View File

@ -1,16 +1,16 @@
#!/bin/sh -
# PC-card startup script
# $Id: rc.pccard,v 1.15 1999/07/07 01:26:55 hosokawa Exp $
# $Id: rc.pccard,v 1.16 1999/07/26 01:08:16 obrien Exp $
if [ "X$pccard_enable" = X"YES" ] ; then
if [ "x$pccard_mem" != "xDEFAULT" ] ; then
pccardc pccardmem $pccard_mem
if [ "${pccard_enable}" = "YES" ] ; then
if [ "${pccard_mem}" != "DEFAULT" ] ; then
pccardc pccardmem ${pccard_mem}
else
pccardc pccardmem 0xd0000
fi
if [ "X$pccard_conf" != "X" ] ; then
pccardd_flags="$pccardd_flags -f $pccard_conf"
if [ -n "${pccard_conf}" ] ; then
pccardd_flags="${pccardd_flags} -f ${pccard_conf}"
fi
echo -n "Enable PC-card."
pccardd $pccardd_flags 2>&1 > /var/log/pccardd.debug
pccardd ${pccardd_flags} 2>&1 > /var/log/pccardd.debug
fi

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: rc.serial,v 1.10 1998/03/13 13:33:09 danny Exp $
# $Id: rc.serial,v 1.11 1998/03/13 22:03:03 danny Exp $
# Change some defaults for serial devices.
# Standard defaults are:
@ -20,11 +20,11 @@ default() {
for i in $*
do
comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
stty </dev/cual$co$i -clocal -crtscts -hupcl 0
comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0
stty < /dev/ttyi${ci}${i} -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/ttyl${ci}${i} -clocal -crtscts -hupcl 0
stty < /dev/cuai${co}${i} -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/cual${co}${i} -clocal -crtscts -hupcl 0
done
}
@ -37,14 +37,14 @@ maybe() {
for i in $*
do
# Don't use ^R; it breaks bash's ^R when typed ahead.
stty </dev/ttyi$ci$i reprint undef
stty </dev/cuai$co$i reprint undef
stty < /dev/ttyi${ci}${i} reprint undef
stty < /dev/cuai${co}${i} reprint undef
# Lock clocal off on dialin device for security.
stty </dev/ttyl$ci$i clocal
stty < /dev/ttyl${ci}${i} clocal
# Lock the speeds to use old binaries that don't support them.
# Any legal speed works to lock the initial speed.
stty </dev/ttyl$ci$i 300
stty </dev/cual$co$i 300
stty < /dev/ttyl${ci}${i} 300
stty < /dev/cual${co}${i} 300
done
}
@ -57,13 +57,13 @@ modem() {
for i in $*
do
# may depend on modem
comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
comcontrol /dev/tty${ci}${i} dtrwait 100 drainwait 180
# Lock crtscts on.
# Speed reasonable for V42bis.
stty </dev/ttyi$ci$i crtscts 57600
stty </dev/ttyl$ci$i crtscts
stty </dev/cuai$co$i crtscts 57600
stty </dev/cual$co$i crtscts
stty < /dev/ttyi${ci}${i} crtscts 57600
stty < /dev/ttyl${ci}${i} crtscts
stty < /dev/cuai${co}${i} crtscts 57600
stty < /dev/cual${co}${i} crtscts
done
}
@ -77,10 +77,10 @@ mouse() {
do
# Lock clocal on, hupcl off.
# Standard speed for Microsoft mouse.
stty </dev/ttyi$ci$i clocal -hupcl 1200
stty </dev/ttyl$ci$i clocal hupcl
stty </dev/cuai$co$i clocal -hupcl 1200
stty </dev/cual$co$i clocal hupcl
stty < /dev/ttyi${ci}${i} clocal -hupcl 1200
stty < /dev/ttyl${ci}${i} clocal hupcl
stty < /dev/cuai${co}${i} clocal -hupcl 1200
stty < /dev/cual${co}${i} clocal hupcl
done
}
@ -95,12 +95,12 @@ terminal() {
ci=$1; shift
co=$1; shift
modem $ci $co $*
modem ${ci} ${co} $*
for i in $*
do
comcontrol /dev/tty$ci$i dtrwait 0
stty </dev/ttyi$ci$i 115200
stty </dev/cuai$co$i 115200
comcontrol /dev/tty${ci}${i} dtrwait 0
stty < /dev/ttyi${ci}${i} 115200
stty < /dev/cuai${co}${i} 115200
done
}

View File

@ -2,12 +2,12 @@
#
# Read in /etc/sysctl.conf and set things accordingly
#
# $Id:$
# $Id: rc.sysctl,v 1.1 1999/03/28 20:36:03 imp Exp $
if [ -f /etc/sysctl.conf ]; then
3< /etc/sysctl.conf
while read 0<&3 var;
do
sysctl -w $var
sysctl -w ${var}
done
3<&-
fi

View File

@ -1,7 +1,7 @@
#!/bin/sh -
#
# @(#)security 5.3 (Berkeley) 5/28/91
# $Id: security,v 1.29 1999/01/10 11:18:59 danny Exp $
# $Id: security,v 1.30 1999/06/23 14:23:54 sheldonh Exp $
#
PATH=/sbin:/bin:/usr/bin
LC_ALL=C; export LC_ALL
@ -12,7 +12,7 @@ separator () {
}
host=`hostname`
echo "Subject: $host security check output"
echo "Subject: ${host} security check output"
LOG=/var/log
TMP=/var/run/_secure.$$
@ -26,26 +26,26 @@ echo "checking setuid files and devices:"
# the args to ls, is still here...
#
MP=`mount -t ufs | grep -v " nosuid" | sed 's;/dev/;&r;' | awk '{ print $3 }'`
set $MP
set ${MP}
while test $# -ge 1; do
mount=$1
shift
find $mount -xdev -type f \
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
\( -perm -u+s -or -perm -g+s \) -print0
done | xargs -0 -n 20 ls -lTd | sort +9 > $TMP
done | xargs -0 -n 20 ls -lTd | sort +9 > ${TMP}
if [ ! -f $LOG/setuid.today ] ; then
if [ ! -f ${LOG}/setuid.today ] ; then
separator
echo "no $LOG/setuid.today"
cp $TMP $LOG/setuid.today
echo "no ${LOG}/setuid.today"
cp ${TMP} ${LOG}/setuid.today
fi
if cmp $LOG/setuid.today $TMP >/dev/null; then :; else
if cmp ${LOG}/setuid.today ${TMP} >/dev/null; then :; else
separator
echo "$host setuid diffs:"
diff -b $LOG/setuid.today $TMP
mv $LOG/setuid.today $LOG/setuid.yesterday
mv $TMP $LOG/setuid.today
echo "${host} setuid diffs:"
diff -b ${LOG}/setuid.today ${TMP}
mv ${LOG}/setuid.today ${LOG}/setuid.yesterday
mv ${TMP} ${LOG}/setuid.today
fi
separator
@ -57,57 +57,57 @@ echo "checking for passwordless accounts:"
awk -F: '$1 !~ /^\+/ && $2=="" {print $0}' /etc/master.passwd
# show denied packets
if ipfw -a l 2>/dev/null | egrep "deny|reset|unreach" > $TMP; then
if [ ! -f $LOG/ipfw.today ] ; then
if ipfw -a l 2>/dev/null | egrep "deny|reset|unreach" > ${TMP}; then
if [ ! -f ${LOG}/ipfw.today ] ; then
separator
echo "no $LOG/ipfw.today"
cp $TMP $LOG/ipfw.today
echo "no ${LOG}/ipfw.today"
cp ${TMP} ${LOG}/ipfw.today
fi
if cmp $LOG/ipfw.today $TMP >/dev/null; then :; else
if cmp ${LOG}/ipfw.today ${TMP} >/dev/null; then :; else
separator
echo "$host denied packets:"
diff -b $LOG/ipfw.today $TMP | egrep "^>"
mv $LOG/ipfw.today $LOG/ipfw.yesterday
mv $TMP $LOG/ipfw.today
echo "${host} denied packets:"
diff -b ${LOG}/ipfw.today ${TMP} | egrep "^>"
mv ${LOG}/ipfw.today ${LOG}/ipfw.yesterday
mv ${TMP} ${LOG}/ipfw.today
fi
fi
# show ipfw rules which have reached the log limit
IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
if [ $? -eq 0 ] && [ $IPFW_LOG_LIMIT -ne 0 ]; then
if [ $? -eq 0 ] && [ ${IPFW_LOG_LIMIT} -ne 0 ]; then
ipfw -a l | grep " log " | perl -n -e \
'/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > $TMP
if [ -s $TMP ]; then
'/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > ${TMP}
if [ -s ${TMP} ]; then
separator
echo "ipfw log limit reached:"
cat $TMP
cat ${TMP}
fi
fi
# show kernel log messages
if dmesg 2>/dev/null > $TMP; then
if [ ! -f $LOG/dmesg.today ] ; then
if dmesg 2>/dev/null > ${TMP}; then
if [ ! -f ${LOG}/dmesg.today ] ; then
separator
echo "no $LOG/dmesg.today"
cp $TMP $LOG/dmesg.today
echo "no ${LOG}/dmesg.today"
cp ${TMP} ${LOG}/dmesg.today
fi
if cmp $LOG/dmesg.today $TMP >/dev/null 2>&1; then :; else
if cmp ${LOG}/dmesg.today ${TMP} >/dev/null 2>&1; then :; else
separator
echo "$host kernel log messages:"
diff -b $LOG/dmesg.today $TMP | egrep "^>"
mv $LOG/dmesg.today $LOG/dmesg.yesterday
mv $TMP $LOG/dmesg.today
echo "${host} kernel log messages:"
diff -b ${LOG}/dmesg.today ${TMP} | egrep "^>"
mv ${LOG}/dmesg.today ${LOG}/dmesg.yesterday
mv ${TMP} ${LOG}/dmesg.today
fi
fi
# show login failures
separator
echo "$host login failures:"
grep -i "login failure" $LOG/messages
echo "${host} login failures:"
grep -i "login failure" ${LOG}/messages
# show tcp_wrapper warning messages
separator
echo "$host refused connections:"
grep -i "refused connect" $LOG/messages
echo "${host} refused connections:"
grep -i "refused connect" ${LOG}/messages
rm -f $TMP
rm -f ${TMP}