diff --git a/bin/hbase-daemon.sh b/bin/hbase-daemon.sh index 569bbb3..01b0721 100755 --- a/bin/hbase-daemon.sh +++ b/bin/hbase-daemon.sh @@ -148,11 +148,17 @@ case $startStop in echo starting $command, logging to $logout # Add to the command log file vital stats on our environment. echo "`date` Starting $command on `hostname`" >> $loglog + [ $? -eq 0 ] || echo "[WARN] Failed to write $loglog when starting $command on `hostname`." echo "`ulimit -a`" >> $loglog 2>&1 + [ $? -eq 0 ] || echo "[WARN] Failed to write $loglog when echo \'ulimit -a\'. " + if [ ! -w $logout ]; then + echo "[WARN] $logout on `hostname` does not have write permission." + fi nohup nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \ --config "${HBASE_CONF_DIR}" \ $command "$@" $startStop > "$logout" 2>&1 < /dev/null & echo $! > $pid + [ $? -eq 0 ] || echo "[WARN] Failed to write $pid with process id." sleep 1; head "$logout" ;; @@ -162,6 +168,7 @@ case $startStop in if kill -0 `cat $pid` > /dev/null 2>&1; then echo -n stopping $command echo "`date` Terminating $command" >> $loglog + [ $? -eq 0 ] || echo "[WARN] Failed to write $loglog before stopping $command." kill `cat $pid` > /dev/null 2>&1 while kill -0 `cat $pid` > /dev/null 2>&1; do echo -n "."