Why script ip-down.local is doing nothing?
Thomas Springer
th.springer at gmx.net
Wed Jul 27 12:40:21 UTC 2005
Hello,
Parameshwara Bhat wrote:
> Hello List,
>
> 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
>
> I get nothing. What I am missing here?
>
> Regards,
>
> Parameshwara Bhat
>
I noticed that, too.It's probably a SELinux issue.
My idea was to add a line :
/var/log/ppp-usage -- system_u:object_r:pppd_log_t
in
/etc/selinux/targeted/contexts/files/file_contexts
(circa at line 1441 - ppp section you will find a simualar expression)
and
# setfiles -vv </etc/selinux/(...)/file_contexts> /var/log/ppp-usage
or
# touch /.autorelabel && reboot
That works for now.
Thomas.
More information about the fedora-list
mailing list