[*] First commit
This commit is contained in:
26
daemon/hwclock
Executable file
26
daemon/hwclock
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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)
|
||||
hwclock --adjust $HWCLOCK_PARAMS
|
||||
rm_daemon hwclock
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 2
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
Reference in New Issue
Block a user