summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch119
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch20
2 files changed, 92 insertions, 47 deletions
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
index e16c2306956f..234708746f6d 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch
@@ -1,49 +1,76 @@
-diff -ru /tmp/client/scripts/bsdos client/scripts/bsdos
---- /tmp/client/scripts/bsdos 2006-03-18 14:47:59.393686000 +0000
-+++ client/scripts/bsdos 2006-03-18 14:59:18.000000000 +0000
-@@ -132,7 +132,7 @@
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -68,6 +68,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$IF_METRIC != x ]; then
++ metric="metric $IF_METRIC"
++fi
+
+ if [ x$reason = xMEDIUM ]; then
+ eval "ifconfig $interface $medium"
+@@ -128,7 +128,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -198,7 +198,7 @@
+@@ -194,7 +194,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
set $new_static_routes
while [ $# -gt 1 ]; do
-diff -ru /tmp/client/scripts/freebsd client/scripts/freebsd
---- /tmp/client/scripts/freebsd 2006-03-18 14:47:59.393686000 +0000
-+++ client/scripts/freebsd 2006-03-18 15:00:48.000000000 +0000
-@@ -162,7 +162,7 @@
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -92,6 +92,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$IF_METRIC != x ]; then
++ metric="metric $IF_METRIC"
++fi
+
+ if [ x$reason = xMEDIUM ]; then
+ eval "ifconfig $interface $medium"
+@@ -158,7 +158,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
if [ -n "$new_static_routes" ]; then
$LOGGER "New Static Routes: $new_static_routes"
-@@ -233,7 +233,7 @@
+@@ -229,7 +229,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
set -- $new_static_routes
while [ $# -gt 1 ]; do
-diff -ru /tmp/client/scripts/linux client/scripts/linux
---- /tmp/client/scripts/linux 2006-03-18 14:47:59.393686000 +0000
-+++ client/scripts/linux 2006-03-18 14:56:43.000000000 +0000
-@@ -140,13 +140,11 @@
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -91,6 +91,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$IF_METRIC != x ]; then
++ metric="metric $IF_METRIC"
++fi
+
+ if [ x$reason = xMEDIUM ]; then
+ # Linux doesn't do mediums (ok, ok, media).
+@@ -136,13 +136,11 @@
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
# Possible new alias. Remove old alias.
@@ -60,12 +87,12 @@ diff -ru /tmp/client/scripts/linux client/scripts/linux
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-@@ -159,14 +157,14 @@
+@@ -155,14 +153,14 @@
route add -net $new_network_number $new_subnet_arg dev $interface
fi
for router in $new_routers; do
- route add default gw $router
-+ route add default gw $router ${IF_METRIC:+metric $IF_METRIC} dev $interface
++ route add default gw $router $metric dev $interface
done
fi
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
@@ -77,7 +104,7 @@ diff -ru /tmp/client/scripts/linux client/scripts/linux
fi
make_resolv_conf
exit_with_hooks 0
-@@ -179,12 +177,12 @@
+@@ -175,12 +173,12 @@
ifconfig $interface:0- inet 0
fi
if [ x$old_ip_address != x ]; then
@@ -93,7 +120,7 @@ diff -ru /tmp/client/scripts/linux client/scripts/linux
fi
exit_with_hooks 0
fi
-@@ -205,15 +203,15 @@
+@@ -201,15 +199,15 @@
fi
if [ $relmajor -lt 2 ] || \
( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
@@ -102,7 +129,7 @@ diff -ru /tmp/client/scripts/linux client/scripts/linux
fi
for router in $new_routers; do
- route add default gw $router
-+ route add default gw $router ${IF_METRIC:+metric $IF_METRIC} dev $interface
++ route add default gw $router $metric dev $interface
done
make_resolv_conf
exit_with_hooks 0
@@ -112,45 +139,63 @@ diff -ru /tmp/client/scripts/linux client/scripts/linux
exit_with_hooks 1
fi
-diff -ru /tmp/client/scripts/netbsd client/scripts/netbsd
---- /tmp/client/scripts/netbsd 2006-03-18 14:47:59.393686000 +0000
-+++ client/scripts/netbsd 2006-03-18 15:02:29.000000000 +0000
-@@ -132,7 +132,7 @@
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -68,6 +68,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$IF_METRIC != x ]; then
++ metric="metric $IF_METRIC"
++fi
+
+ if [ x$reason = xMEDIUM ]; then
+ eval "ifconfig $interface $medium"
+@@ -128,7 +128,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -198,7 +198,7 @@
+@@ -194,7 +194,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
set $new_static_routes
while [ $# -gt 1 ]; do
-diff -ru /tmp/client/scripts/openbsd client/scripts/openbsd
---- /tmp/client/scripts/openbsd 2006-03-18 14:47:59.393686000 +0000
-+++ client/scripts/openbsd 2006-03-18 15:04:24.000000000 +0000
-@@ -132,7 +132,7 @@
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -68,6 +68,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$IF_METRIC != x ]; then
++ metric="metric $IF_METRIC"
++fi
+
+ if [ x$reason = xMEDIUM ]; then
+ eval "ifconfig $interface $medium"
+@@ -128,7 +128,7 @@
$new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
-@@ -198,7 +198,7 @@
+@@ -194,7 +194,7 @@
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
- route add default $router >/dev/null 2>&1
-+ route add default $router ${IF_METRIC:+metric $IF_METRIC} dev $interface >/dev/null 2>&1
++ route add default $router $metric dev $interface >/dev/null 2>&1
done
set $new_static_routes
while [ $# -gt 1 ]; do
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
index c8825dfa4256..2d9c8683aa46 100644
--- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch
@@ -24,7 +24,7 @@
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -173,6 +182,7 @@
+@@ -176,6 +188,7 @@
ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
route add $alias_ip_address 127.0.0.1
fi
@@ -32,7 +32,7 @@
exit_with_hooks 0
fi
-@@ -218,6 +228,7 @@
+@@ -221,6 +231,7 @@
fi
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
|sh >/dev/null 2>&1
@@ -78,7 +78,7 @@
fi
fi
# If we're making confs, may as well make an ntp.conf too
-@@ -204,6 +198,7 @@
+@@ -207,6 +201,7 @@
ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
route add $alias_ip_address 127.0.0.1
fi
@@ -86,7 +86,7 @@
exit_with_hooks 0
fi
-@@ -253,6 +248,7 @@
+@@ -256,6 +251,7 @@
fi
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
|sh >/dev/null 2>&1
@@ -121,7 +121,7 @@
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -180,6 +188,7 @@
+@@ -183,6 +191,7 @@
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address dev $interface:0
fi
@@ -129,7 +129,7 @@
exit_with_hooks 0
fi
-@@ -208,6 +217,7 @@
+@@ -211,6 +220,7 @@
exit_with_hooks 0
fi
ifconfig $interface inet 0.0.0.0
@@ -163,7 +163,7 @@
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -173,6 +182,7 @@
+@@ -176,6 +185,7 @@
ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
route add $alias_ip_address 127.0.0.1
fi
@@ -171,7 +171,7 @@
exit_with_hooks 0
fi
-@@ -218,6 +228,7 @@
+@@ -221,6 +231,7 @@
fi
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
|sh >/dev/null 2>&1
@@ -205,7 +205,7 @@
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
-@@ -173,6 +182,7 @@
+@@ -176,6 +185,7 @@
ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
route add $alias_ip_address 127.0.0.1
fi
@@ -213,7 +213,7 @@
exit_with_hooks 0
fi
-@@ -218,6 +228,7 @@
+@@ -221,6 +231,7 @@
fi
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
|sh >/dev/null 2>&1