#!/bin/sh

start() {
    for i in /etc/ppp/serial*.conf ; do
        if [ -r "$i" ]; then
            /usr/local/bin/serialif/StartSerialif $i &> /dev/null &
        fi
    done
}
stop() {
    busybox killall -9 StartSerialif
    busybox killall -9 renameif
}
restart() {
    stop
    start
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload)
    restart
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit $?
