summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-03-21 12:11:05 +0000
committerRoy Marples <uberlord@gentoo.org>2006-03-21 12:11:05 +0000
commitc6b6c9b2f4f6a932e6abc2b2d95e94c842b5f929 (patch)
tree3488ce9cb898fc37bdc2c45f243d18b207d70bed /net-misc/dhcp/files
parentVersion bump and drop old versions. (diff)
downloadgentoo-2-c6b6c9b2f4f6a932e6abc2b2d95e94c842b5f929.tar.gz
gentoo-2-c6b6c9b2f4f6a932e6abc2b2d95e94c842b5f929.tar.bz2
gentoo-2-c6b6c9b2f4f6a932e6abc2b2d95e94c842b5f929.zip
Added token ring patch back to 3.0.3-r6, #126971
Fixed setting hostname on Linux kernels where it reports (none). dhclient-script now supports interface mtu option. (Portage version: 2.1_pre6-r5)
Diffstat (limited to 'net-misc/dhcp/files')
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch22
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch30
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch180
3 files changed, 217 insertions, 15 deletions
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
new file mode 100644
index 000000000000..de5b2e2abff6
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
@@ -0,0 +1,22 @@
+diff -ru /tmp/client/scripts/bsdos client/scripts/bsdos
+--- /tmp/client/scripts/bsdos 2006-03-21 10:54:43.311983617 +0000
++++ client/scripts/bsdos 2006-03-21 10:55:46.000000000 +0000
+@@ -106,6 +106,7 @@
+ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+ current_hostname=`hostname`
+ if [ x$current_hostname = x ] || \
++ [ x$current_hostname = "x(none)" ] || \
+ [ x$current_hostname = x$old_host_name ]; then
+ if [ x$current_hostname = x ] || \
+ [ x$new_host_name != x$old_host_name ]; then
+diff -ru /tmp/client/scripts/linux client/scripts/linux
+--- /tmp/client/scripts/linux 2006-03-21 10:54:43.295982093 +0000
++++ client/scripts/linux 2006-03-21 10:54:58.000000000 +0000
+@@ -137,6 +137,7 @@
+ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+ current_hostname=`hostname`
+ if [ x$current_hostname = x ] || \
++ [ x$current_hostname = "x(none)" ] || \
+ [ x$current_hostname = x$old_host_name ]; then
+ if [ x$current_hostname = x ] || \
+ [ x$new_host_name != x$old_host_name ]; then
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 234708746f6d..e7366836f264 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
@@ -5,7 +5,7 @@
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ x$IF_METRIC != x ]; then
-+ metric="metric $IF_METRIC"
++ metric_arg="metric $IF_METRIC"
+fi
if [ x$reason = xMEDIUM ]; then
@@ -15,7 +15,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
@@ -24,7 +24,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
set $new_static_routes
while [ $# -gt 1 ]; do
@@ -35,7 +35,7 @@
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ x$IF_METRIC != x ]; then
-+ metric="metric $IF_METRIC"
++ metric_arg="metric $IF_METRIC"
+fi
if [ x$reason = xMEDIUM ]; then
@@ -45,7 +45,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
if [ -n "$new_static_routes" ]; then
$LOGGER "New Static Routes: $new_static_routes"
@@ -54,7 +54,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
set -- $new_static_routes
while [ $# -gt 1 ]; do
@@ -65,7 +65,7 @@
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ x$IF_METRIC != x ]; then
-+ metric="metric $IF_METRIC"
++ metric_arg="metric $IF_METRIC"
+fi
if [ x$reason = xMEDIUM ]; then
@@ -92,7 +92,7 @@
fi
for router in $new_routers; do
- route add default gw $router
-+ route add default gw $router $metric dev $interface
++ route add default gw $router $metric_arg dev $interface
done
fi
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
@@ -129,7 +129,7 @@
fi
for router in $new_routers; do
- route add default gw $router
-+ route add default gw $router $metric dev $interface
++ route add default gw $router $metric_arg dev $interface
done
make_resolv_conf
exit_with_hooks 0
@@ -146,7 +146,7 @@
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ x$IF_METRIC != x ]; then
-+ metric="metric $IF_METRIC"
++ metric_arg="metric $IF_METRIC"
+fi
if [ x$reason = xMEDIUM ]; then
@@ -156,7 +156,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
@@ -165,7 +165,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
set $new_static_routes
while [ $# -gt 1 ]; do
@@ -176,7 +176,7 @@
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ x$IF_METRIC != x ]; then
-+ metric="metric $IF_METRIC"
++ metric_arg="metric $IF_METRIC"
+fi
if [ x$reason = xMEDIUM ]; then
@@ -186,7 +186,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg dev $interface >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
set $new_static_routes
@@ -195,7 +195,7 @@
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 $metric dev $interface >/dev/null 2>&1
++ route add default $router $metric_arg 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-mtu.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch
new file mode 100644
index 000000000000..e9b7c477a6d5
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch
@@ -0,0 +1,180 @@
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -77,6 +77,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+ fi
+@@ -138,7 +141,7 @@
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $new_mtu_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+ route add default $router $metric_arg dev $interface >/dev/null 2>&1
+@@ -196,7 +199,7 @@
+ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+ fi
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -86,6 +86,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+ fi
+@@ -146,7 +149,7 @@
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
+@@ -211,7 +214,7 @@
+ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+ fi
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -99,6 +99,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+ fi
+@@ -158,7 +161,7 @@
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg
++ $new_broadcast_arg $mtu_arg
+ # Add a network route to the computed network address.
+ if [ $relmajor -lt 2 ] || \
+ ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+@@ -201,7 +204,7 @@
+ ifconfig $interface:0- inet 0
+ fi
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg
++ $new_broadcast_arg $mtu_arg
+ set $new_routers
+ ############## what is -w in ping?
+ if ping -q -c 1 $1; then
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -77,6 +77,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+ fi
+@@ -137,7 +140,7 @@
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+ route add default $router $metric_arg dev $interface >/dev/null 2>&1
+@@ -195,7 +198,7 @@
+ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+ fi
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -77,6 +77,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+ fi
+@@ -137,7 +140,7 @@
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+ for router in $new_routers; do
+ route add default $router $metric_arg dev $interface >/dev/null 2>&1
+@@ -195,7 +198,7 @@
+ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+ fi
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -72,6 +72,9 @@
+ if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+ fi
++if [ x$new_interface_mtu != x ]; then
++ mtu_arg="mtu $new_interface_mtu"
++fi
+
+ ifconfig=/sbin/ifconfig
+
+@@ -134,7 +137,7 @@
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ route add $new_ip_address 127.1 1 >/dev/null 2>&1
+ for router in $new_routers; do
+ route add default $router 1 >/dev/null 2>&1
+@@ -176,7 +179,7 @@
+ route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+ fi
+ eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
+- $new_broadcast_arg $medium"
++ $new_broadcast_arg $mtu_arg $medium"
+ sleep 1
+ set $new_routers
+ if ping -s -n -I 1 $1 64 1; then