I want to reset the hardware clock from the system clock at shutdown. I created this script (K99savetime.sh):
#! /bin/sh ### BEGIN INIT INFO # Provides: savetime.sh # Default-Start: 6 0 # Short-Description: set hwclock. # Description: set hwclock to systemclock on halt or reboot. ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin log_action_msg "Updating hwclock with system clock" hwclock --systohc exit 0
I saved the script to /init.d, made it executable, and created a symbolic link in /etc/rc6.d
The machine appears to shutdown correctly, that is, I don't see any errors and it doesn't hang up.
How do I know that the script runs at shutdown?
Is the script correctly written to do what I want?