1#!/bin/sh
2### BEGIN INIT INFO
3# Provides:          save-rtc
4# Required-Start:
5# Required-Stop:     $local_fs hwclock
6# Default-Start:     S
7# Default-Stop:      0 6
8# Short-Description: Store system clock into file
9# Description:
10### END INIT INFO
11
12TIMESTAMP_FILE=/etc/timestamp
13
14[ -f /etc/default/timestamp ] && . /etc/default/timestamp
15
16# Update the timestamp
17date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > "$TIMESTAMP_FILE"
18