|
Server : Apache System : Linux vps-1289444.devslamantis.cl 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64 User : vspt ( 1013) PHP Version : 7.4.33 Disable Function : NONE Directory : /usr/lib64/pm-utils/sleep.d/ |
#!/bin/sh
# Synchronize system time with hardware time.
# Modern kernels handle this correctly so we skip this hook by default.
. "${PM_FUNCTIONS}"
suspend_clock()
{
printf "Saving system time to hardware clock..."
/sbin/hwclock --systohc >/dev/null 2>&1 0<&1 && echo Done. || \
echo Failed.
}
resume_clock()
{
printf "Loading system time from hardware clock..."
/sbin/hwclock --hctosys >/dev/null 2>&1 0<&1 && echo Done. || \
echo Failed.
}
is_set "$NEED_CLOCK_SYNC" || exit $NA
case "$1" in
hibernate|suspend) suspend_clock ;;
thaw|resume) resume_clock ;;
*) exit $NA ;;
esac