2008/3/19, Roman Kyrylych <[EMAIL PROTECTED]>:
> 2008/3/19, Tobias Powalowski <[EMAIL PROTECTED]>:
>
> > We have a problem in creation the rtc0 device, on Pierres machine 252 is not
> > working but 253 on my machine 253 is not working but 252, since those
> numbers
> > are local numbers which are reserved for local use it's difficult to guess
> > which number works on which system.
> > me shrugs
>
>
> I've found the solution! :-) Will prepare a patch now.
Please try the attached patch.
I cannot push it to git and release an updated package now, because
I'm at job and have some technical difficulties with this.
If someone wants to release a new initscripts package - be sure to
update the ChangeLog (it includes git commit messages since 2007.11-2
was released).
Otherwise I'll take care of this when get back to my archbox (in more
than 10 hours).
--
Roman Kyrylych (Роман Кирилич)
From 88d9035462ecea59771f518e324d7588a2452e24 Mon Sep 17 00:00:00 2001
From: Roman Kyrylych <[EMAIL PROTECTED]>
Date: Wed, 19 Mar 2008 11:12:19 +0200
Subject: [PATCH] Use actual device number for creating /dev/misc/rtc0
Signed-off-by: Roman Kyrylych <[EMAIL PROTECTED]>
---
rc.sysinit | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/rc.sysinit b/rc.sysinit
index d175150..49b1df7 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -52,10 +52,14 @@ 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=$(grep rtc /proc/devices | cut -d ' ' -f 1)
+RTC_MAJOR=$(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 +74,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
--
1.5.4.1