We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95c693c commit 8ddea42Copy full SHA for 8ddea42
resolve-hostname.sh
@@ -20,12 +20,12 @@ PRIVATE_IP=`wget -q -O - http://169.254.169.254/latest/meta-data/local-ipv4`
20
21
# do changes only if short hostname does not resolve
22
ping -c 1 -q "${SHORT_HOSTNAME}" > /dev/null 2>&1
23
-if [ ! $? -eq 0 ]; then
+if [ $? -ne 0 ]; then
24
echo -e "\n# fixed by resolve-hostname.sh \n${PRIVATE_IP} ${SHORT_HOSTNAME}\n" >> /etc/hosts
25
26
# let's make sure that it got fixed
27
28
- if [ ! $? -eq 0 ]; then
+ if [ $? -ne 0 ]; then
29
# return some non-zero code to indicate problem
30
echo "Possible bug: unable to fix resolution of local hostname"
31
return 62
0 commit comments