dracut/0012-base-init-fix-cdrom-polling.patch

23 lines
923 B
Diff
Raw Normal View History

From e620bb01da5c957c311f336c2f963c9bd9f692c5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 00:01:00 +0200
Subject: [PATCH] base/init: fix cdrom polling
---
modules.d/99base/init | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index b6f4e92..a30706b 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -234,7 +234,7 @@ while :; do
strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
ID_CDROM_MEDIA && continue
- if [ -e "$cdrom"/events_poll_msecs -a -n -e "/tmp/.poll_${cdrom##*/}" ]; then
+ if [ -e "$cdrom"/events_poll_msecs -a ! -e "/tmp/.poll_${cdrom##*/}" ]; then
msecs=$(while read a; do echo $a;done < "$cdrom"/events_poll_msecs)
if [ "$msecs" = "-1" ]; then
echo 250 > "$cdrom"/events_poll_msecs