From a3df5d0b2667faa992918faf4451566f8c87516e Mon Sep 17 00:00:00 2001 From: Giridharan Kesavan Date: Sat, 10 Sep 2011 01:08:00 +0000 Subject: [PATCH] HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1167428 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../hadoop-common/src/main/packages/update-hadoop-env.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 23ac34d306..7f6bff5b95 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -16,6 +16,8 @@ Trunk (unreleased changes) HADOOP-7606. Upgrade Jackson to version 1.7.1 to match the version required by Jersey (Alejandro Abdelnur via atm) + HADOOP-7610. Fix for hadoop debian package (Eric Yang via gkesavan) + Release 0.23.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh b/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh index eb17344dfc..183cce342a 100644 --- a/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh +++ b/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh @@ -134,7 +134,9 @@ if [ "${UNINSTALL}" -eq "1" ]; then rm -rf ${HADOOP_PREFIX}/etc/hadoop fi rm -f /etc/default/hadoop-env.sh - rm -f /etc/profile.d/hadoop-env.sh + if [ -d /etc/profile.d ]; then + rm -f /etc/profile.d/hadoop-env.sh + fi else # Create symlinks if [ "${HADOOP_CONF_DIR}" != "${HADOOP_PREFIX}/etc/hadoop" ]; then @@ -142,7 +144,9 @@ else ln -sf ${HADOOP_CONF_DIR} ${HADOOP_PREFIX}/etc/hadoop fi ln -sf ${HADOOP_CONF_DIR}/hadoop-env.sh /etc/default/hadoop-env.sh - ln -sf ${HADOOP_CONF_DIR}/hadoop-env.sh /etc/profile.d/hadoop-env.sh + if [ -d /etc/profile.d ]; then + ln -sf ${HADOOP_CONF_DIR}/hadoop-env.sh /etc/profile.d/hadoop-env.sh + fi mkdir -p ${HADOOP_LOG_DIR} chown root:hadoop ${HADOOP_LOG_DIR}