Re: [PATCH 28/48] Use bash-style conditionals when setting up the hardware clock.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 2010-08-19 06:23, schrieb Victor Lowther:
I am missing the difference. Diff please?


/dev/rtc vs. /dev/{rtc,rtc0} as already said in the other replies.

Patch against bashification-redux:

From 5d3ac218c3e05bf9735bb49826bee0b393418699 Mon Sep 17 00:00:00 2001
From: Kurt J. Bosch <kjb-temp-2009@xxxxxxxxxxxxx>
Date: Thu, 19 Aug 2010 18:17:01 +0200
Subject: [PATCH 17/17] Correct rtc dev nodes creation

---
 rc.sysinit |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index 4421def..9fb10af 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -59,10 +59,10 @@ if [[ $HWCLOCK_PARAMS ]]; then
 	# If devtmpfs is used, the required RTC device already exists now
 	# Otherwise, create whatever device is available
 	if ! [[ -c /dev/rtc || -c /dev/rtc0 ]]; then
-            for dev in /sys/class/rtc/rtc0/dev /sys/class/misc/rtc/dev; do
-                [[ -e $dev ]] || continue
-		IFS=: read -r major minor < "$dev"
-		/bin/mknod /dev/rtc c $major $minor
+		for dev in /sys/class/rtc/rtc0 /sys/class/misc/rtc; do
+			[[ -e $dev/dev ]] || continue
+			IFS=: read -r major minor< "$dev/dev"
+			/bin/mknod /dev/${dev##*/} c $major $minor
 	    done
 	fi

--
1.7.2.1



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux