--- dahdi.init 2009-01-24 18:13:34.000000000 -0500 +++ dahdi.init.suse 2009-01-24 18:13:54.000000000 -0500 @@ -40,7 +40,7 @@ DAHDI_DEV_TIMEOUT=20 # # Determine which kind of configuration we're using # -system=redhat # assume redhat +system=suse # assume redhat if [ -f /etc/debian_version ]; then system=debian fi @@ -48,13 +48,15 @@ fi # Source function library. if [ $system = redhat ]; then . $initdir/functions || exit 0 +elif [ $system = suse ]; then + . /etc/rc.status || exit 0 fi DAHDI_MODULES_FILE="/etc/dahdi/modules" [ -r /etc/dahdi/init.conf ] && . /etc/dahdi/init.conf -if [ $system = redhat ]; then +if [ $system = redhat -o $system = suse ]; then LOCKFILE=/var/lock/subsys/dahdi fi @@ -127,6 +129,10 @@ hpec_start() { /usr/sbin/zaphpec_enable 2> /dev/null elif [ $system = redhat ]; then action "Running zaphpec_enable: " /usr/sbin/zaphpec_enable + elif [ $system = suse ]; then + echo -n "Running zaphpec_enable: " + /usr/sbin/zaphpec_enable + rc_status -v fi if [ $? = 0 ]; then echo -n "done" @@ -179,6 +185,10 @@ case "$1" in fi elif [ $system = redhat ]; then action " ${line}: " modprobe $line + elif [ $system = suse ]; then + echo -n " ${line}: " + modprobe $line + rc_status -v fi done echo "" @@ -207,6 +217,10 @@ case "$1" in echo "." elif [ $system = redhat ]; then action "Running dahdi_cfg: " $DAHDI_CFG_CMD + elif [ $system = suse ]; then + echo -n "Running dahdi_cfg: " + $DAHDI_CFG_CMD + rc_status -v fi RETVAL=$? @@ -226,9 +240,9 @@ case "$1" in #shutdown_dynamic # FIXME: needs test from someone with dynamic spans echo -n "Unloading DAHDI hardware modules: " if unload_module dahdi; then - echo -n "done" + echo -en "done\n" else - echo -n "error" + echo -en "error\n" fi if [ "$LOCKFILE" != '' ]; then [ $RETVAL -eq 0 ] && rm -f $LOCKFILE @@ -248,6 +262,10 @@ case "$1" in echo "." elif [ $system = redhat ]; then action "Rerunning dahdi_cfg: " $DAHDI_CFG_CMD + elif [ $system = suse ]; then + echo -n "Rerunning dahdi_cfg: " + $DAHDI_CFG_CMD + rc_status -v fi RETVAL=$? ;;