Sfoglia il codice sorgente

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

Andrew Onishuk 10 anni fa
parent
commit
c101ddfea9
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  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(){