Index: zaptel.init =================================================================== RCS file: /usr/cvsroot/zaptel/zaptel.init,v retrieving revision 1.12 diff -u -r1.12 zaptel.init --- zaptel.init 4 Apr 2005 23:50:25 -0000 1.12 +++ zaptel.init 5 May 2005 02:50:53 -0000 @@ -25,14 +25,22 @@ # Source zaptel configuration. if [ $system = debian ]; then - [ -f /etc/default/zaptel ] && . /etc/default/zaptel + if ! [ -f /etc/default/zaptel ]; then + echo "/etc/default/zaptel not found" + exit 0 + fi + . /etc/default/zaptel elif [ $system = redhat ]; then - [ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel + if ! [ -f /etc/sysconfig/zaptel ]; then + echo "/etc/sysconfig/zaptel not found" + exit 0 + fi + . /etc/sysconfig/zaptel fi if [ -z "${MODULES}" ]; then # Populate defaults if not present - MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wctdm" + MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wcfxs wctdm" fi RMODULES="" @@ -42,11 +50,23 @@ done # Check that telephony is up. -[ "${TELEPHONY}" = "yes" ] || exit 0 +# Check that telephony is configured +if ! [ "${TELEPHONY}" = "yes" ]; then + echo "TELEPHONY=no in /etc/sysconfig/zaptel" + exit 0 +fi -[ -f /sbin/ztcfg ] || exit 0 +# Do we have ztcfg? +if ! [ -f /sbin/ztcfg ]; then + echo "/sbin/ztcfg not found" + exit 0 +fi -[ -f /etc/zaptel.conf ] || exit 0 +# Do we have a zaptel.conf file? +if ! [ -f /etc/zaptel.conf ]; then + echo "/etc/zaptel.conf not found" + exit 0 +fi if [ "${DEBUG}" = "yes" ]; then ARGS="debug=1"