Commit 0f8146a9 authored by Michael Gilbert's avatar Michael Gilbert

release 4.3.5-3

parent 10eaeb6d
isc-dhcp (4.3.5-3) unstable; urgency=medium
* Add support for read-only /etc (closes: #642544).
- Thanks to Scott Moser.
* Wait for /etc/resolv.conf to become writable (closes: #687337).
- Thanks to Stéphane Graber.
* Suggest policykit-1 instead of depending on it (closes: #850726).
* Fix typo in --with-randomdev configure argument (closes: #838382).
* Touch dhcpd6.leases before starting an ipv6 server (closes: #824770).
- Thanks to Terry Burton.
* Use getifaddrs() system call to handle alias interfaces (closes: #605657).
- Thanks to Jiri Popelka.
-- Michael Gilbert <mgilbert@debian.org> Mon, 09 Jan 2017 04:55:32 +0000
isc-dhcp (4.3.5-2) unstable; urgency=medium
* Fix new upstream spelling errors.
......
......@@ -26,7 +26,6 @@ Depends:
${shlibs:Depends},
debianutils (>= 2.8.2),
lsb-base,
policykit-1,
Recommends:
isc-dhcp-common,
policycoreutils,
......@@ -36,6 +35,7 @@ Breaks:
Replaces:
isc-dhcp-common (<= 4.3.3-1),
Suggests:
policykit-1,
isc-dhcp-server-ldap,
Description: ISC DHCP server for automatic IP address assignment
This is the Internet Software Consortium's DHCP server.
......
......@@ -12,6 +12,30 @@
# The alias handling in here probably still sucks. -mdz
# wait for given file to be writable
wait_for_rw() {
local file=$1
# Find out whether we are going to mount / rw
exec 9>&0 </etc/fstab
rootmode=rw
while read dev mnt type opts dump pass junk; do
[ "$mnt" != / ] && continue
case "$opts" in
ro|ro,*|*,ro|*,ro,*)
rootmode=ro
;;
esac
done
exec 0>&9 9>&-
# Wait for $file to become writable
if [ "$rootmode" = "rw" ]; then
while ! { : >> "$file"; } 2>/dev/null; do
sleep 0.1
done
fi
}
# update /etc/resolv.conf based on received values
make_resolv_conf() {
local new_resolv_conf
......@@ -19,7 +43,11 @@ make_resolv_conf() {
# DHCPv4
if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] ||
[ -n "$new_domain_name_servers" ]; then
new_resolv_conf=/etc/resolv.conf.dhclient-new
resolv_conf=$(readlink -f "/etc/resolv.conf" 2>/dev/null) ||
resolv_conf="/etc/resolv.conf"
new_resolv_conf="${resolv_conf}.dhclient-new.$$"
wait_for_rw "$new_resolv_conf"
rm -f $new_resolv_conf
if [ -n "$new_domain_name" ]; then
......@@ -49,17 +77,21 @@ make_resolv_conf() {
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
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p $resolv_conf >>$new_resolv_conf
fi
if [ -f /etc/resolv.conf ]; then
chown --reference=/etc/resolv.conf $new_resolv_conf
chmod --reference=/etc/resolv.conf $new_resolv_conf
if [ -f $resolv_conf ]; then
chown --reference=$resolv_conf $new_resolv_conf
chmod --reference=$resolv_conf $new_resolv_conf
fi
mv -f $new_resolv_conf /etc/resolv.conf
mv -f $new_resolv_conf $resolv_conf
# DHCPv6
elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
new_resolv_conf=/etc/resolv.conf.dhclient-new
resolv_conf=$(readlink -f "/etc/resolv.conf" 2>/dev/null) ||
resolv_conf="/etc/resolv.conf"
new_resolv_conf="${resolv_conf}.dhclient-new.$$"
wait_for_rw "$new_resolv_conf"
rm -f $new_resolv_conf
if [ -n "$new_dhcp6_domain_search" ]; then
......@@ -76,14 +108,14 @@ make_resolv_conf() {
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
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p $resolv_conf >>$new_resolv_conf
fi
if [ -f /etc/resolv.conf ]; then
chown --reference=/etc/resolv.conf $new_resolv_conf
chmod --reference=/etc/resolv.conf $new_resolv_conf
if [ -f $resolv_conf ]; then
chown --reference=$resolv_conf $new_resolv_conf
chmod --reference=$resolv_conf $new_resolv_conf
fi
mv -f $new_resolv_conf /etc/resolv.conf
mv -f $new_resolv_conf $resolv_conf
fi
}
......
......@@ -63,7 +63,6 @@ test_config()
/usr/sbin/dhcpd -t $VERSION -cf "$CONF"
exit 1
fi
touch /var/lib/dhcp/dhcpd.leases
}
check_status()
......@@ -105,6 +104,8 @@ start_daemon()
exit 1
fi
touch /var/lib/dhcp/$NAME.leases
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec /usr/sbin/dhcpd -- $VERSION -q -cf $CONF $INTERFACES
sleep 2
......
This diff is collapsed.
......@@ -7,6 +7,8 @@ dhclient-release.patch
dhcrelay-listen.patch
dhcommon-getifaddrs.patch
dhcpd-conf.patch
fix-exit-hook-manpage.patch
......
......@@ -27,7 +27,7 @@ CONFFLAGS=--prefix=/usr --enable-log-pid --enable-paranoia
# cross-architecture building
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CONFFLAGS+=--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --with-random=/dev/random
CONFFLAGS+=--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --with-randomdev=/dev/random
endif
# hurd support
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment