39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
|
From 0e0bf830577b5538ed010cf1eb4b1a57578ac3bb Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Tue, 13 Apr 2010 13:50:33 +0200
|
||
|
Subject: [PATCH 04/15] init: add hacky cdrom polling mechanism
|
||
|
|
||
|
---
|
||
|
modules.d/99base/init | 14 +++++++++++++-
|
||
|
1 files changed, 13 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/modules.d/99base/init b/modules.d/99base/init
|
||
|
index ab7aafe..b9b6361 100755
|
||
|
--- a/modules.d/99base/init
|
||
|
+++ b/modules.d/99base/init
|
||
|
@@ -186,8 +186,20 @@ while :; do
|
||
|
|
||
|
# no more udev jobs and queues empty.
|
||
|
sleep 0.5
|
||
|
+
|
||
|
+ # dirty hack for some cdrom drives,
|
||
|
+ # which report no medium for quiet
|
||
|
+ # some time.
|
||
|
+ for cdrom in /sys/block/sr*; do
|
||
|
+ [ -e "$cdrom" ] || continue
|
||
|
+ # skip, if cdrom medium was already found
|
||
|
+ strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
|
||
|
+ ID_CDROM_MEDIA && continue
|
||
|
+ echo change > "$cdrom"
|
||
|
+ done
|
||
|
+
|
||
|
i=$(($i+1))
|
||
|
- [ $i -gt 20 ] \
|
||
|
+ [ $i -gt 40 ] \
|
||
|
&& { flock -s 9 ; emergency_shell "No root device found"; } 9>/.console_lock
|
||
|
done
|
||
|
unset job
|
||
|
--
|
||
|
1.7.0.1
|
||
|
|