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