#!/bin/sh
# set the system clock

# get Debian config information
. /etc/default/rcS

if [ -n "$UTC$GMT" -a "$UTC" != "no" ]; then
	GMT="-u"
fi

# support older Debian and non-Debian systems
if [ -x /sbin/clock ]; then
	CLOCK=clock
else
	CLOCK=hwclock
fi


if [ "$1" = suspend ]; then
	$CLOCK -w $GMT
elif [ "$1" = resume ]; then
	$CLOCK -s $GMT
fi

