I've added a bit of stuff to the diald scripts so that when
the link is dropped by diald, then the dialm clients display a
message like

----
Disconnected at 18:27:10 after 722 secs
----

To do this, to the end of the connect script (/usr/lib/diald/connect
or wherever) add the line:

----
date +%s > /tmp/diald.up
----

You then need a disconnect script, say /usr/lib/diald/disconnect (plus
a "disconnect /usr/lib/diald/disconnect" entry in the diald config
file. This contains:

----
#!/bin/sh

# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t disconnect "$*"
}

if test -f /tmp/diald.up
then
	tmnow=`date +%s`
	uptim=`cat /tmp/diald.up`
	upfor="after `expr $tmnow - $uptim` secs"
	rm -f /tmp/diald.up
fi

message "Disconnected at `date +%H:%M:%S` $upfor"
----

This file needs to be executable. Note that if you don't have a
disconnect script, then you tend to get left with something like
a connected message even after the link goes down.
