#!/bin/sh
# $Owl: Owl/packages/owl-startup/clock,v 1.3 2005/11/16 13:21:54 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
