keith-turner edited a comment on issue #185: Calling uno within a script fails URL: https://github.com/apache/fluo-uno/issues/185#issuecomment-406484842 I got things to work with saving stdout to another file descriptor. The place where I previously did the saving was called multiple times. ```diff diff --git a/bin/impl/setup-accumulo.sh b/bin/impl/setup-accumulo.sh index ec179ad..f239df1 100755 --- a/bin/impl/setup-accumulo.sh +++ b/bin/impl/setup-accumulo.sh @@ -30,7 +30,7 @@ pkill -f accumulo.start # stop if any command fails set -e -echo >&0 "Setting up Apache Accumulo at $ACCUMULO_HOME" +echo >&5 "Setting up Apache Accumulo at $ACCUMULO_HOME" rm -rf "$INSTALL"/accumulo-* rm -f "$ACCUMULO_LOG_DIR"/* diff --git a/bin/impl/setup-hadoop.sh b/bin/impl/setup-hadoop.sh index d8a81ff..720ff77 100755 --- a/bin/impl/setup-hadoop.sh +++ b/bin/impl/setup-hadoop.sh @@ -24,7 +24,7 @@ pkill -f hadoop.yarn # stop if any command fails set -e -echo >&0 "Setting up Apache Hadoop at $HADOOP_PREFIX" +echo >&5 "Setting up Apache Hadoop at $HADOOP_PREFIX" rm -rf "$INSTALL"/hadoop-* rm -f "$HADOOP_LOG_DIR"/* diff --git a/bin/impl/setup-zookeeper.sh b/bin/impl/setup-zookeeper.sh index 9a6ef37..0814b83 100755 --- a/bin/impl/setup-zookeeper.sh +++ b/bin/impl/setup-zookeeper.sh @@ -23,7 +23,7 @@ pkill -f QuorumPeerMain # stop if any command fails set -e -echo >&0 "Setting up Apache ZooKeeper at $ZOOKEEPER_HOME" +echo >&5 "Setting up Apache ZooKeeper at $ZOOKEEPER_HOME" rm -rf "$INSTALL"/zookeeper-* rm -f "$ZOO_LOG_DIR"/* mkdir -p "$ZOO_LOG_DIR" diff --git a/bin/uno b/bin/uno index 94c74ab..a6c4394 100755 --- a/bin/uno +++ b/bin/uno @@ -40,6 +40,7 @@ fetch) fi ;; setup) + exec 5>&1 [[ -n $LOGS_DIR ]] && rm -f "$LOGS_DIR"/setup/*.std{out,err} echo "Beginning setup (detailed logs in $LOGS_DIR/setup)..." case "$2" in ``` With the above change I see the following. Still not sure if taking over fd 5 is a good thing to do. ``` $ ./bin/uno setup accumulo Beginning setup (detailed logs in /home/ubuntu/git/uno/install/logs/setup)... Setting up Apache Hadoop at /home/ubuntu/git/uno/install/hadoop-2.8.4 Setting up Apache ZooKeeper at /home/ubuntu/git/uno/install/zookeeper-3.4.12 Setting up Apache Accumulo at /home/ubuntu/git/uno/install/accumulo-2.0.0-SNAPSHOT Setup complete. ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
