#!/bin/sh # # $Id: rc.netaddress.up,v 1.7.2.14 2005/07/07 20:11:58 franck78 Exp $ # eval $(/usr/local/bin/readhash CONFIG_ROOT/ppp/settings) eval $(/usr/local/bin/readhash CONFIG_ROOT/ethernet/settings) if [ "$1" != "NOTGREEN" ]; then if [ "$GREEN_DEV" != "" ]; then ifconfig $GREEN_DEV $GREEN_ADDRESS netmask $GREEN_NETMASK broadcast $GREEN_BROADCAST up else echo "WARNING: No driver set for GREEN" fi fi if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "7" ]; then if [ "$ORANGE_DEV" != "" ]; then ifconfig $ORANGE_DEV $ORANGE_ADDRESS netmask $ORANGE_NETMASK broadcast $ORANGE_BROADCAST up fi fi if [ "$CONFIG_TYPE" = "4" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then if [ "$BLUE_DEV" != "" ]; then ifconfig $BLUE_DEV $BLUE_ADDRESS netmask $BLUE_NETMASK broadcast $BLUE_BROADCAST up fi fi # If RED is ethernet then check furthur... if [ "$CONFIG_TYPE" == "2" -o "$CONFIG_TYPE" == "3" -o "$CONFIG_TYPE" == "6" -o "$CONFIG_TYPE" == "7" ]; then # If we are DHCP or STATIC we have to start automatically if [ "$RED_TYPE" == "DHCP" -o "$RED_TYPE" == "STATIC" ]; then AUTOCONNECT="on" fi fi # Start DNSMASQ with defaults if [ "$DOMAIN_NAME_GREEN" == "" ]; then /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases else /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -s "$DOMAIN_NAME_GREEN" fi # Only when AUTOCONNECT is off, do we not bother dialing but start local dns server if [ "$AUTOCONNECT" == "off" ]; then # Start VPN Connections # bug 1177572 might be corrected because this # /usr/local/bin/ipsecctrl S # call was done to much earlier (before RED start) # Presently commented because I'm not sure VPN is usefull without RED echo -n # bash do not like empty then ... else else /etc/rc.d/rc.red start fi