Skip to content

Commit 00bfd50

Browse files
authored
Merge pull request #1400 from rvykydal/use-getent-for-name-resolution-check
Use getent in name resolution check in %post consistently
2 parents 9cb861c + cca335e commit 00bfd50

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

dns.ks.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ else
3030
fi
3131
fi
3232

33-
curl fedoraproject.org
34-
if [[ $? != 0 ]]; then
35-
echo '*** curl fedoraproject.org failed' >> /root/RESULT
33+
HOSTNAME=fedoraproject.org
34+
getent hosts ${HOSTNAME}
35+
if [[ $? -ne 0 ]]; then
36+
echo "*** Failed check: name resolution on ${HOSTNAME} in %post script" >> /root/RESULT
3637
fi
3738

3839
# No error was written to /root/RESULT file, everything is OK

0 commit comments

Comments
 (0)