]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/setclock
Nginx: Bugfixed rootfile.
[ipfire-2.x.git] / src / initscripts / init.d / setclock
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/setclock
4 #
5 # Description : Setting Linux Clock
6 #
7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8 #
9 # Version : 00.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 CLOCKPARAMS=
19
20 case ${1} in
21 start)
22
23 boot_mesg "Setting system clock..."
24
25 # udev not create the rtc symlink if rtc is in the kernel
26 if [ ! -e /dev/rtc ]; then
27 ln -s rtc0 /dev/rtc
28 fi
29
30 hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
31 evaluate_retval
32 ;;
33
34 stop)
35 boot_mesg "Setting hardware clock..."
36 hwclock --systohc ${CLOCKPARAMS} &>/dev/null
37 evaluate_retval
38 ;;
39
40 *)
41 echo "Usage: ${0} {start} {stop}"
42 ;;
43
44 esac