#!/bin/sh

# /etc/ppp/ip-up
#
# started by pppd when the link goes up
#
# Purpose : 
# Master stopper for modulized services


#
# This is inspired by the way, SuSE handles the runlevel scripts :
# dive in
#
# /etc/ppp/service/stop
#
# And execute anything, found in there. This makes it very easy, to add
# a new service, just write the (service)script, put it in
# /etc/ppp/service and then make a link pointing to it in /etc/ppp/service/stop
# (and of course also in /etc/ppp/service/start, unless the service is
# executed on shut down only ;) ).
#
# Each link starts with a two digit number (I hope, no one will ever
# want to run more then 99 services), this way, services are stoped
# in a sorted way (lower numbers first)
#
# IMPORTANT : For security reasons, always use absolute links and
# always use absolute pathnames. Otherwise a normal user could get
# root access, if you let him/her establish the link using sudo !
# Also be carefull with what you link in /etc/ppp/service/start and
# /etc/ppp/service/stop make sure it doesn't have any unwanted site
# effects !

for SCRIPT in /etc/ppp/service/start/*; do
  $SCRIPT stop
done

