File: fake-hwclock.init

package info (click to toggle)
fake-hwclock 0.12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 92 kB
  • sloc: sh: 97; makefile: 34
file content (38 lines) | stat: -rw-r--r-- 824 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

### BEGIN INIT INFO
# Provides:          fake-hwclock
# Required-Start:
# Required-Stop:     umountroot
# Should-Stop:       
# X-Start-Before:    checkroot
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: Restore / save the current clock
# Description:       
### END INIT INFO

set -e

# Include core init functions if needed
. /lib/lsb/init-functions

PARAM=/etc/default/fake-hwclock
if [ -f $PARAM ]; then
    . "$PARAM"
fi

case "${1:-}" in
  stop|reload|restart|force-reload)
        echo "Stopping fake hwclock: saving system time."
        fake-hwclock save;;

  start)
        echo "Starting fake hwclock: loading system time."
        fake-hwclock load $FORCE ;;

  *)
        echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2
        exit 1
        ;;
esac