#!/bin/bash STATE=$1 case "$STATE" in resume) if [ ! -f /etc/adjtime ] then echo "0.0 0 0.0" > /etc/adjtime fi if [ -x /sbin/hwclock ] then /sbin/hwclock --adjust 2>&1 >/dev/null /sbin/hwclock --hctosys 2>&1 >/dev/null fi ;; suspend|standby) if [ -x /sbin/hwclock ] then /sbin/hwclock --systohc 2>&1 >/dev/null fi ;; esac exit 0 # vim:ts=4