[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#4674: ppp postinst bugs



   ppp does not start automatically unless you edit /etc/init.d/ppp

   I really do not know what the purpose of that script is. If no one objects
   then I will remove the whole /etc/init.d/ppp script.

Please keep it... It is nice when one wants to start ppp at startup. I
suggest having reading like the modified script included at the end of this
mail. This way one can enable ppp at startup by editing the

	run_ppd=0

line (it would be better in something like the /etc/default we don't talk
about for a while...), and force the run/stop with arguments on and off.
I have this script linked to /usr/sbin and use the on and off arguments
when needed, I find that useful.

Yves.

#! /bin/sh
# /etc/init.d/ppp: start or stop PPP.

test -x /usr/sbin/pppd || exit 0

# Set run_pppd to 1 to start ppp at boot or 0 to disable it.
run_pppd=0

action="$1"

case "$action" in
   on)
	action=start
	run_ppd=1
	;;
   off)
	action=stop
	run_ppd=1
	;;
esac

case "$action" in
  start)
    if [ $run_pppd -eq 1 ]
    then
      start-stop-daemon --start --verbose --exec /usr/sbin/pppd
    fi
    ;;
  stop)
    if [ $run_pppd -eq 1 ]
    then
      start-stop-daemon --stop --verbose --exec /usr/sbin/pppd
    fi
    ;;
  *)
    echo "Usage: /etc/init.d/ppp {start|stop|on|off}"
    exit 1
esac

exit 0




--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: