#!/bin/bash
### BEGIN BOOT SCRIPT INFO
#Long-Name: Hercules
#Short-Name: hercules
### END BOOT SCRIPT INFO
### BEGIN BOOT SCRIPT INSTALLATION DEFAULTS
#Launch-Mode: gui-and-terminal
### END BOOT SCRIPT INSTALLATION DEFAULTS
#
#This script is specific to ZZSA under Hercules, selecting between configuration
#files for different Hercules OS installations within non_os/zzsa_config based
#on the name of the symlink to this script (e.g. zzsa_os360_mvt_21.8f_asp_boot
#will run Hercules with zzsa_os360_mvt_21.8f_asp.cnf).

. bootscriptfunctions.sh

CNFNAME="${OSM_INSTALL_NAME}.cnf"

if [ "`basename $PWD`" != "zzsa_config" ]
then
   echo 'This script is only meant to be run from s3x0/non_os .'
   exit 1
fi

if [ ! -f ${OSM_INSTALL_NAME}.cnf ]
then
   echo `basename $0`": error: $CNFNAME not found."
   exit 1
fi

exec hercules -f $CNFNAME
