if [ $# != 6 ]
then exit -1
#Wrong number of parameter
fi
/bin/date $1$2$3$4$5.$6 >/dev/null 2>/dev/null
if [ $? != 0 ]
then exit -2
#Wrong syntax or wrong values
fi
# Add flag -u if the CMOS clock is set to Universal Time (/sbin/clock
-w -u)
/sbin/clock -w >/dev/null 2>/dev/null
if [ $? != 0 ]
then exit -3
#Hummmm, bad conditions...
fi
exit 0
#Ok !
This is the shell responsible to set date & time of your computer,
it receives six parameters from kclock then pass them to "date" command
and finally write it to CMOS clock with the "clock" command.
Remember if you have to refresh any program or any host do it in this
shell, and if your CMOS clock is set to Universal Time, add -u flag
to "clock" command.