Browse Source

HADOOP-1689. Make shell scripts more portable.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@568809 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 17 years ago
parent
commit
3d0f63f6c9

+ 5 - 0
CHANGES.txt

@@ -78,6 +78,11 @@ Trunk (unreleased changes)
     HADOOP-1731.  Add Hadoop's version to contrib jar file names.
     (cutting)
 
+    HADOOP-1689.  Make shell scripts more portable.  All shell scripts
+    now explicitly depend on bash, but do not require that bash be
+    installed in a particular location, as long as it is on $PATH.
+    (cutting)
+
 
 Release 0.14.0 - 2007-08-17
 

+ 1 - 1
bin/hadoop

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # 
 # The Hadoop command script
 #

+ 1 - 1
bin/hadoop-daemon.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # 
 # Runs a Hadoop command as a daemon.
 #

+ 1 - 1
bin/hadoop-daemons.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # 
 # Run a Hadoop command on all slave hosts.
 

+ 1 - 1
bin/rcc

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # 
 # The Hadoop record compiler
 #

+ 1 - 1
bin/slaves.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # 
 # Run a shell command on all slave hosts.
 #

+ 1 - 1
bin/start-all.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Start all hadoop daemons.  Run this on master node.
 

+ 1 - 1
bin/start-dfs.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Start hadoop dfs daemons.
 # Optinally upgrade or rollback dfs state.

+ 1 - 1
bin/start-mapred.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Start hadoop map reduce daemons.  Run this on master node.
 

+ 1 - 1
bin/stop-all.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Stop all hadoop daemons.  Run this on master node.
 

+ 1 - 1
bin/stop-dfs.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Stop hadoop DFS daemons.  Run this on master node.
 

+ 1 - 1
bin/stop-mapred.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Stop hadoop map reduce daemons.  Run this on master node.
 

+ 1 - 1
src/contrib/ec2/bin/create-hadoop-image

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Create a Hadoop AMI.
 # Inspired by Jonathan Siegel's EC2 script (http://blogsiegel.blogspot.com/2006/08/sandboxing-amazon-ec2.html)
 

+ 2 - 2
src/contrib/ec2/bin/hadoop-ec2

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
@@ -33,4 +33,4 @@ elif [ "$COMMAND" = "login" ] ; then
 elif [ "$COMMAND" = "terminate-cluster" ] ; then
   . "$bin"/terminate-hadoop-cluster
 fi
-  
+  

+ 1 - 1
src/contrib/ec2/bin/launch-hadoop-cluster

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Launch an EC2 cluster of Hadoop instances.
 
 # Import variables

+ 1 - 1
src/contrib/ec2/bin/login-hadoop-cluster

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Login to the master node of a running Hadoop EC2 cluster.
 
 # Import variables

+ 2 - 2
src/contrib/ec2/bin/run-hadoop-cluster

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Launch an EC2 cluster of Hadoop instances, start Hadoop, and connect to the master.
 
 # Import variables
@@ -15,4 +15,4 @@ read dummy
 echo "Waiting before trying to connect..."
 sleep 30
 
-"$bin"/start-hadoop
+"$bin"/start-hadoop

+ 1 - 1
src/contrib/ec2/bin/start-hadoop

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Start Hadoop on a cluster.
 
 # Import variables

+ 1 - 1
src/contrib/ec2/bin/terminate-hadoop-cluster

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Terminate a cluster.
 
 # Import variables

+ 1 - 1
src/contrib/hbase/bin/hbase

@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation

+ 1 - 1
src/contrib/hbase/bin/hbase-daemon.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation

+ 1 - 1
src/contrib/hbase/bin/hbase-daemons.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation

+ 1 - 1
src/contrib/hbase/bin/regionservers.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation

+ 1 - 1
src/contrib/hbase/bin/start-hbase.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation

+ 1 - 1
src/contrib/hbase/bin/stop-hbase.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #/**
 # * Copyright 2007 The Apache Software Foundation