Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0056-init-add-hacky-cdrom-polling-mechanism.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0056-init-add-hacky-cdrom-polling-mechanism.patch of Package dracut
From 9ec50d3dbb5746d73941d0cf67de30d84baa4429 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Tue, 13 Apr 2010 13:50:33 +0200 Subject: [PATCH] init: add hacky cdrom polling mechanism --- modules.d/99base/init | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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.8.3.1