Code: Select all
# set time, required for ssl communication but tv 'll show strange values
#../../bin/busybox date -s "2011-06-23 13:45:00"
Code: Select all
SamyGO/etc/init.d/01_01_catch_crap.init
and for some obscure reason the samsung-software-frontend knows the current time from dvb tuner but its not forwarded to system time...
maybe its a bit neurotic but this is how i do it...
on my NFS-Server (Win7) i run this script:
Code: Select all
@ECHO OFF
e:
cd E:\samygo
:start
set ctm=%time%
set chr=%ctm:~0,2%
set cmn=%ctm:~3,2%
if "%chr:~0,1%"==" " set chr=0%chr:~1,1%
echo %chr%%cmn%>timefile
ping 123.234.123.234 -n 1 -w 60000 > NUL
goto start
Code: Select all
# cat SamyGO/etc/init.d/02_09_set_time.init
#!/bin/sh
#
#
. /dtv/SGO.env
FILTERI='-e s/Jan/01/;s/Feb/02/;s/Mar/03/;s/Apr/04/;s/May/05/;s/Jun/06/;s/Jul/07/;s/Aug/08/;s/Sep/09/;s/Oct/10/;s/Nov/11/;s/Dec/12/'
TIMEFILE=$SYSROOT/img/timefile
FILTERII="s/ 1/ 01/g;s/ 2/ 02/g;s/ 3/ 03/g;s/ 4/ 04/g;s/ 5/ 05/g;s/ 6/ 06/g;s/ 7/ 07/g;s/ 8/ 08/g;s/ 9/ 09/g"
case $1 in
start)
CURMONTH=`ls -l $TIMEFILE | sed $FILTERI -e "s/ \+ / /g" | cut -d' ' -f6`
CURDAY=`ls -l $TIMEFILE | sed -e "s/ \+ / /g" -e "$FILTERII" | cut -d' ' -f7`
CURYEAR=`ls -l $TIMEFILE | sed -e "s/ \+ / /g" | cut -d' ' -f8`
CURTIME=`cat $TIMEFILE | cut -c1-4`
date -s$CURMONTH$CURDAY$CURTIME$CURYEAR >/dev/null
;;
stop)
#rmmod fuse
;;
status)
;;
*)
echo "Usage: $0 {start|stop}" 1>&2
exit 0
;;
esac
#