blob: 4656846c9ae617024915c509fb2e7a869871fdf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
set -e
HOST="${1}"
# FIXME: bluntly assuming domain .intern here...
# call Debian Edu's gosa-create-host
if ! LANG=C kadmin.local -q "get_principal host/$HOST.intern" 2>/dev/null | grep -q "^Principal: host/$HOST.intern@.*" && \
! LANG=C kadmin.local -q "get_principal nfs/$HOST.intern" 2>/dev/null | grep -q "^Principal: nfs/$HOST.intern@.*"; then
/usr/share/debian-edu-config/tools/gosa-modify-host ${@}
fi
# call DLW keytabs' update script (delay execution for 10s because GOsa² needs
# to write the NIS netgroup information first (this hook gets called between
# saving the host object to LDAP, but before updating the NIS netgroup settings).
( sleep 2; /usr/share/debian-edu-config/tools/update-dlw-krb5-keytabs-itzks ${@} ) &
# ITZkS: assure that host keytabs are readable by puppet
chown :puppet /etc/debian-edu/host-keytabs/*.keytab
chmod 0640 /etc/debian-edu/host-keytabs/*.keytab
exit 0
|