Re: Why script ip-down.local is doing nothing?

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

 



Am Mi, den 27.07.2005 schrieb Parameshwara Bhat um 13:09:+
> I have created a script in ip-down.local as follows on the advice of  
> Mr.Alexander Dalloz on the list,
> 
> [pbhat@sidharth ~]$ cat /etc/ppp/ip-down.local
> DATE=$(date +"%Y.%m.%d %H:%M:%S")
> # Format: date  time  onlinetime [s]  bytes send   bytes received
> /bin/echo $DATE $CONNECT_TIME $BYTES_SENT $BYTES_RCVD >>/var/log/ppp-usage
> 
> I have also created an empty file in /var/log/ppp-usage.
> 
> Now I expected this file to be updated each time connection went down.  
> This doesn't seem to be happening. This file remains empty.
> 
> If I issue command
> 
> /sbin/echo $CONNECT_TIME

All variables are only available at pppd disconnect time. You can't
request the contend of $BYTES_SENT for instance during a ppp session.

> I get nothing. What I am missing here?

Paul's hint regarding SELinux context is good. For debugging purposes
you could too add a command to ip-down.local like (single command line,
probably wrapped in mail here):

/usr/bin/logger -t "PPP DEBUG" -p kern.debug "ppp went down after
$CONNECT_TIME seconds"

You then should find the logger notice in your system log
(/var/log/messages).

> Parameshwara Bhat

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp 
Serendipity 13:39:30 up 11 days, 18:12, load average: 0.07, 0.06, 0.06 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux