| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /usr/lib64/pm-utils/sleep.d/ |
| Current File : //usr/lib64/pm-utils/sleep.d/90clock |
#!/bin/sh
# Synchronize system time with hardware time.
# TODO: Do modern kernels handle this correctly? If so, we should detect that
# and skip this hook.
. "${PM_FUNCTIONS}"
suspend_clock()
{
/sbin/hwclock --systohc >/dev/null 2>&1 0<&1
}
resume_clock()
{
/sbin/hwclock --hctosys >/dev/null 2>&1 0<&1
}
[ "$NEED_CLOCK_SYNC" ] || exit $NA
case "$1" in
hibernate|suspend) suspend_clock ;;
thaw|resume) resume_clock ;;
*) exit $NA ;;
esac