|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Novell Archives Archived content from Novell openSUSE support forums |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
i want to execute some scripts at the end of an internet connection (i am using smpppd/smpppd-web/SuSE9.3). My first thought was to place my script in /etc/ppp/if-down.d/. But doing so i found out that the internet connection is already down while the script is running. But i need a place to do something final when the internet connection is still running (i want to have a file placed on a web space with a server online/offline flag in it). Where do i place such a script? Or do i have to change the smpppd/smpppd-web sources? How? Any help welcome. |
|
|||
|
H-Wagner@gmx.net wrote:
> Hi, > > i want to execute some scripts at the end of an internet connection > (i am using smpppd/smpppd-web/SuSE9.3). My first thought was to > place my script in /etc/ppp/if-down.d/. But doing so i found out > that the internet connection is already down while the script is > running. But i need a place to do something final when the internet > connection is still running (i want to have a file placed on a web > space with a server online/offline flag in it). Where do i place > such a script? Or do i have to change the smpppd/smpppd-web sources? > How? > > Any help welcome. Hi Have a look at the /etc/init.d/skeleton script and modify for your requirements, then for the required start option use $smpppd. See man insserv, install the script with insserv -d -v options. I also make a softlink in the /sbin directory eg rc<scriptname> instead of having to type /etc/init.d/<scriptname> to start/stop etc. -- Cheers Malcolm °¿° |
|
|||
|
> H-Wagner@gmx.net wrote:
> > > Hi, > > > > i want to execute some scripts at the end of an internet connection > > (i am using smpppd/smpppd-web/SuSE9.3). My first thought was to > > place my script in /etc/ppp/if-down.d/. But doing so i found out > > that the internet connection is already down while the script is > > running. But i need a place to do something final when the internet > > connection is still running (i want to have a file placed on a web > > space with a server online/offline flag in it). Where do i place > > such a script? Or do i have to change the smpppd/smpppd-web sources? > > How? > > > > Any help welcome. > Hi > Have a look at the /etc/init.d/skeleton script and modify for your > requirements, then for the required start option use $smpppd. See man > insserv, install the script with insserv -d -v options. > I also make a softlink in the /sbin directory eg rc<scriptname> > instead of having to type /etc/init.d/<scriptname> to start/stop etc. > > -- > Cheers > Malcolm °¿° Hi, i don't want to do something when the run level changes or when the smpppd is started or stopped, but want to do something when someone disconnects internet using "cinternet -stop" (or the equivalent in smpppd-web). Regards |
|
|||
|
H-Wagner@gmx.net wrote:
>> H-Wagner@gmx.net wrote: >> >> > Hi, >> > >> > i want to execute some scripts at the end of an internet >> > connection (i am using smpppd/smpppd-web/SuSE9.3). My first >> > thought was to place my script in /etc/ppp/if-down.d/. But doing >> > so i found out that the internet connection is already down while >> > the script is running. But i need a place to do something final >> > when the internet connection is still running (i want to have a >> > file placed on a web space with a server online/offline flag in >> > it). Where do i place such a script? Or do i have to change the >> > smpppd/smpppd-web sources? How? >> > >> > Any help welcome. >> Hi >> Have a look at the /etc/init.d/skeleton script and modify for your >> requirements, then for the required start option use $smpppd. See >> man insserv, install the script with insserv -d -v options. >> I also make a softlink in the /sbin directory eg rc<scriptname> >> instead of having to type /etc/init.d/<scriptname> to start/stop >> etc. >> >> -- >> Cheers >> Malcolm °¿° > > Hi, > > i don't want to do something when the run level changes or when the > smpppd is started or stopped, but want to do something when someone > disconnects internet using "cinternet -stop" (or the equivalent in > smpppd-web). > > Regards Hi Ahh ok, my apologies. You should be able to pickup the point in the smpppd-web.pl script when the user action is 'stop' and run your scripts here? -- Cheers Malcolm °¿° |
|
|||
|
> H-Wagner@gmx.net wrote:
> > >> H-Wagner@gmx.net wrote: > >> > >> > Hi, > >> > > >> > i want to execute some scripts at the end of an internet > >> > connection (i am using smpppd/smpppd-web/SuSE9.3). My first > >> > thought was to place my script in /etc/ppp/if-down.d/. But doing > >> > so i found out that the internet connection is already down while > >> > the script is running. But i need a place to do something final > >> > when the internet connection is still running (i want to have a > >> > file placed on a web space with a server online/offline flag in > >> > it). Where do i place such a script? Or do i have to change the > >> > smpppd/smpppd-web sources? How? > >> > > >> > Any help welcome. > >> Hi > >> Have a look at the /etc/init.d/skeleton script and modify for your > >> requirements, then for the required start option use $smpppd. See > >> man insserv, install the script with insserv -d -v options. > >> I also make a softlink in the /sbin directory eg rc<scriptname> > >> instead of having to type /etc/init.d/<scriptname> to start/stop > >> etc. > >> > >> -- > >> Cheers > >> Malcolm °¿° > > > > Hi, > > > > i don't want to do something when the run level changes or when the > > smpppd is started or stopped, but want to do something when someone > > disconnects internet using "cinternet -stop" (or the equivalent in > > smpppd-web). > > > > Regards > Hi > Ahh ok, my apologies. You should be able to pickup the point in the > smpppd-web.pl script when the user action is 'stop' and run your > scripts here? > > -- > Cheers > Malcolm °¿° Yes, sure, but then an other user could use "cinternet -stop" from the command line and then the script is never executed. Or think of the auto-disconnect feature (after a idle period). |
|
|||
|
H-Wagner@gmx.net wrote:
>> H-Wagner@gmx.net wrote: >> >> >> H-Wagner@gmx.net wrote: >> >> >> >> > Hi, >> >> > >> >> > i want to execute some scripts at the end of an internet >> >> > connection (i am using smpppd/smpppd-web/SuSE9.3). My first >> >> > thought was to place my script in /etc/ppp/if-down.d/. But >> >> > doing so i found out that the internet connection is already >> >> > down while the script is running. But i need a place to do >> >> > something final when the internet connection is still running >> >> > (i want to have a file placed on a web space with a server >> >> > online/offline flag in it). Where do i place such a script? Or >> >> > do i have to change the smpppd/smpppd-web sources? How? >> >> > >> >> > Any help welcome. >> >> Hi >> >> Have a look at the /etc/init.d/skeleton script and modify for >> >> your requirements, then for the required start option use >> >> $smpppd. See man insserv, install the script with insserv -d -v >> >> options. I also make a softlink in the /sbin directory eg >> >> rc<scriptname> instead of having to type >> >> /etc/init.d/<scriptname> to start/stop etc. >> >> >> >> -- >> >> Cheers >> >> Malcolm °¿° >> > >> > Hi, >> > >> > i don't want to do something when the run level changes or when >> > the smpppd is started or stopped, but want to do something when >> > someone disconnects internet using "cinternet -stop" (or the >> > equivalent in smpppd-web). >> > >> > Regards >> Hi >> Ahh ok, my apologies. You should be able to pickup the point in the >> smpppd-web.pl script when the user action is 'stop' and run your >> scripts here? >> >> -- >> Cheers >> Malcolm °¿° > > Yes, sure, but then an other user could use "cinternet -stop" from > the command line and then the script is never executed. Or think of > the auto-disconnect feature (after a idle period). Hi The only other place I can think of is the /etc/sysconfig/network/scripts/ifdown-ppp script... -- Cheers Malcolm °¿° |
|
|||
|
> > Yes, sure, but then an other user could use "cinternet -stop" from
> > the command line and then the script is never executed. Or think of > > the auto-disconnect feature (after a idle period). > Hi > The only other place I can think of is > the /etc/sysconfig/network/scripts/ifdown-ppp script... > the scripts /etc/sysconfig/network/scripts/ifup-ppp and /etc/sysconfig/network/scripts/ifdown-ppp are never executed! |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|