rc.conf revision 50186
1#!/bin/sh 2# $Id$ 3# 4# rc.conf for picobsd. 5# $main_ether and $main_if are set from rc to the ethernet address and 6# name of the first ethernet interface, if available, so a simple 7# here-document below can be used for autoconfiguration. 8# Remaining parameters are set using a switch. 9 10while read ether hostname ip mask ; do 11 if [ "$ether" = "$main_ether" -o "$ether" = "default" ] ; then 12 break 13 fi 14done <<__eof__ 15# Insert here the description of the system 16# default terminates the search. 17# main_ether hostname ip mask 1800:20:18:2f:f4:2e rizzo 131.114.9.26 0xffffff00 1900:c0:58:21:9e:a0 aula29 10.1.1.11 0xffffff00 2052:54:00:e0:f3:73 tlcradar 10.1.1.25 0xffffff00 2152:54:00:e3:55:2e troika 10.1.1.2 0xffffff00 22default default 10.0.0.1 0xffffff00 23__eof__ 24 25eval ifconfig_${main_if}=\"inet \$ip netmask \$mask\" 26network_interfaces=`ifconfig -l` 27 28case $hostname in 29troika) 30 sysctl -w net.link.ether.bridge_cfg="ed4:2,ed5:1,ed6:1" 31 sysctl -w net.inet.ip.forwarding=1 32 ifconfig ed4 131.114.9.2 netmask 0xffffff00 33 ifconfig ed4 10.1.1.2 netmask 0xffffff00 alias 34 ifconfig ed5 131.114.5.129 netmask 0xffffff80 35 route add default 131.114.9.29 36 route add 131.114.5.0/26 131.114.5.130 37 route add 131.114.5.64/26 131.114.5.65 38 ;; 39esac 40 41swapfile="NO" # Set to name of swapfile if aux swapfile desired. 42### Network configuration sub-section ###################### 43### Basic network options: ### 44firewall="NO" # firewall type (see /etc/rc.firewall) or NO 45tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO). 46ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. 47#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. 48### Network daemons options: ### 49inetd_enable="YES" # Run the network daemon dispatcher (or NO) 50inetd_flags="" # Optional flags to inetd 51snmpd_enable="NO" # Run the SNMP daemon (or NO) 52snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd 53### Network routing options: ### 54defaultrouter="NO" # Set to default gateway (or NO). 55static_routes="" # Set to static route list (or leave empty). 56gateway_enable="NO" # Set to YES if this host will be a gateway. 57arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL. 58### Allow local configuration override at the very end here ## 59if [ -f /etc/rc.conf.local ]; then 60 . /etc/rc.conf.local 61fi 62