瀏覽代碼

AMBARI-9322. Installation of HDP stack fails on CentOS5 due to sudo and missing tty (aonishuk)

Andrew Onishuk 10 年之前
父節點
當前提交
c101ddfea9
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      ambari-agent/conf/unix/install-helper.sh

+ 5 - 0
ambari-agent/conf/unix/install-helper.sh

@@ -51,6 +51,11 @@ do_install(){
   fi
   
   chmod 440 "$SUDOERS_FILE"
+  
+  grep '^#includedir /etc/sudoers.d$' /etc/sudoers
+  if [ $? -ne 0 ] ; then
+    echo '#includedir /etc/sudoers.d' >> /etc/sudoers
+  fi
 }
 
 do_remove(){