This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fixed according to coding style

  • Loading branch information...
voukka committed Jan 19, 2015
1 parent 95c693c commit 8ddea42973122ba723482654e005e7ce3babde54
Showing with 2 additions and 2 deletions.
  1. +2 −2 resolve-hostname.sh
View
@@ -20,12 +20,12 @@ PRIVATE_IP=`wget -q -O - http://169.254.169.254/latest/meta-data/local-ipv4`
# do changes only if short hostname does not resolve
ping -c 1 -q "${SHORT_HOSTNAME}" > /dev/null 2>&1
-if [ ! $? -eq 0 ]; then
+if [ $? -ne 0 ]; then
echo -e "\n# fixed by resolve-hostname.sh \n${PRIVATE_IP} ${SHORT_HOSTNAME}\n" >> /etc/hosts
# let's make sure that it got fixed
ping -c 1 -q "${SHORT_HOSTNAME}" > /dev/null 2>&1
- if [ ! $? -eq 0 ]; then
+ if [ $? -ne 0 ]; then
# return some non-zero code to indicate problem
echo "Possible bug: unable to fix resolution of local hostname"
return 62

0 comments on commit 8ddea42

Please sign in to comment.