openSUSE Forums > Archives > Novell Archives » smpppd: executing script at the end of an internet connection

Go Back   openSUSE Forums > Archives > Novell Archives
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
  #1 (permalink)  
Old 16-May-2006, 07:10
H-Wagner@gmx.net
Guest
 
Posts: n/a
Default smpppd: executing script at the end of an internet connection

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.


  #2 (permalink)  
Old 16-May-2006, 07:18
Malcolm
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

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 °¿°
  #3 (permalink)  
Old 16-May-2006, 07:29
H-Wagner@gmx.net
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

> 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
  #4 (permalink)  
Old 16-May-2006, 08:11
Malcolm
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

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 °¿°
  #5 (permalink)  
Old 16-May-2006, 08:51
H-Wagner@gmx.net
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

> 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).

  #6 (permalink)  
Old 16-May-2006, 10:28
Malcolm
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

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 °¿°
  #7 (permalink)  
Old 18-May-2006, 02:15
H-Wagner@gmx.net
Guest
 
Posts: n/a
Default Re: smpppd: executing script at the end of an internet connection

> > 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2