mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
30 lines
485 B
Bash
Executable file
30 lines
485 B
Bash
Executable file
#!/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
|