On Wed, 31 Aug 2005, Matthis Rouch wrote:
> The debian with X pre-built image will be ready by tomorrow or
> friday. Meanwhile, does anyone have a simple time-keeping patch so
> that time starts from where it left before reboot or shutdown? I
> would like to include such patch in the pre-built image so that the
> filesystem is not checked every time because *49150* have passed
> without check ;)
Simple init.d script "date-loadstore"
--------------------------begin-------------------
#!/bin/sh
#
# store date on shutdown and load at startup
#
RETVAL=0
start() {
echo -n "Loading date "
DATE=`cat /etc/shutdown-date`
date -s "$DATE"
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n "Storing date "
date '+%D %X' > /etc/shutdown-date
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
echo "done."
exit $RETVAL
------------------------end---------------
1. I did not test it (please debug)
2. Remove init.d script which is setting the date from system clock
> matthis
Adam Pribyl
PS: What kernel are you using?
Received on Thu Sep 01 2005 - 03:23:08 EDT
This archive was generated by hypermail 2.2.0 : Thu Sep 01 2005 - 03:23:15 EDT