瀏覽代碼

AMBARI-2545. Regression: Agent external hostname is not verified during bootstrap with no warnings. (Dmitry L via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1499111 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 12 年之前
父節點
當前提交
aabe29bcf8
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      ambari-agent/conf/unix/ambari-agent

+ 6 - 3
ambari-agent/conf/unix/ambari-agent

@@ -80,6 +80,8 @@ check_python_version ()
   return $OK
 }
 
+retcode=0
+
 case "$1" in
   start)
         check_python_version
@@ -167,13 +169,14 @@ case "$1" in
   restart)
         echo -e "Restarting $AMBARI_AGENT"
         $0 stop
-        $0 start
+        $0 start "$@"
+        retcode=$?
         ;;     
   *)
         tput bold
         echo "Usage: /usr/sbin/ambari-agent {start|stop|restart|status}"
         tput sgr0
-        exit 1
+        retcode=1
 esac
 
-exit 0
+exit $retcode