Real-Time clock
George Eliozov
nerozero at itcs.ge
Thu Mar 13 08:20:37 CET 2008
Could anyone tall me, what is doing this script:
cat /etc/init.d/date.sh
=============================================
#!/bin/sh
DATEFILE=/etc/default/lastdate
case "$1" in
start)
if [ ! -e $DATEFILE ]; then
LASTDATETIME=100208002007
else
. $DATEFILE
fi
date -u $LASTDATETIME
;;
stop)
echo "LASTDATETIME=`/bin/date -u +%m%d%H%M%G`" > $DATEFILE
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: date.sh {start|stop|restart}"
exit 1
esac
exit 0
More information about the device-owners
mailing list