ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [05/11] ambari git commit: AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk)
Date Wed, 27 Jan 2016 15:33:24 GMT
AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c530e00900b28b1c129dc364f70523ffa91b6f3a
Parents: a816cad
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Jan 27 11:34:08 2016 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Jan 27 11:34:08 2016 +0200

----------------------------------------------------------------------
 ambari-server/pom.xml                               | 11 ++++++++++-
 ambari-server/src/main/package/deb/control/postinst |  6 +++---
 ambari-server/src/main/package/deb/control/prerm    |  4 ++--
 ambari-server/src/main/package/rpm/postinstall.sh   |  6 +++---
 ambari-server/src/main/package/rpm/preremove.sh     |  4 ++--
 5 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index eb977ad..9b35c46 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -393,6 +393,15 @@
                 <source>
                   <location>src/main/python/ambari_server_main.py</location>
                 </source>
+              </sources>
+            </mapping>
+            <mapping>
+              <directory>/etc/init.d</directory>
+              <filemode>755</filemode>
+              <username>root</username>
+              <groupname>root</groupname>
+              <directoryIncluded>false</directoryIncluded>
+              <sources>
                 <source>
                   <location>sbin/ambari-server</location>
                   <filter>true</filter>
@@ -798,7 +807,7 @@
               <type>file</type>
               <mapper>
                 <type>perm</type>
-                <prefix>/usr/sbin</prefix>
+                <prefix>/etc/init.d/</prefix>
                 <user>root</user>
                 <group>root</group>
                 <filemode>755</filemode>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/postinst
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/deb/control/postinst b/ambari-server/src/main/package/deb/control/postinst
index 629ab09..c3b6235 100644
--- a/ambari-server/src/main/package/deb/control/postinst
+++ b/ambari-server/src/main/package/deb/control/postinst
@@ -14,12 +14,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 
-if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade
+if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade
     # Remove link created by previous package version
-    rm /etc/init.d/ambari-server
+    rm -f /usr/sbin/ambari-server
 fi
 
-ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server
+ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server
 
 if [ "$1" == "configure" ]; then  # Action is install
   if [ -f "/var/lib/ambari-server/install-helper.sh" ]; then

http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/prerm
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/deb/control/prerm b/ambari-server/src/main/package/deb/control/prerm
index 15d05c4..927ba4c 100644
--- a/ambari-server/src/main/package/deb/control/prerm
+++ b/ambari-server/src/main/package/deb/control/prerm
@@ -22,9 +22,9 @@ if [ "$1" == "remove" ]; then # Action is uninstall
         mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save
     fi
 
-    if [ -e "/etc/init.d/ambari-server" ]; then
+    if [ -e "/usr/sbin/ambari-server" ]; then
         # Remove link created during install
-        rm /etc/init.d/ambari-server
+        rm /usr/sbin/ambari-server
     fi
 
     mv /etc/ambari-server/conf /etc/ambari-server/conf.save

http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/rpm/postinstall.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/postinstall.sh b/ambari-server/src/main/package/rpm/postinstall.sh
index d47a00c..9b0b54a 100644
--- a/ambari-server/src/main/package/rpm/postinstall.sh
+++ b/ambari-server/src/main/package/rpm/postinstall.sh
@@ -13,12 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 
-if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade
+if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade
     # Remove link created by previous package version
-    rm /etc/init.d/ambari-server
+    rm -f /usr/sbin/ambari-server
 fi
 
-ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server
+ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server
 
 case "$1" in
   1) # Action install

http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/rpm/preremove.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/preremove.sh b/ambari-server/src/main/package/rpm/preremove.sh
index 12b69b6..6febaa8 100644
--- a/ambari-server/src/main/package/rpm/preremove.sh
+++ b/ambari-server/src/main/package/rpm/preremove.sh
@@ -23,9 +23,9 @@ if [ "$1" -eq 0 ]; then  # Action is uninstall
         mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save
     fi
 
-    if [ -e "/etc/init.d/ambari-server" ]; then
+    if [ -e "/usr/sbin/ambari-server" ]; then
         # Remove link created during install
-        rm /etc/init.d/ambari-server
+        rm /usr/sbin/ambari-server
     fi
 
     mv /etc/ambari-server/conf /etc/ambari-server/conf.save


Mime
View raw message