######################################################################## # # Description : helper.functions # # Authors : Jim Gifford # # Version : 00.00 # # Notes : # ######################################################################## # Find Logger if [ -x /usr/bin/logger ]; then LOGGER=/usr/bin/logger elif [ -x /bin/logger ]; then LOGGER=/bin/logger else unset LOGGER fi # Output Routine if [ -t 1 -o -z "$LOGGER" ]; then mesg () { echo "$@" } else mesg () { $LOGGER -t $(basename $0)"[$$]" "$@" } fi debug_mesg () { test "$DEBUG" = "" -o "$DEBUG" = no && return mesg "$@" }