/[baselayout]/branches/baselayout-1_12/init.d/clock
Gentoo

Diff of /branches/baselayout-1_12/init.d/clock

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3182 Revision 3183
61 ewarn "Your TIMEZONE in /etc/conf.d/clock is still set to Factory!" 61 ewarn "Your TIMEZONE in /etc/conf.d/clock is still set to Factory!"
62 fi 62 fi
63} 63}
64 64
65start() { 65start() {
66 local myopts="" 66 local myopts="" syscmd=""
67 local myadj="" 67 local myadj=""
68 local TBLURB="" fakeit=0 68 local TBLURB="" fakeit=0
69 local errstr="" 69 local errstr=""
70 local readonly="no" 70 local readonly="no"
71 local ret=0 71 local ret=0
80 80
81 if [[ ${fakeit} -ne 1 && -e /proc/modules && ! -e /dev/rtc ]] ; then 81 if [[ ${fakeit} -ne 1 && -e /proc/modules && ! -e /dev/rtc ]] ; then
82 modprobe rtc &> /dev/null || modprobe genrtc &> /dev/null 82 modprobe rtc &> /dev/null || modprobe genrtc &> /dev/null
83 fi 83 fi
84 84
85 if [[ ${CLOCK_HCTOSYS} == "yes" ]] ; then
85 ebegin "Setting system clock using the hardware clock [${TBLURB}]" 86 ebegin "Setting system clock using the hardware clock [${TBLURB}]"
87 syscmd="--hctosys"
88 else
89 ebegin "Setting timezone [${TBLURB}]"
90 syscmd="--systz"
91 fi
92
86 if [[ ${fakeit} -eq 1 ]] ; then 93 if [[ ${fakeit} -eq 1 ]] ; then
87 ret=0 94 ret=0
88 95
89 elif [[ -x /sbin/hwclock ]] ; then 96 elif [[ -x /sbin/hwclock ]] ; then
90 # Since hwclock always exit's with a 0, need to check its output. 97 # Since hwclock always exit's with a 0, need to check its output.
91 errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null) 98 errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null)
92 errstr="${errstr}$(/sbin/hwclock --hctosys ${myopts} 2>&1 >/dev/null)" 99 errstr="${errstr}$(/sbin/hwclock ${syscmd} ${myopts} 2>&1 >/dev/null)"
93 100
94 if [[ -n ${errstr} ]] ; then 101 if [[ -n ${errstr} ]] ; then
95 ewarn "${errstr}" 102 ewarn "${errstr}"
96 ret=1 103 ret=1
97 else 104 else

Legend:
Removed from v.3182  
changed lines
  Added in v.3183

  ViewVC Help
Powered by ViewVC 1.1.20