Index: zaptel.init =================================================================== RCS file: /usr/cvsroot/zaptel/zaptel.init,v retrieving revision 1.5.2.4 diff -u -r1.5.2.4 zaptel.init --- zaptel.init 1 Mar 2005 15:09:21 -0000 1.5.2.4 +++ zaptel.init 4 May 2005 23:14:40 -0000 @@ -11,19 +11,32 @@ # Source function library. . /etc/rc.d/init.d/functions -[ -f /etc/sysconfig/zaptel ] || exit 0 +# Do we have a sysconfig file? +if ! [ -f /etc/sysconfig/zaptel ]; then + echo "/etc/sysconfig/zaptel not found" + exit 0 +fi # Source zaptel configuration. . /etc/sysconfig/zaptel -# Check that telephony is up. -if [ "${TELEPHONY}" = "no" ]; then +# 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 RETVAL=0 @@ -56,7 +69,7 @@ echo "OK" echo -n "Loading zaptel hardware modules: " for x in $MODULES; do - if insmod ${x} ${ARGS} >& /dev/null; then + if modprobe ${x} ${ARGS} >& /dev/null; then echo -n "$x " fi done