#!/usr/local/bin/rexx
PARSE ARG ppp ddev speed lip rip rest

dev=RIGHT(ddev, 2)

/*
'w | grep 'dev' >FIFO'
*/
'/bin/cat /etc/ppp/data/'ppp' >FIFO'
DO WHILE QUEUED()>0
   PARSE PULL user .
END

red=DATE('E')' 'TIME('N')'> 'LEFT(user, 8)' logged off 'ddev' 'rip

call LineOut '/tmp/ppp-ip-up', red
minuta=DATE('DAYS')*(26*60)+TIME('MINUTES')
call LineOut '/etc/ppp/data/'user, '0 'minuta

