--- rc.sysinit.orig 2010-02-24 06:51:59.289339280 +1300 +++ rc.sysinit 2010-02-24 07:02:23.752338880 +1300 @@ -47,11 +47,24 @@ if [ -n "$HWCLOCK_PARAMS" ]; then # enable rtc access /sbin/modprobe rtc-cmos >/dev/null 2>&1 - RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null) - RTC_MAJOR="${RTC_MAJOR%% *}" - if [ -n "$RTC_MAJOR" ]; then - /bin/mknod /dev/rtc0 c $RTC_MAJOR 0 - /bin/ln -s /dev/rtc0 /dev/rtc + + if [ -d /sys/class/rtc ];then + RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null) + RTC_MAJOR="${RTC_MAJOR%% *}" + if [ -n "$RTC_MAJOR" ]; then + /bin/mknod /dev/rtc0 c $RTC_MAJOR 0 + /bin/ln -s /dev/rtc0 /dev/rtc + fi + elif [ -d /sys/class/misc/rtc ] + RTC_MAJOR=$(/bin/grep -w misc /proc/devices 2>/dev/null) + RTC_MAJOR="${RTC_MAJOR% *}" + + RTC_MINOR=$(/bin/grep -w rtc /proc/misc 2>/dev/null) + RTC_MINOR="${RTC_MINOR% *}" + + if [[ -n "$RTC_MAJOR" && -n "$RTC_MINOR" ]];then + /bin/mknod /dev/rtc c $RTC_MAJOR $RTC_MINOR + fi fi # Do a clock set here for a few reasons: