diff options
author | Roman Kyrylych <roman@archlinux.org> | 2008-03-19 11:12:19 +0200 |
---|---|---|
committer | Roman Kyrylych <roman@archlinux.org> | 2008-03-19 23:21:03 +0200 |
commit | 5386d7332dd77ecf4113dfc10773b529f583e797 (patch) | |
tree | 1dcc25f52910cd56b2c545e5bbd7e7c5ebacc0d1 | |
parent | 6e37620983c107e13120d1e249a37b3be6d0b12d (diff) |
Use actual device number for creating /dev/misc/rtc02008.03-4
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
-rwxr-xr-x | rc.sysinit | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -52,10 +52,13 @@ fi /bin/grep -qw usbfs /proc/filesystems && /bin/mount -n -t usbfs none /proc/bus/usb # enable rtc access -/bin/mkdir /dev/misc/ -/bin/mknod /dev/misc/rtc0 c 252 0 -/bin/ln -s /dev/misc/rtc0 /dev/rtc /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/mkdir /dev/misc/ + /bin/mknod /dev/misc/rtc0 c $RTC_MAJOR 0 + /bin/ln -s /dev/misc/rtc0 /dev/rtc +fi HWCLOCK_PARAMS="--hctosys" if [ "$HARDWARECLOCK" = "UTC" ]; then @@ -70,7 +73,7 @@ fi # Set clock early to fix some bugs with filesystem checks # Clock is set again later to match rc.conf if [ -f /etc/localtime ]; then - /sbin/hwclock $HWCLOCK_PARAMS --noadjfile + /sbin/hwclock $HWCLOCK_PARAMS --noadjfile fi if [ -x /sbin/udevadm -a -d /sys/block ]; then |