blob: ffa1eee43df097139f4a2b91544f44145f2710f9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/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
Brad Bishop19323692019-04-05 15:28:33 -040012TIMESTAMP_FILE=/etc/timestamp
13
14[ -f /etc/default/timestamp ] && . /etc/default/timestamp
15
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016# Update the timestamp
Brad Bishop19323692019-04-05 15:28:33 -040017date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > "$TIMESTAMP_FILE"