ACC SHELL

Path : /usr/lib/pm-utils/sleep.d/
File Upload :
Current File : //usr/lib/pm-utils/sleep.d/90clock

#!/bin/sh
# Synchronize system time with hardware time.
# Modern kernels handle this correctly so we skip this hook by default.

. "${PM_FUNCTIONS}"

suspend_clock()
{
	/sbin/hwclock --systohc >/dev/null 2>&1 0<&1
}

resume_clock()
{
	/sbin/hwclock --hctosys >/dev/null 2>&1 0<&1
}

is_set "$NEED_CLOCK_SYNC" || exit $NA

case "$1" in
	hibernate|suspend) suspend_clock ;;
	thaw|resume) resume_clock ;;
	*) exit $NA ;;
esac

ACC SHELL 2018