You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/06/29 21:47:20 UTC

incubator-asterixdb git commit: Make managix scripts properly executable

Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master ae85a1dc8 -> d8071eeb2


Make managix scripts properly executable

Most of the scripts managix was using were missing the shebang at the beginning of the script.
This can be problematic if one uses a shell besides bash. This patch fixes that.

Change-Id: Ie7722f832d0d25bec049e123a0ed1570d0aeb650
Reviewed-on: https://asterix-gerrit.ics.uci.edu/286
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Raman Grover <ra...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/d8071eeb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/d8071eeb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/d8071eeb

Branch: refs/heads/master
Commit: d8071eeb203bdd63bc5d1b59d3100c0f9d2069d8
Parents: ae85a1d
Author: Ian Maxon <im...@apache.org>
Authored: Wed Jun 24 17:39:05 2015 -0700
Committer: Ian Maxon <im...@apache.org>
Committed: Mon Jun 29 11:50:48 2015 -0700

----------------------------------------------------------------------
 asterix-events/src/main/resources/events/backup/backup.sh        | 3 +++
 .../src/main/resources/events/cc_failure/cc_failure.sh           | 3 ++-
 asterix-events/src/main/resources/events/cc_start/cc_start.sh    | 4 +++-
 asterix-events/src/main/resources/events/execute.sh              | 2 ++
 asterix-events/src/main/resources/events/file/create_file.sh     | 2 ++
 asterix-events/src/main/resources/events/file/delete.sh          | 2 ++
 asterix-events/src/main/resources/events/file/dir_copy.sh        | 2 ++
 asterix-events/src/main/resources/events/file/dir_transfer.sh    | 2 ++
 asterix-events/src/main/resources/events/file/transfer.sh        | 3 +++
 asterix-events/src/main/resources/events/hdfs/delete.sh          | 2 ++
 .../src/main/resources/events/node_failure/nc_failure.sh         | 2 ++
 asterix-events/src/main/resources/events/node_info/node_info.sh  | 3 +++
 asterix-events/src/main/resources/events/node_join/nc_join.sh    | 2 ++
 .../src/main/resources/events/node_restart/nc_restart.sh         | 2 ++
 asterix-events/src/main/resources/events/prepare.sh              | 1 +
 asterix-events/src/main/resources/events/restore/restore.sh      | 2 ++
 asterix-events/src/main/resources/scripts/execute.sh             | 1 +
 asterix-events/src/main/resources/scripts/prepare.sh             | 1 +
 asterix-installer/src/main/resources/zookeeper/start_zk.sh       | 3 ++-
 asterix-installer/src/main/resources/zookeeper/stop_zk           | 2 ++
 asterix-installer/src/main/resources/zookeeper/zk.init           | 2 ++
 21 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/backup/backup.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/backup/backup.sh b/asterix-events/src/main/resources/events/backup/backup.sh
index ec28b59..350e795 100644
--- a/asterix-events/src/main/resources/events/backup/backup.sh
+++ b/asterix-events/src/main/resources/events/backup/backup.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
+
 WORKING_DIR=$1
 ASTERIX_INSTANCE_NAME=$2
 ASTERIX_IODEVICES=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh b/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
