freebsd_amp_hwpstate/release/picobsd/floppy.tree/etc/rc.conf

62 lines
2.4 KiB
Bash

#!/bin/sh
# $FreeBSD$
#
# rc.conf for picobsd.
# $main_ether and $main_if are set from rc to the ethernet address and
# name of the first ethernet interface, if available, so a simple
# here-document below can be used for autoconfiguration.
# Remaining parameters are set using a switch.
while read ether hostname ip mask ; do
if [ "$ether" = "$main_ether" -o "$ether" = "default" ] ; then
break
fi
done <<__eof__
# Insert here the description of the system
# default terminates the search.
# main_ether hostname ip mask
00:20:18:2f:f4:2e rizzo 131.114.9.26 0xffffff00
00:c0:58:21:9e:a0 aula29 10.1.1.11 0xffffff00
52:54:00:e0:f3:73 tlcradar 10.1.1.25 0xffffff00
52:54:00:e3:55:2e troika 10.1.1.2 0xffffff00
default default 10.0.0.1 0xffffff00
__eof__
eval ifconfig_${main_if}=\"inet \$ip netmask \$mask\"
network_interfaces=`ifconfig -l`
case $hostname in
troika)
sysctl -w net.link.ether.bridge_cfg="ed4:2,ed5:1,ed6:1"
sysctl -w net.inet.ip.forwarding=1
ifconfig ed4 131.114.9.2 netmask 0xffffff00
ifconfig ed4 10.1.1.2 netmask 0xffffff00 alias
ifconfig ed5 131.114.5.129 netmask 0xffffff80
route add default 131.114.9.29
route add 131.114.5.0/26 131.114.5.130
route add 131.114.5.64/26 131.114.5.65
;;
esac
swapfile="NO" # Set to name of swapfile if aux swapfile desired.
### Network configuration sub-section ######################
### Basic network options: ###
firewall="NO" # firewall type (see /etc/rc.firewall) or NO
tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
### Network daemons options: ###
inetd_enable="YES" # Run the network daemon dispatcher (or NO)
inetd_flags="" # Optional flags to inetd
snmpd_enable="NO" # Run the SNMP daemon (or NO)
snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
### Network routing options: ###
defaultrouter="NO" # Set to default gateway (or NO).
static_routes="" # Set to static route list (or leave empty).
gateway_enable="NO" # Set to YES if this host will be a gateway.
arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
### Allow local configuration override at the very end here ##
if [ -f /etc/rc.conf.local ]; then
. /etc/rc.conf.local
fi