hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r420758 - in /lucene/hadoop/trunk: CHANGES.txt bin/hadoop bin/hadoop-daemon.sh bin/hadoop-daemons.sh bin/rcc bin/slaves.sh bin/start-all.sh bin/start-dfs.sh bin/start-mapred.sh bin/stop-all.sh bin/stop-dfs.sh bin/stop-mapred.sh
Date Tue, 11 Jul 2006 08:06:55 GMT
Author: cutting
Date: Tue Jul 11 01:06:54 2006
New Revision: 420758

URL: http://svn.apache.org/viewvc?rev=420758&view=rev
Log:
HADOOP-352.  Fix shell scripts to use /bin/sh instead of /bin/bash for better portability.
 Contributed by Jean-Baptiste Quenot.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/bin/hadoop
    lucene/hadoop/trunk/bin/hadoop-daemon.sh
    lucene/hadoop/trunk/bin/hadoop-daemons.sh
    lucene/hadoop/trunk/bin/rcc
    lucene/hadoop/trunk/bin/slaves.sh
    lucene/hadoop/trunk/bin/start-all.sh
    lucene/hadoop/trunk/bin/start-dfs.sh
    lucene/hadoop/trunk/bin/start-mapred.sh
    lucene/hadoop/trunk/bin/stop-all.sh
    lucene/hadoop/trunk/bin/stop-dfs.sh
    lucene/hadoop/trunk/bin/stop-mapred.sh

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Jul 11 01:06:54 2006
@@ -1,6 +1,13 @@
 Hadoop Change Log
 
 
+Trunk (unreleased changes)
+
+ 1. HADOOP-352.  Fix shell scripts to use /bin/sh instead of
+    /bin/bash, for better portability.
+    (Jean-Baptiste Quenot via cutting)
+
+
 Release 0.4.0 - 2006-06-28
 
  1. HADOOP-298.  Improved progress reports for CopyFiles utility, the

Modified: lucene/hadoop/trunk/bin/hadoop
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop (original)
+++ lucene/hadoop/trunk/bin/hadoop Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # 
 # The Hadoop command script
 #
@@ -60,7 +60,7 @@
 HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}"
 
 if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  source "${HADOOP_CONF_DIR}/hadoop-env.sh"
+  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
 # some Java parameters

Modified: lucene/hadoop/trunk/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop-daemon.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop-daemon.sh (original)
+++ lucene/hadoop/trunk/bin/hadoop-daemon.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # 
 # Runs a Hadoop command as a daemon.
 #
@@ -44,7 +44,7 @@
 HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}"
 
 if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  source "${HADOOP_CONF_DIR}/hadoop-env.sh"
+  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
 # get log directory
@@ -72,7 +72,7 @@
   (start)
 
     if [ -f $pid ]; then
-      if [ -a /proc/`cat $pid` ]; then
+      if ps -p `cat $pid` > /dev/null 2>&1; then
         echo $command running as process `cat $pid`.  Stop it first.
         exit 1
       fi
@@ -84,7 +84,7 @@
     fi
 
     echo starting $command, logging to $log
-    nohup "$HADOOP_HOME"/bin/hadoop $command "$@" >& "$log" < /dev/null &
+    nohup "$HADOOP_HOME"/bin/hadoop $command "$@" > "$log" 2>&1 < /dev/null
&
     echo $! > $pid
     sleep 1; head "$log"
     ;;
@@ -92,7 +92,7 @@
   (stop)
 
     if [ -f $pid ]; then
-      if [ -a /proc/`cat $pid` ]; then
+      if ps -p `cat $pid` > /dev/null 2>&1; then
         echo stopping $command
         kill `cat $pid`
       else

Modified: lucene/hadoop/trunk/bin/hadoop-daemons.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop-daemons.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop-daemons.sh (original)
+++ lucene/hadoop/trunk/bin/hadoop-daemons.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # 
 # Run a Hadoop command on all slave hosts.
 

Modified: lucene/hadoop/trunk/bin/rcc
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/rcc?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/rcc (original)
+++ lucene/hadoop/trunk/bin/rcc Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # 
 # The Hadoop record compiler
 #
@@ -31,7 +31,7 @@
 HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}"
 
 if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  source "${HADOOP_CONF_DIR}/hadoop-env.sh"
+  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
 # some Java parameters

Modified: lucene/hadoop/trunk/bin/slaves.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/slaves.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/slaves.sh (original)
+++ lucene/hadoop/trunk/bin/slaves.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # 
 # Run a shell command on all slave hosts.
 #
@@ -38,7 +38,7 @@
 HADOOP_CONF_DIR="${HADOOP_CONF_DIR:=$HADOOP_HOME/conf}"
 
 if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  source "${HADOOP_CONF_DIR}/hadoop-env.sh"
+  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
 if [ "$HADOOP_SLAVES" = "" ]; then

Modified: lucene/hadoop/trunk/bin/start-all.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/start-all.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/start-all.sh (original)
+++ lucene/hadoop/trunk/bin/start-all.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Start all hadoop daemons.  Run this on master node.
 

Modified: lucene/hadoop/trunk/bin/start-dfs.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/start-dfs.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/start-dfs.sh (original)
+++ lucene/hadoop/trunk/bin/start-dfs.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Start hadoop dfs daemons.  Run this on master node.
 

Modified: lucene/hadoop/trunk/bin/start-mapred.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/start-mapred.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/start-mapred.sh (original)
+++ lucene/hadoop/trunk/bin/start-mapred.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Start hadoop map reduce daemons.  Run this on master node.
 

Modified: lucene/hadoop/trunk/bin/stop-all.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/stop-all.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/stop-all.sh (original)
+++ lucene/hadoop/trunk/bin/stop-all.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Stop all hadoop daemons.  Run this on master node.
 

Modified: lucene/hadoop/trunk/bin/stop-dfs.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/stop-dfs.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/stop-dfs.sh (original)
+++ lucene/hadoop/trunk/bin/stop-dfs.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Stop hadoop DFS daemons.  Run this on master node.
 

Modified: lucene/hadoop/trunk/bin/stop-mapred.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/stop-mapred.sh?rev=420758&r1=420757&r2=420758&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/stop-mapred.sh (original)
+++ lucene/hadoop/trunk/bin/stop-mapred.sh Tue Jul 11 01:06:54 2006
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Stop hadoop map reduce daemons.  Run this on master node.
 



Mime
View raw message