index 2b98b60..cd04071 100644
--- a/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
+++ b/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
-#kill -9 `ps -ef  | grep hyracks | grep -v grep | cut -d "/" -f1 | tr -s " " | cut -d " " -f2`
+
 CC_PARENT_ID_INFO=`ps -ef  | grep asterix | grep cc_start | grep -v ssh`
 CC_PARENT_ID=`echo $CC_PARENT_ID_INFO | tr -s " " | cut -d " " -f2`
 CC_ID_INFO=`ps -ef | grep asterix | grep $CC_PARENT_ID | grep -v bash`

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/cc_start/cc_start.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/cc_start/cc_start.sh b/asterix-events/src/main/resources/events/cc_start/cc_start.sh
index 068c152..a5fb853 100644
--- a/asterix-events/src/main/resources/events/cc_start/cc_start.sh
+++ b/asterix-events/src/main/resources/events/cc_start/cc_start.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
-if [ ! -d $LOG_DIR ]; 
+
+if [ ! -d $LOG_DIR ];
 then 
   mkdir -p $LOG_DIR
 fi

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/execute.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/execute.sh b/asterix-events/src/main/resources/events/execute.sh
index 30f6c2f..3534c63 100644
--- a/asterix-events/src/main/resources/events/execute.sh
+++ b/asterix-events/src/main/resources/events/execute.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
 USERNAME=$1
 if [ ! -d $MANAGIX_HOME/logs ];
 then

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/file/create_file.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/file/create_file.sh b/asterix-events/src/main/resources/events/file/create_file.sh
index 762a2d3..dbec6b4 100644
--- a/asterix-events/src/main/resources/events/file/create_file.sh
+++ b/asterix-events/src/main/resources/events/file/create_file.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
 mkdir -p $1
 echo "touch $1/$2" >> ~/file_create.log
 touch $1/$2

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/file/delete.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/file/delete.sh b/asterix-events/src/main/resources/events/file/delete.sh
index a6673e2..c9399f9 100644
--- a/asterix-events/src/main/resources/events/file/delete.sh
+++ b/asterix-events/src/main/resources/events/file/delete.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 PATH_TO_DELETE=$1
 echo "rm -rf $PATH_TO_DELETE" >> ~/backup.log
 rm -rf $PATH_TO_DELETE

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/file/dir_copy.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/file/dir_copy.sh b/asterix-events/src/main/resources/events/file/dir_copy.sh
index bac2f32..8273c6a 100755
--- a/asterix-events/src/main/resources/events/file/dir_copy.sh
+++ b/asterix-events/src/main/resources/events/file/dir_copy.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 USERNAME=$1
 SRC_HOST=$2
 SRC_DIR=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/file/dir_transfer.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/file/dir_transfer.sh b/asterix-events/src/main/resources/events/file/dir_transfer.sh
index 6818149..6fbbcee 100644
--- a/asterix-events/src/main/resources/events/file/dir_transfer.sh
+++ b/asterix-events/src/main/resources/events/file/dir_transfer.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 USERNAME=$1
 DIR_TO_TRANSFER=$2
 DEST_HOST=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/file/transfer.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/file/transfer.sh b/asterix-events/src/main/resources/events/file/transfer.sh
index 8b5dfa3..b7dd5f7 100644
--- a/asterix-events/src/main/resources/events/file/transfer.sh
+++ b/asterix-events/src/main/resources/events/file/transfer.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
+
 USERNAME=$1
 FILE_TO_TRANSFER=$2
 DEST_HOST=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/hdfs/delete.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/hdfs/delete.sh b/asterix-events/src/main/resources/events/hdfs/delete.sh
index 27af4d1..19a7196 100644
--- a/asterix-events/src/main/resources/events/hdfs/delete.sh
+++ b/asterix-events/src/main/resources/events/hdfs/delete.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 WORKING_DIR=$1
 HADOOP_VERSION=$2
 HDFS_URL=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/node_failure/nc_failure.sh b/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
index 727d09c..08e3f17 100644
--- a/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
+++ b/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 NC_ID=$1
 
 INFO=`ps -ef | grep nc_join | grep -v grep | grep -v ssh| grep $NC_ID | head -n 1`

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/node_info/node_info.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/node_info/node_info.sh b/asterix-events/src/main/resources/events/node_info/node_info.sh
index ad0a5f9..4619d5e 100644
--- a/asterix-events/src/main/resources/events/node_info/node_info.sh
+++ b/asterix-events/src/main/resources/events/node_info/node_info.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,5 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
+
 JAVA_VERSION=`java -version 2>&1 |awk 'NR==1{ gsub(/"/,""); print $3 }'`
 echo "java_version=$JAVA_VERSION" 1>&2

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/node_join/nc_join.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/node_join/nc_join.sh b/asterix-events/src/main/resources/events/node_join/nc_join.sh
index 3dba3f8..035615d 100644
--- a/asterix-events/src/main/resources/events/node_join/nc_join.sh
+++ b/asterix-events/src/main/resources/events/node_join/nc_join.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 CC_HOST=$1
 NC_ID=$2
 IO_DEVICES=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/node_restart/nc_restart.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/node_restart/nc_restart.sh b/asterix-events/src/main/resources/events/node_restart/nc_restart.sh
