aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-07-30 01:47:28 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-07-30 01:47:28 +0000
commitbbac679b927aa70719e23ee96929a1f7357be5a2 (patch)
tree07d1da9cfa11a459a34611575f81b445885c8b7d /rc.d/rc.sysinit
parent10b07d34e516432e01adcf92230e0b5cfb100cd2 (diff)
downloadinitscripts-bbac679b927aa70719e23ee96929a1f7357be5a2.tar
initscripts-bbac679b927aa70719e23ee96929a1f7357be5a2.tar.gz
initscripts-bbac679b927aa70719e23ee96929a1f7357be5a2.tar.bz2
initscripts-bbac679b927aa70719e23ee96929a1f7357be5a2.tar.xz
initscripts-bbac679b927aa70719e23ee96929a1f7357be5a2.zip
Fix a possible attempt to kill getkey before it is started (#191453)
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit11
1 files changed, 10 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index f2139626..cb07660c 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -871,15 +871,24 @@ dmesg -s 131072 > /var/log/dmesg
# create the crash indicator flag to warn on crashes, offer fsck with timeout
touch /.autofsck &> /dev/null
-kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1
+if [ "$PROMPT" != no ]; then
+ while :; do
+ pid=$(/sbin/pidof getkey)
+ [ -n "$pid" -o -e /var/run/getkey_done ] && break
+ usleep 100000
+ done
+ [ -n "$pid" ] && kill -TERM "$pid" >/dev/null 2>&1
+fi
} &
if strstr "$cmdline" confirm ; then
touch /var/run/confirm
fi
if [ "$PROMPT" != "no" ]; then
/sbin/getkey i && touch /var/run/confirm
+ touch /var/run/getkey_done
fi
wait
+[ "$PROMPT" != no ] && rm -f /var/run/getkey_done
# Let rhgb know that we're leaving rc.sysinit
if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then