1) Added validate command: validates a zookeeper/cluster/installer configuration 
2) Added init command: auto-genration of configuration for pseudo-distributed local mode. 
3) Added shutdown hook for ensuring graceful shutdown of NCs when an asterix instance is shut.


git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_ioc_installer@1294 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-installer/src/main/resources/zookeeper/zk.init b/asterix-installer/src/main/resources/zookeeper/zk.init
index 9b554b1..937d8b3 100755
--- a/asterix-installer/src/main/resources/zookeeper/zk.init
+++ b/asterix-installer/src/main/resources/zookeeper/zk.init
@@ -1,11 +1,11 @@
 ZK_HOME=$1
 shift 1
-cd $MANAGIX_HOME/.managix/zookeeper
+cd $MANAGIX_HOME/.installer/zookeeper
 tar cf zk.pkg.tar *
 zk_server_id=1
 for zk_host in  $@
 do
-  ssh $zk_host "mkdir $ZK_HOME"
+  ssh $zk_host "mkdir -p $ZK_HOME"
   scp ./zk.pkg.tar $zk_host:$ZK_HOME/
   ssh $zk_host "cd $ZK_HOME && tar xf $ZK_HOME/zk.pkg.tar && chmod +x $ZK_HOME/bin/start_zk.sh"
   ssh $zk_host "$ZK_HOME/bin/start_zk.sh $ZK_HOME $zk_server_id" &