Added name server configured check to sqstart script when SQ_NAMESERVER_ENABLED is enabled.
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/8e4f2c79 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/8e4f2c79 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/8e4f2c79 Branch: refs/heads/master Commit: 8e4f2c79758192dc840b67bb002752e6bae0ef2c Parents: 019cd5a Author: Zalo Correa <[email protected]> Authored: Fri May 18 16:09:00 2018 -0700 Committer: Zalo Correa <[email protected]> Committed: Fri May 18 16:09:00 2018 -0700 ---------------------------------------------------------------------- core/sqf/sql/scripts/sqstart | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/8e4f2c79/core/sqf/sql/scripts/sqstart ---------------------------------------------------------------------- diff --git a/core/sqf/sql/scripts/sqstart b/core/sqf/sql/scripts/sqstart index cd55a49..8e41afc 100755 --- a/core/sqf/sql/scripts/sqstart +++ b/core/sqf/sql/scripts/sqstart @@ -294,6 +294,18 @@ fi checkUlimit +let nameserver_configured=`trafconf -ns | grep nodes | wc -l` + +if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then + if [ $nameserver_configured '<' 1 ]; then + echoLog + echoLog "SQ_NAMESERVER_ENABLED is enabled and the Name Server is not configured." + echoLog "Please ensure the name-server section is in the 'sqconfig' file, and re-run 'sqgen'." + echoLog + exit 1; + fi +fi + # Check SeaMonster kernel module if SeaMonster is enabled if [[ $SQ_SEAMONSTER == "1" ]]; then echoLog
