Skip to content
Commits on Source (3)
......@@ -102,7 +102,6 @@ SYSCONFFILES = \
ldap/rootDSE-debian-edu.ldif \
ldap/slapd-debian-edu.conf \
ltsp/ltsp-build-client.conf \
network/if-up.d/hostname \
network/if-up.d/wpad-proxy-update \
samba/netlogon/1stlogon/1stlogon.bat \
samba/netlogon/config/get_time.bat \
......
......@@ -36,6 +36,14 @@ debian-edu-config (2.10.66) UNRELEASED; urgency=medium
- Adjust cf3/cf.finalize to care for the rootCA file as well.
- Adjust cf3/cf.workarounds to copy the rootCA file to the web server
directory upon main server upgrade.
* Fix loss of dynamically allocated v4 IP address. (Closes: #933580)
- Drop etc/network/if-up.d/hostname. This script doesn't work anymore due
to changed behaviour of the ifupdown/dhclient/systemd combination and now
also causes the loss of a dynamically allocated ipv4 IP address after 20
to 30 minutes after booting.
- Add code to d/debian-edu-config.postinstall to implement the intended
hostname update just after rebooting the system after a change.
- Adjust Makefile.
[ Mike Gabriel ]
* debian/debian-edu-config.fetch-ldap-cert: Make the script (and with it
......
......@@ -225,15 +225,23 @@ configure)
chown root:root /etc/sssd/sssd-debian-edu.conf
# The scripts in /etc/network/if-up.d need to be executable.
chmod +x /etc/network/if-up.d/hostname
# Drop wpad-proxy-update for the main server, it makes no sense to run the
# script at this time.
if egrep -q "(Main-Server)" /etc/debian-edu/config ; then
# script at this time. Also drop it for the gateway, it doesn't make sense.
if egrep -q "(Main-Server)" /etc/debian-edu/config || grep -q gateway /etc/hostname; then
rm -f /etc/network/if-up.d/wpad-proxy-update
else
chmod +x /etc/network/if-up.d/wpad-proxy-update
fi
# Add post-up stanza to interfaces file to let hostname changes take effect
# immediately after reboot (would take up to 15 min. otherwise). Exclude the
# gateway; the script doesn't make sense and would taint network setup.
if [ -f /etc/network/interfaces ] && ! grep -q gateway /etc/hostname && \
! grep -q post-up /etc/network/interfaces ; then
sed -i '/iface eth0 inet dhcp/a \ post-up \/usr\/sbin\/update-hostname-from-ip' \
/etc/network/interfaces
fi
# silence dovecot's message: if you have trouble with authentication failures,
# enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
# This message goes away after the first successful login.
......
#!/bin/sh
# Purpose: Used by dhclient-script to set the hostname of the system
# to match the DNS information for the host as provided by DHCP.
#
# This script is based on code found on the web:
# http://www.debian-administration.org/articles/447 and
# http://nxhelp.com/blog/2013/01/24/automatically-set-hostname-from-dhcp/
#
PATH=/sbin:$PATH
export PATH
# Should not update hostname on Main-Server, Roaming-Workstation and
# Standalone. Those get their fixed hostname set during installation
# (or manually after installation) and should not change dynamically
# if moved between networks.
if [ -r /etc/debian-edu/config ] ; then
. /etc/debian-edu/config
fi
if echo "$PROFILE" | egrep -q 'Main-Server|Roaming-Workstation|Standalone' ; then
exit 0
else
if echo "$PROFILE" | egrep -q 'Workstation|LTSP-Server|Thin-Client-Server|Minimal' ; then
:
fi
fi
log() {
logger -t network/if-up.d/hostname "$1"
}
sethostname() {
hostname="$1"
namesource="$2"
echo $hostname > /etc/hostname
hostname $hostname
log "changing hostname to $hostname based on $namesource"
}
namesource="DHCP IP address $new_ip_address"
/usr/sbin/update-hostname-from-ip