diff options
Diffstat (limited to 'src/main/swm/common/common.env')
-rw-r--r-- | src/main/swm/common/common.env | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/swm/common/common.env b/src/main/swm/common/common.env new file mode 100644 index 0000000..e788212 --- /dev/null +++ b/src/main/swm/common/common.env @@ -0,0 +1,21 @@ +export ROOT_DIR=${INSTALL_ROOT}opt/app/workload/fe3c/cambria + +OS=`uname` + +if [ "${OS}" = "SunOS" ]; then + CURRENT_USER=`/usr/xpg4/bin/id -un` + CURRENT_GROUP=`/usr/xpg4/bin/id -gn` +else + CURRENT_USER=`id -un` + CURRENT_GROUP=`id -gn` +fi + +export CURRENT_USER CURRENT_GROUP + +# Fail - used to quickly exit with a rc and error message +fail() { + rc=$1 + shift; + echo "ERROR: $@" + exit $rc +} |