Why script ip-down.local is doing nothing?

Alexander Dalloz ad+lists at uni-x.org
Wed Jul 27 11:50:33 UTC 2005


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 at 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 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050727/be05443f/attachment-0001.sig>


More information about the fedora-list mailing list