[2/2] ambari git commit: AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file (aonishuk)

2015-08-26 Thread aonishuk
AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/90a012b7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/90a012b7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/90a012b7

Branch: refs/heads/branch-2.1
Commit: 90a012b7114335a902b5f2f9b4304d16f4a0b722
Parents: a808ddc
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Wed Aug 26 14:11:44 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Wed Aug 26 14:11:44 2015 +0300

--
 ambari-agent/src/main/package/deb/control/preinst | 4 
 ambari-agent/src/main/package/rpm/preinstall.sh   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/90a012b7/ambari-agent/src/main/package/deb/control/preinst
--
diff --git a/ambari-agent/src/main/package/deb/control/preinst 
b/ambari-agent/src/main/package/deb/control/preinst
index e9fa78b..7265c55 100644
--- a/ambari-agent/src/main/package/deb/control/preinst
+++ b/ambari-agent/src/main/package/deb/control/preinst
@@ -31,7 +31,11 @@ fi
 BAK=/etc/ambari-agent/conf/ambari-agent.ini.old
 ORIG=/etc/ambari-agent/conf/ambari-agent.ini
 
+BAK_SUDOERS=/etc/sudoers.d/ambari-agent.bak
+ORIG_SUDOERS=/etc/sudoers.d/ambari-agent
+
 [ -f $ORIG ]  mv -f $ORIG $BAK
+[ -f $ORIG_SUDOERS ]  echo Moving $ORIG_SUDOERS to $BAK_SUDOERS. Please 
restore the file if you were using it for ambari-agent non-root functionality 
 mv -f $ORIG_SUDOERS $BAK_SUDOERS
 
 if [ -d $STACKS_FOLDER ]
 then

http://git-wip-us.apache.org/repos/asf/ambari/blob/90a012b7/ambari-agent/src/main/package/rpm/preinstall.sh
--
diff --git a/ambari-agent/src/main/package/rpm/preinstall.sh 
b/ambari-agent/src/main/package/rpm/preinstall.sh
index e135c18..d7419d3 100644
--- a/ambari-agent/src/main/package/rpm/preinstall.sh
+++ b/ambari-agent/src/main/package/rpm/preinstall.sh
@@ -31,7 +31,7 @@ BAK_SUDOERS=/etc/sudoers.d/ambari-agent.bak
 ORIG_SUDOERS=/etc/sudoers.d/ambari-agent
 
 [ -f $ORIG ]  mv -f $ORIG $BAK
-[ -f $ORIG_SUDOERS ]  mv -f $ORIG_SUDOERS $BAK_SUDOERS
+[ -f $ORIG_SUDOERS ]  echo Moving $ORIG_SUDOERS to $BAK_SUDOERS. Please 
restore the file if you were using it for ambari-agent non-root functionality 
 mv -f $ORIG_SUDOERS $BAK_SUDOERS
 
 if [ -d $STACKS_FOLDER ]
 then



[2/2] ambari git commit: AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file (aonishuk)

2015-08-25 Thread aonishuk
AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d426fe4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d426fe4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d426fe4

Branch: refs/heads/branch-2.1
Commit: 0d426fe479b7770756eb17f04152d19d5e016522
Parents: b8e3988
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Aug 25 14:56:00 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Aug 25 14:56:00 2015 +0300

--
 ambari-agent/src/main/package/rpm/preinstall.sh | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d426fe4/ambari-agent/src/main/package/rpm/preinstall.sh
--
diff --git a/ambari-agent/src/main/package/rpm/preinstall.sh 
b/ambari-agent/src/main/package/rpm/preinstall.sh
index fc6719b..e135c18 100644
--- a/ambari-agent/src/main/package/rpm/preinstall.sh
+++ b/ambari-agent/src/main/package/rpm/preinstall.sh
@@ -27,7 +27,11 @@ fi
 BAK=/etc/ambari-agent/conf/ambari-agent.ini.old
 ORIG=/etc/ambari-agent/conf/ambari-agent.ini
 
+BAK_SUDOERS=/etc/sudoers.d/ambari-agent.bak
+ORIG_SUDOERS=/etc/sudoers.d/ambari-agent
+
 [ -f $ORIG ]  mv -f $ORIG $BAK
+[ -f $ORIG_SUDOERS ]  mv -f $ORIG_SUDOERS $BAK_SUDOERS
 
 if [ -d $STACKS_FOLDER ]
 then