|
420 |
|
420 |
|
421 |
echo -n "Check DC Master: " |
421 |
echo -n "Check DC Master: " |
422 |
|
422 |
|
423 |
nslookup_out="$(nslookup "$DCNAME" 2>&1)" |
423 |
nslookup_out=$(nslookup "$DCNAME" 2>&1) |
424 |
if [ $? -ne 0 ]; then |
424 |
if [ $? -ne 0 ]; then |
425 |
nslookup_out="$(echo $nslookup_out | sed -e 's/[\r\n]//g')" |
425 |
nslookup_out="${nslookup_out//$'\n'/ }" |
426 |
nameservers="$(cat /etc/resolv.conf | sed -ne 's/nameserver //p'| tr -d '\n')" |
426 |
nameservers=$(cat /etc/resolv.conf | sed -ne 's/^nameserver\s+/ /p' | tr -d '\n') |
427 |
failed_message "The UCS master server's name \"$DCNAME\" is unknown to the DNS servers (dns servers: $nameservers, nslookup: $nslookup_out)." |
427 |
failed_message "The UCS master server's name \"$DCNAME\" is unknown to the DNS servers (dns servers: $nameservers, nslookup: $nslookup_out)." |
428 |
fi |
428 |
fi |
429 |
|
429 |
|
430 |
ping_out="$(ping -q -c 3 "$DCNAME" 2>&1)" |
430 |
ping_out=$(ping -q -c 3 "$DCNAME" 2>&1) |
431 |
if [ $? -ne 0 ]; then |
431 |
if [ $? -ne 0 ]; then |
432 |
ping6_out="$(ping6 -q -c 3 "$DCNAME" 2>&1)" |
432 |
ping6_out=$(ping6 -q -c 3 "$DCNAME" 2>&1) |
433 |
if [ $? -ne 0 ]; then |
433 |
if [ $? -ne 0 ]; then |
434 |
ping_out="$(echo $ping_out | sed -e 's/[\r\n]//g')" |
434 |
ping_out="${ping_out//$'\n'/ }" |
435 |
ping6_out="$(echo $ping6_out | sed -e 's/[\r\n]//g')" |
435 |
ping6_out="${ping6_out//$'\n'/ }" |
436 |
failed_message "The UCS master server \"$DCNAME\" is not reachable, ping failed (ping ipv4: $ping_out, ping ipv6: $ping6_out)." |
436 |
failed_message "The UCS master server \"$DCNAME\" is not reachable, ping failed (ping ipv4: $ping_out, ping ipv6: $ping6_out)." |
437 |
fi |
437 |
fi |
438 |
fi |
438 |
fi |
439 |
|
439 |
|
440 |
ssh_out="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" ls 2>&1)" |
440 |
ssh_out=$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" true 2>&1) |
441 |
if [ $? -ne 0 ]; then |
441 |
if [ $? -ne 0 ]; then |
442 |
ssh_out="$(echo $ssh_out | sed -e 's/[\r\n]//g')" |
442 |
ssh_out="${ssh_out//$'\n'/ }" |
443 |
failed_message "The ssh-login to ${DCACCOUNT}@${DCNAME} failed with \"${ssh_out}\". Please make sure the account ${DCACCOUNT} exists and is a member of the Domain Admins group!" |
443 |
failed_message "The ssh-login to ${DCACCOUNT}@${DCNAME} failed with \"${ssh_out}\". Please make sure the account ${DCACCOUNT} exists and is a member of the Domain Admins group!" |
444 |
fi |
444 |
fi |
445 |
|
445 |
|