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

Re: ip-up scripts [was: Re: /etc/lynx.cfg ...]



*- On  2 Apr, homega@vlc.servicom.es wrote about "ip-up scripts [was: Re: /etc/lynx.cfg ...]"
> 
> Another issue ... I'm trying to add some actions to the ip-up script, ie.
> just trying to get the queued mail sent and then have the mail in the ISP
> fetched automatically right after connection.  Also, I want the system clock
> to update from a server and then the CMOS clock to update from the system's.
> 
> I'm in the belief that /etc/ppp/ip-up line
> 
> # Main Script starts here
> 
> run-parts /etc/ppp/ip-up.d
> 
> # last line
> 
> means that it will read any script in /etc/ppp/ip-up.d ... but I put these
> two scripts in there (and set permissions to 755):
> 
> --------- /etc/ppp/ip-up.d/hora ---------
> #!/bin/sh
> # /etc/init.d/cron stop
> /usr/sbin/rdate -s slug.ctv.es
> /sbin/hwclock --systohc
> # /etc/init.d/cron start
> --------- /etc/ppp/ip-up.d/hora ---------
> 
> --------- /etc/ppp/ip-up.d/queue ---------
> #!/bin/sh
> runq -v
> fetchmail -v -a -u a4608456
> --------- /etc/ppp/ip-up.d/queue ---------
> 
> and runq seems to work (though not verbosely), but fetchmail doesn't work at
> all.  I don't really know whether the clock script works, since I recently
> updated the time from the command line.
> 
> May be the fact that permissions to /etc/ppp/ are set drwx------ has got to
> do with it?
> 

>From the pppd man page under the SCRIPTS section,

                                         The scripts are executed
       as root (with the real and effective user-id set to 0), so
       that  they  can do things such as update routing tables or
       run privileged daemons.  Be careful that the  contents  of
       these  scripts  do  not compromise your system's security.
       Pppd runs the scripts  with  standard  input,  output  and
       error  redirected  to  /dev/null,


-- 
Brian 
---------------------------------------------------------------------
"Never criticize anybody until you have walked a mile in their shoes,  
 because by that time you will be a mile away and have their shoes." 
							   - unknown  

Mechanical Engineering                                bservis@usa.net
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: