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

Re: Send message on ppp going up|down [was Re: Install just samba client?]



This sort of thing was a problem for me (running a script on ppp going
up or down).

After much searching on google, I ended up issuing my commands from a
shell script like so -
monmouth:
 !bg /etc/ppp/ppp.etherup

where ppp.etherup is - 
#!/bin/sh

/usr/local/bin/fetchmail -t 30 -d 1200 -s -f /etc/fetchmail.conf --syslog

I remember a problem with arguments that made me go this route. My next
problem was that the command was executed as the user who made the ppp
connection. My solution was inelegant and insecure.



On Tue, 02 Sep 2003 09:53:03 +1000
"Damon McMahon" <inst_karma@hotmail.com> wrote:

> Thanks for your response, Alexander.
> 
> Nothing in /var/log/daemon [to where ppp logs] and nothing in the
> samba client log either - so I know the script is not being executed,
> I'm just not sure why?
> 
> I modelled it on /etc/ppp/ppp.linkdown.sample, which uses
> 
>   !bg /usr/X11R6/bin/auplay /etc/ppp/linkdown.au
> 
> so I think perhaps my shell syntax/semantics are incorrect?
> 
> 
> >From: Alexander.Farber@t-online.de (Alexander Farber)
> >To: Damon McMahon <inst_karma@hotmail.com>
> >CC: misc@openbsd.org
> >Subject: Re: Send message on ppp going up|down [was Re: Install just
> >samba client?]
> >Date: Mon, 1 Sep 2003 13:57:49 +0000
> >
> >What do you see in the ppp log?
> >What do you see in the Samba logs?
> >
> >On Mon, Sep 01, 2003 at 03:56:35PM +1000, Damon McMahon wrote:
> > > Looking through the ppp(8) man page I thought of using
> > > /etc/ppp/ppp.link<up|down>, something like:
> > >
> > > <ppp.conf label>:
> > >        !bg /bin/cat /etc/ppp/ppp.linkdown.msg | tee | \
> > >                /usr/local/bin/smbclient -U wendolene \
> > >                -M <target's NetBIOS name> -I <target's IP address>
> > >
> > > This is not causing a SMB message to be sent, however. Is my shell
> > > scripting awful, or am I misunderstanding the usage of
> > > /etc/ppp/ppp.link<up|down> ?
> 
> _________________________________________________________________
> Get less junk mail with ninemsn Premium. Click here  
> http://ninemsn.com.au/premium/landing.asp