bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plinn...@apache.org
Subject svn commit: r1235581 - /incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh
Date Wed, 25 Jan 2012 00:53:38 GMT
Author: plinnell
Date: Wed Jan 25 00:53:38 2012
New Revision: 1235581

URL: http://svn.apache.org/viewvc?rev=1235581&view=rev
Log:
BIGTOP-365 fix

Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh?rev=1235581&r1=1235580&r2=1235581&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hive/hive.sh Wed Jan
25 00:53:38 2012
@@ -65,6 +65,7 @@ HIVE_USER="hive"
 HIVE_HOME="`eval echo ~$HIVE_USER`"
 NICENESS="+0"
 TIMEOUT=3
+USER="hive"
 
 [ -f $SYS_FILE ] && . $SYS_FILE
 
@@ -77,8 +78,14 @@ hive_start() {
       exec_env="HADOOP_OPTS=\"-Dhive.log.dir=`dirname $LOG_FILE`\""
     fi
 
+    if [ -x /sbin/runuser ]; then
+      SU="runuser -s /bin/bash $USER"
+    else
+      SU="su -s /bin/sh $USER"
+    fi
+
     log_success_msg "Starting $desc (${NAME}): "
-    start_daemon -u $HIVE_USER -p $PID_FILE -n $NICENESS  /bin/sh -c "cd $HIVE_HOME ; $exec_env
nohup \
+     $SU -c "cd $HIVE_HOME ; $exec_env nohup \ 
            $EXE_FILE --service $service_name $PORT \
              > $LOG_FILE 2>&1 < /dev/null & "'echo $! '"> $PID_FILE"
 



Mime
View raw message