wok view fake-hwclock/stuff/fake-hwclock @ rev 25644

Add fake-hwclock, manage time on system without RTC
author Stanislas Leduc <shann@slitaz.org>
date Tue Jan 16 19:48:23 2024 +0100 (4 months ago)
parents
children
line source
1 #!/bin/sh
2 # /etc/init.d/fake-hwclock: Manage time on system without RTC on SliTaz,
3 # at boot time or with the command line. Daemons options are configured
4 # with /etc/daemons.conf
5 #
6 . /etc/init.d/rc.functions
7 . /etc/daemons.conf
9 NAME=fake-hwclock
10 DAEMON=/usr/sbin/fake-hwclock
12 case "$1" in
13 start)
14 action 'Restore time from file: %s...' $NAME
15 $DAEMON load
16 status
17 ;;
18 stop)
19 action 'Save time in file for next boot: %s...' $NAME
20 $DAEMON save
21 status
22 ;;
23 *)
24 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop]"
25 newline
26 exit 1
27 ;;
28 esac
30 exit 0