Commit 85e87cee authored by root's avatar root
Browse files

more white-space fixes

parent 4b9a417a
......@@ -14,19 +14,18 @@ FQDN=$1.$DOMAIN
## lookup user and create home directory and principal:
ldapsearch -xLLL "(&(|(cn=$HOSTNAME)(cn=$FQDN))(|(objectClass=GOHard)(objectClass=ipHost)))" \
cn ipHostNumber macAddress 2>/dev/null | perl -p00e 's/\r?\n //g' | \
while read KEY VALUE ; do
case "$KEY" in
dn:) HOSTNAME= ; IP= ; HOSTDN="dn=$VALUE" ;;
cn:) HOSTNAME="$VALUE" ;;
ipHostNumber:) IP="$VALUE" ;;
macAddress:) MAC="$VALUE" ;;
"")
FQDN=$HOSTNAME.$DOMAIN
kadmin.local -q "add_principal -policy hosts -randkey -x $HOSTDN host/$FQDN" && logger -p notice Krb5 principal \'host/$FQDN\' created.
kadmin.local -q "add_principal -policy service -randkey -x $HOSTDN nfs/$FQDN" && logger -p notice Krb5 principal \'nfs/$FQDN\' created.
;;
esac
while read KEY VALUE ; do
case "$KEY" in
dn:) HOSTNAME= ; IP= ; HOSTDN="dn=$VALUE" ;;
cn:) HOSTNAME="$VALUE" ;;
ipHostNumber:) IP="$VALUE" ;;
macAddress:) MAC="$VALUE" ;;
"")
FQDN=$HOSTNAME.$DOMAIN
kadmin.local -q "add_principal -policy hosts -randkey -x $HOSTDN host/$FQDN" && logger -p notice Krb5 principal \'host/$FQDN\' created.
kadmin.local -q "add_principal -policy service -randkey -x $HOSTDN nfs/$FQDN" && logger -p notice Krb5 principal \'nfs/$FQDN\' created.
;;
esac
done
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment