On Wed, Apr 15, 2015 at 05:06:21PM +0200, Holger Levsen wrote:
>
> from #debian-system on IRC:
>
> <mbiebl> 15min sounds a bit excessive and doesn't look like the
> internal 90s timeout systemd uses for services to start
After looking at this bug once again, there seem to be two issues:
(1) The reported delay of (up to) 15 minutes is due to the fact that
dhclient updates the hostname on the first lease renewal. (The
interval length between renewals seems to be a random value something
between 600 and 900 seconds.) Dhclient should update the hostname on
reboots immediately, though. Maybe systemd plays a role, maybe not.
(2) For Profiles 'Workstation' and 'Minimal' the hook script is working
like stated above.
But LTSP-Servers may have PROFILE="Workstation, Thin-Client-Server"
set in /etc/debian/edu/config. The hook script IMO fails to update
the hostname cause there's no matching case entry.
This patch solves issue (2) for me, please test.
------------------------------------------------
--- a/hostname 2015-04-20 21:35:25.268888263 +0200
+++ b/hostname 2015-04-20 21:35:32.972739567 +0200
@@ -17,15 +17,12 @@
# if moved between networks.
if [ -r /etc/debian-edu/config ] ; then
. /etc/debian-edu/config
- case "$PROFILE" in
- Workstation|Thin-Client-Server|Minimal)
- ;;
- *)
+fi
+
+if echo "$PROFILE" | egrep -q 'Workstation|Thin-Client-Server|Minimal' ; then
+ :
+ else
exit 0
- ;;
- esac
-else
- exit 0
fi
log() {
-------------------------------------------
Wolfgang
Attachment:
signature.asc
Description: Digital signature