The problem is that obviously network configuration takes time and the init script starts too early. I mitigated this by adding the following to /etc/defaults/nslcd:

# wait for DNS
wait_for_dns(){
  log_action_begin_msg "Check for KDC"
  local HOST=/usr/bin/host
  local RETRY=5
  while [ $RETRY -gt 0 ]; do
    local DC=$($HOST -t SRV _kerberos._udp | sed '/^;;/d;s/^.* //')
    if [ -n "$DC" ]; then
      DC=$($HOST "$DC" | sed '/^;;/d;s/^.* //')
      if [ -n "$DC" ]; then
        log_action_end_msg 0 success
        return 0
      else
        log_action_cont_msg "KDC: $RETRY"
      fi
    else
      log_action_cont_msg "DNS: $RETRY"
    fi
    RETRY=$(($RETRY-1))
  done
  log_action_end_msg 20 fail
  return 20
}
if [ "$K5START_START" = "yes" ]; then
  wait_for_dns
fi

Okay, my KDC is an AD DC, so "_kerberos._udp" may not be valid in other environments. But unless the boot sequence in itself will be changed, some code like this in the k5start startup may do the trick. I fear that the situation won't exactly improve with systemd.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to