index 3912d9d..5ad6526 100644
--- a/asterix-events/src/main/resources/events/node_restart/nc_restart.sh
+++ b/asterix-events/src/main/resources/events/node_restart/nc_restart.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 CC_HOST=$1
 NC_ID=$2
 SLEEP_TIME=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/prepare.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/prepare.sh b/asterix-events/src/main/resources/events/prepare.sh
index e69de29..f1f641a 100644
--- a/asterix-events/src/main/resources/events/prepare.sh
+++ b/asterix-events/src/main/resources/events/prepare.sh
@@ -0,0 +1 @@
+#!/usr/bin/env bash

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/events/restore/restore.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/events/restore/restore.sh b/asterix-events/src/main/resources/events/restore/restore.sh
index 5d25031..f77ee02 100644
--- a/asterix-events/src/main/resources/events/restore/restore.sh
+++ b/asterix-events/src/main/resources/events/restore/restore.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #*/
+
 WORKING_DIR=$1
 ASTERIX_INSTANCE_NAME=$2
 ASTERIX_IODEVICES=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/scripts/execute.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/scripts/execute.sh b/asterix-events/src/main/resources/scripts/execute.sh
index 658ffff..fc198ad 100644
--- a/asterix-events/src/main/resources/scripts/execute.sh
+++ b/asterix-events/src/main/resources/scripts/execute.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-events/src/main/resources/scripts/prepare.sh
----------------------------------------------------------------------
diff --git a/asterix-events/src/main/resources/scripts/prepare.sh b/asterix-events/src/main/resources/scripts/prepare.sh
index 9af8792..cde3f59 100644
--- a/asterix-events/src/main/resources/scripts/prepare.sh
+++ b/asterix-events/src/main/resources/scripts/prepare.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-installer/src/main/resources/zookeeper/start_zk.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/main/resources/zookeeper/start_zk.sh b/asterix-installer/src/main/resources/zookeeper/start_zk.sh
old mode 100644
new mode 100755
index 0a2b51e..86769cd
--- a/asterix-installer/src/main/resources/zookeeper/start_zk.sh
+++ b/asterix-installer/src/main/resources/zookeeper/start_zk.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #/*
 # Copyright 2009-2013 by The Regents of the University of California
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,7 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#*/
+
 ZK_HOME=$1
 ZK_ID=$2
 JAVA_HOME=$3

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-installer/src/main/resources/zookeeper/stop_zk
----------------------------------------------------------------------
diff --git a/asterix-installer/src/main/resources/zookeeper/stop_zk b/asterix-installer/src/main/resources/zookeeper/stop_zk
index 9bef86e..84d9b74 100644
--- a/asterix-installer/src/main/resources/zookeeper/stop_zk
+++ b/asterix-installer/src/main/resources/zookeeper/stop_zk
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
 ZK_HOME=$1
 shift 1
 for zk_host in  $@

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d8071eeb/asterix-installer/src/main/resources/zookeeper/zk.init
----------------------------------------------------------------------
diff --git a/asterix-installer/src/main/resources/zookeeper/zk.init b/asterix-installer/src/main/resources/zookeeper/zk.init
index 8ef6f5f..6b26363 100644
--- a/asterix-installer/src/main/resources/zookeeper/zk.init
+++ b/asterix-installer/src/main/resources/zookeeper/zk.init
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
 ZK_HOME=$1
 SERVER_JAVA_HOME=$2
 shift 2