#!/bin/sh
which dirname >/dev/null 
# does dirname exit?
if [ $? = 0 ] ; then
  cwd=`dirname $0`
  if [ x$cwd = x. ]; then
     cwd=`pwd`
  fi
  if [ x$cwd = x/sbin ] ; then
     echo "bconsole not properly installed."  
     exit 1
  fi
fi
if [ x/sbin = x/etc ]; then
   echo "bconsole not properly installed."
   exit 1
fi
if [ $# = 1 ] ; then
   echo "doing bconsole $1.conf"
   /sbin/bconsole -c $1.conf
else
   /sbin/bconsole -c /etc/bconsole.conf
fi


syntax highlighted by Code2HTML, v. 0.9.1