Skip to content

Commit 8ddea42

Browse files
committed
fixed according to coding style
1 parent 95c693c commit 8ddea42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resolve-hostname.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ PRIVATE_IP=`wget -q -O - http://169.254.169.254/latest/meta-data/local-ipv4`
2020

2121
# do changes only if short hostname does not resolve
2222
ping -c 1 -q "${SHORT_HOSTNAME}" > /dev/null 2>&1
23-
if [ ! $? -eq 0 ]; then
23+
if [ $? -ne 0 ]; then
2424
echo -e "\n# fixed by resolve-hostname.sh \n${PRIVATE_IP} ${SHORT_HOSTNAME}\n" >> /etc/hosts
2525

2626
# let's make sure that it got fixed
2727
ping -c 1 -q "${SHORT_HOSTNAME}" > /dev/null 2>&1
28-
if [ ! $? -eq 0 ]; then
28+
if [ $? -ne 0 ]; then
2929
# return some non-zero code to indicate problem
3030
echo "Possible bug: unable to fix resolution of local hostname"
3131
return 62

0 commit comments

Comments
 (0)