[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.1-P1-16.1-14-g02638d8
Andrew Pollock
apollock at debian.org
Thu May 19 05:53:07 UTC 2011
The following commit has been merged in the master branch:
commit d4268323b82483ccfb635d5f4fb135efc62aa4b4
Author: Peter Marschall <peter at adpm.de>
Date: Sat Jan 8 13:10:01 2011 +0100
dhclient-script.*: fix indentation to improve readability
Signed-off-by: Peter Marschall <peter at adpm.de>
diff --git a/debian/dhclient-script.kfreebsd b/debian/dhclient-script.kfreebsd
index c7985ff..c3cd259 100644
--- a/debian/dhclient-script.kfreebsd
+++ b/debian/dhclient-script.kfreebsd
@@ -9,18 +9,18 @@ make_resolv_conf() {
if [ -n "$new_domain_name" ]; then
echo domain ${new_domain_name%% *} >>$new_resolv_conf
fi
- if [ -n "$new_domain_search" ]; then
- new_domain_search="${new_domain_search% }"
- if [ -n "$new_domain_name" ]; then
- new_domain_search="$new_domain_name $new_domain_search"
- fi
- echo "search ${new_domain_search}" >> $new_resolv_conf
- elif [ -n "$new_domain_name" ]; then
- echo "search ${new_domain_name}" >> $new_resolv_conf
- fi
+ if [ -n "$new_domain_search" ]; then
+ new_domain_search="${new_domain_search% }"
+ if [ -n "$new_domain_name" ]; then
+ new_domain_search="$new_domain_name $new_domain_search"
+ fi
+ echo "search ${new_domain_search}" >> $new_resolv_conf
+ elif [ -n "$new_domain_name" ]; then
+ echo "search ${new_domain_name}" >> $new_resolv_conf
+ fi
if [ -n "$new_domain_name_servers" ]; then
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>$new_resolv_conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>$new_resolv_conf
done
else # keep 'old' nameservers
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
@@ -129,10 +129,10 @@ case "$reason" in
;;
BOUND|RENEW|REBIND|REBOOT)
- if [ -n "$old_host_name" -a -n "$host_name" -a \
- "$host_name" != "$old_host_name" ]; then
- hostname "$new_host_name"
- fi
+ if [ -n "$old_host_name" -a -n "$host_name" -a \
+ "$host_name" != "$old_host_name" ]; then
+ hostname "$new_host_name"
+ fi
if [ -n "$old_ip_address" -a -n "$alias_ip_address" -a \
"$alias_ip_address" != "$old_ip_address" ]; then
@@ -149,12 +149,12 @@ case "$reason" in
ifconfig $interface inet 0 down
fi
- # point to point
- if [ "$new_subnet_mask" == "255.255.255.255" ]; then
- for router in $new_routers; do
- route add $router $new_ip_address
- done
- fi
+ # point to point
+ if [ "$new_subnet_mask" == "255.255.255.255" ]; then
+ for router in $new_routers; do
+ route add $router $new_ip_address
+ done
+ fi
if [ -z "$old_ip_address" -o "$old_ip_address" != "$new_ip_address" -o \
"$reason" = "BOUND" -o "$reason" = "REBOOT" ]; then
@@ -204,7 +204,7 @@ case "$reason" in
fi
;;
-
+
TIMEOUT)
if [ -n "$alias_ip_address" ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
@@ -220,11 +220,11 @@ case "$reason" in
if [ -z "$first_router" ] || ping -q -c 1 $first_router; then
if [ "$new_ip_address" != "$alias_ip_address" -a \
-n "$alias_ip_address" ]; then
- ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
- route add $alias_ip_address 127.0.0.1
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+ route add $alias_ip_address 127.0.0.1
fi
- route add $new_ip_address 127.1 >/dev/null 2>&1
-
+ route add $new_ip_address 127.1 >/dev/null 2>&1
+
for router in $new_routers; do
route add default $router $metric_arg
done
diff --git a/debian/dhclient-script.kfreebsd.udeb b/debian/dhclient-script.kfreebsd.udeb
index 522a345..3347539 100644
--- a/debian/dhclient-script.kfreebsd.udeb
+++ b/debian/dhclient-script.kfreebsd.udeb
@@ -44,15 +44,15 @@ fi
if [ -n "$old_broadcast_address" ]; then
old_broadcast_arg="broadcast $old_broadcast_address"
fi
-
+
# Execute the operation
case "$reason" in
MEDIUM|ARPCHECK|ARPSEND)
# Do nothing
;;
PREINIT)
- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
- broadcast 255.255.255.255 up
+ ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
+ broadcast 255.255.255.255 up
# We need to give the kernel some time to get the interface up.
sleep 1
@@ -60,29 +60,29 @@ case "$reason" in
BOUND|RENEW|REBIND|REBOOT)
set_hostname
-
+
if [ -n "$old_ip_address" ] && \
[ "$old_ip_address" != "$new_ip_address" ]; then
# IP address changed. Bringing down the interface will delete all routes,
# and clear the ARP cache.
- ifconfig $interface inet -alias $old_ip_address $medium
- route delete $old_ip_address 127.1 >/dev/null 2>&1
- ifconfig $interface inet 0 down
+ ifconfig $interface inet -alias $old_ip_address $medium
+ route delete $old_ip_address 127.1 >/dev/null 2>&1
+ ifconfig $interface inet 0 down
fi
if [ -n "$new_interface_mtu" ]; then
- ifconfig $interface mtu $new_interface_mtu || true
+ ifconfig $interface mtu $new_interface_mtu || true
fi
if [ -z "$old_ip_address" ] || [ "$old_ip_address" != "$new_ip_address" ] || \
[ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
- ifconfig $interface inet $new_ip_address $new_subnet_arg \
- $new_broadcast_arg $medium $mtu_arg
- route add $new_ip_address 127.1 $metric_arg >/dev/null 2>&1 || true
- for router in $new_routers; do
- route add default $router >/dev/null 2>&1
- done
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $medium $mtu_arg
+ route add $new_ip_address 127.1 $metric_arg >/dev/null 2>&1 || true
+ for router in $new_routers; do
+ route add default $router >/dev/null 2>&1
+ done
fi
make_resolv_conf
@@ -98,15 +98,15 @@ case "$reason" in
EXPIRE|FAIL|RELEASE|STOP)
if [ -n "$old_ip_address" ]; then
- route delete $old_ip_address 127.1 >/dev/null 2>&1
+ route delete $old_ip_address 127.1 >/dev/null 2>&1
# Shut down interface, which will delete routes and clear arp cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0 down
fi
;;
TIMEOUT)
- ifconfig $interface down
+ ifconfig $interface down
;;
esac
diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index 3c103ec..21ee7c1 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -19,27 +19,27 @@ make_resolv_conf() {
if [ "$new_domain_name" ]; then
echo domain ${new_domain_name%% *} >>$new_resolv_conf
fi
- if [ "$new_domain_search" ]; then
- #new_domain_search="${new_domain_search% }"
- if [ "$new_domain_name" ]; then
- domain_in_search_list=""
- for domain in $new_domain_search; do
- if [ "$domain" = "${new_domain_name}" ] ||
- if [ "$domain" = "${new_domain_name}" ]; then
- domain_in_search_list="Yes"
- fi
- done
- if [ -z "$domain_in_search_list" ]; then
- new_domain_search="$new_domain_name $new_domain_search"
- fi
- fi
- echo "search ${new_domain_search}" >> $new_resolv_conf
- elif [ "$new_domain_name" ]; then
- echo "search ${new_domain_name}" >> $new_resolv_conf
- fi
+ if [ "$new_domain_search" ]; then
+ #new_domain_search="${new_domain_search% }"
+ if [ "$new_domain_name" ]; then
+ domain_in_search_list=""
+ for domain in $new_domain_search; do
+ if [ "$domain" = "${new_domain_name}" ] ||
+ [ "$domain" = "${new_domain_name}." ]; then
+ domain_in_search_list="Yes"
+ fi
+ done
+ if [ -z "$domain_in_search_list" ]; then
+ new_domain_search="$new_domain_name $new_domain_search"
+ fi
+ fi
+ echo "search ${new_domain_search}" >> $new_resolv_conf
+ elif [ "$new_domain_name" ]; then
+ echo "search ${new_domain_name}" >> $new_resolv_conf
+ fi
if [ "$new_domain_name_servers" ]; then
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>$new_resolv_conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>$new_resolv_conf
done
else # keep 'old' nameservers
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
@@ -153,10 +153,10 @@ case "$reason" in
;;
BOUND|RENEW|REBIND|REBOOT)
- if [ -n "$old_host_name" -a -n "$host_name" -a \
- "$host_name" != "$old_host_name" ]; then
- hostname "$new_host_name"
- fi
+ if [ -n "$old_host_name" -a -n "$host_name" -a \
+ "$host_name" != "$old_host_name" ]; then
+ hostname "$new_host_name"
+ fi
if [ -n "$old_ip_address" -a -n "$alias_ip_address" -a \
"$alias_ip_address" != "$old_ip_address" ]; then
@@ -178,12 +178,12 @@ case "$reason" in
ifconfig $interface inet $new_ip_address $new_subnet_arg \
$new_broadcast_arg $mtu_arg
- # point to point
- if [ "$new_subnet_mask" == "255.255.255.255" ]; then
- for router in $new_routers; do
- route add -host $router dev $interface
- done
- fi
+ # point to point
+ if [ "$new_subnet_mask" == "255.255.255.255" ]; then
+ for router in $new_routers; do
+ route add -host $router dev $interface
+ done
+ fi
for router in $new_routers; do
route add default dev $interface gw $router $metric_arg
@@ -236,7 +236,7 @@ case "$reason" in
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address dev $interface:0
fi
-
+
for router in $new_routers; do
route add default dev $interface gw $router $metric_arg
done
diff --git a/debian/dhclient-script.linux.udeb b/debian/dhclient-script.linux.udeb
index 14f167e..e42a55f 100644
--- a/debian/dhclient-script.linux.udeb
+++ b/debian/dhclient-script.linux.udeb
@@ -44,14 +44,14 @@ fi
if [ -n "$old_broadcast_address" ]; then
old_broadcast_arg="broadcast $old_broadcast_address"
fi
-
+
# Execute the operation
case "$reason" in
MEDIUM|ARPCHECK|ARPSEND)
# Do nothing
;;
PREINIT)
- ip link set $interface up
+ ip link set $interface up
# We need to give the kernel some time to get the interface up.
sleep 1
@@ -59,7 +59,7 @@ case "$reason" in
BOUND|RENEW|REBIND|REBOOT)
set_hostname
-
+
if [ -n "$old_ip_address" ] && \
[ "$old_ip_address" != "$new_ip_address" ]; then
# IP address changed. Bringing down the interface will delete all routes,
@@ -76,7 +76,7 @@ case "$reason" in
[ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
ip link set $interface up
- ip addr flush dev $interface
+ ip addr flush dev $interface
ip addr add $new_ip_address$new_mask $new_broadcast_arg dev $interface
for router in $new_routers; do
--
ISC DHCP packaging for Debian
More information about the pkg-dhcp-commits
mailing list