#!/bin/sh
# $Id: clock,v 1.2 2002/05/23 05:35:51 solar Exp $

# Setup some sane defaults.
UTC=true
ARC=false
SRM=false
test "`uname -m`" = "alpha" && ARC=true

test -f /etc/sysconfig/clock && . /etc/sysconfig/clock

FLAGS=""
test "$UTC" = "true" -o "$UTC" = "yes" && FLAGS="$FLAGS -u"
test "$UTC" = "false" -o "$UTC" = "no" && FLAGS="$FLAGS --localtime"
test "$ARC" = "true" -o "$ARC" = "yes" && FLAGS="$FLAGS -A"
test "$SRM" = "true" -o "$SRM" = "yes" && FLAGS="$FLAGS -S"

echo -n "Setting the system time: "
/sbin/hwclock --hctosys $FLAGS
date
