COMP=$(hostname -s)
DOM=$(hostname -d)
IP=$(hostname -i | cut -f1 -d' ')
DC=$(dig +short m48.dzm | head -n 1)
cat > /var/tmp/nsupdate.txt << EOF
server $DC
zone $DOM
update add ${COMP}.${DOM} 86400 A ${IP}
show
send
EOF
cat /var/tmp/nsupdate.txt
kdestroy
kinit -k ${COMP^^}\$
klist
nsupdate -g -v /var/tmp/nsupdate.txt