From 3cc8a9ca1f70f598d84e38b5620db642d121659b Mon Sep 17 00:00:00 2001
From: Matt Massie <matt@cloudera.com>
Date: Fri, 31 Jul 2009 19:09:46 -0700
Subject: [PATCH] Fix the hadoop/sqoop wrapper scripts

---
 cloudera/install_hadoop.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cloudera/install_hadoop.sh b/cloudera/install_hadoop.sh
index 93a748d..9560330 100755
--- a/cloudera/install_hadoop.sh
+++ b/cloudera/install_hadoop.sh
@@ -122,13 +122,14 @@ done
 mkdir -p $BIN_DIR
 
 for bin_wrapper in hadoop sqoop ; do
-  cat > $BIN_DIR/$bin_wrapper-$APACHE_BRANCH <<EOF
+  wrapper=$BIN_DIR/$bin_wrapper-$APACHE_BRANCH
+  cat > $wrapper <<EOF
 #!/bin/sh
 
 export HADOOP_HOME=$INSTALLED_LIB_DIR
 exec $INSTALLED_LIB_DIR/bin/$bin_wrapper \$*
 EOF
-  chmod 755 $BIN_DIR/$bin_wrapper
+  chmod 755 $wrapper
 done
 
 # Fix some bad permissions in HOD
-- 
1.6.0.4

