summaryrefslogtreecommitdiffstats
path: root/release/picobsd/floppy.tree/etc/rc.conf
blob: c8548ca51b664c303fc75fa33d9d248c174ad0bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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
OpenPOWER on IntegriCloud