case "$1" in
start)
case "$UTC" in
yes|true|1)
echo "Setting system clock..."
hwclock --hctosys --utc
evaluate_retval
;;
no|false|0)
echo "Setting system clock..."
hwclock --hctosys --localtime
evaluate_retval
;;
*)
echo "Invalid value for UTC in /etc/sysconfig/clock: $UTC"
echo "Valid values for UTC are 1 and 0."
exit 1
;;
esac
;;
stop)
case "$UTC" in
yes|true|1)
echo "Updating hardware clock..."
hwclock --systohc --utc
evaluate_retval
;;
no|false|0)
echo "Updating hardware clock..."
hwclock --systohc --localtime
evaluate_retval
;;
*)
echo "Invalid value for UTC in /etc/sysconfig/clock: $UTC"
echo "Valid values for UTC are 1 and 0."
exit 1
;;
esac
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac//结束标记