mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-22 08:52:58 +02:00
Funktionen eingebaut, damit bei green only die Gateway und DNS Einstellungen wirksam werden
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@580 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
|
||||
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
|
||||
# Michael Tremer - mitch@ipfire.org
|
||||
# Maniacikarus - Maniacikarus@ipfire.org
|
||||
#
|
||||
# Version : 00.00
|
||||
#
|
||||
@@ -43,6 +44,17 @@ case "${2}" in
|
||||
if ip route | grep -q default; then
|
||||
boot_mesg "Gateway already setup; skipping." ${WARNING}
|
||||
echo_warning
|
||||
elif [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ] && [ "${GATEWAY}" != "" ]; then
|
||||
boot_mesg "Setting up default gateway for green only..."
|
||||
ip route add default via ${GATEWAY} dev ${1}
|
||||
evaluate_retval
|
||||
if [ "${DNS1}" != "" ];then
|
||||
boot_mesg "Registering DNS Server for green only..."
|
||||
echo "nameserver $DNS1" > /etc/resolv.conf
|
||||
fi
|
||||
if [ "${DNS2}" != "" ];then
|
||||
echo "nameserver $DNS2" >> /etc/resolv.conf
|
||||
fi
|
||||
else
|
||||
boot_mesg "Setting up default gateway..."
|
||||
echo $DEFAULT_GATEWAY > /var/ipfire/red/remote-ipaddress
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
|
||||
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
|
||||
# Michael Tremer - mitch@ipfire.org
|
||||
# Maniacikarus - Maniacikarus@ipfire.org
|
||||
#
|
||||
# Version : 01.00
|
||||
#
|
||||
@@ -51,9 +52,16 @@ boot_mesg_flush
|
||||
|
||||
# Passing the variables to the script
|
||||
if [ "$name" == "green" ]; then
|
||||
NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
|
||||
if [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ]; then
|
||||
NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
|
||||
NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
|
||||
DNS1=${DNS1} DNS2=${DNS2} GATEWAY=${DEFAULT_GATEWAY} \
|
||||
/etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
|
||||
else
|
||||
NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
|
||||
NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
|
||||
/etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
|
||||
fi
|
||||
|
||||
elif [ "$name" == "blue" ]; then
|
||||
NAME=${name} ADDRESS=${BLUE_ADDRESS} NETMASK=${BLUE_NETMASK} \
|
||||
|
||||
Reference in New Issue
Block a user