blob: 5996b950bdf5318cbab07b415e743fc37670de0d (
plain)
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
|
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case $HARDWARECLOCK in
UTC) HWCLOCK_PARAMS="--utc";;
localtime) HWCLOCK_PARAMS="--localtime";;
*) HWCLOCK_PARAMS="";;
esac
case "$1" in
start)
add_daemon hwclock;;
stop)
case $HARDWARECLOCK in
UTC) hwclock --adjust --utc;;
localtime) hwclock --adjust --localtime;;
"") hwclock --adjust;;
esac
rm_daemon hwclock
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
|