From: Harald Hoyer Date: Fri, 15 May 2009 10:48:11 +0000 (+0200) Subject: change file descriptor for flock locking X-Git-Tag: 0.1~271 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6e0fea80c4aef66421af74dc1d29154cdae0264;p=thirdparty%2Fdracut.git change file descriptor for flock locking dash does not like filedescriptors > 9 --- diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index 499f5869c..48cc0f799 100755 --- a/modules.d/90crypt/cryptroot-ask.sh +++ b/modules.d/90crypt/cryptroot-ask.sh @@ -1,8 +1,8 @@ #!/bin/sh [ -b /dev/mapper/$2 ] && exit 0 -( - flock -s 200 +{ + flock -s 9 /sbin/cryptsetup luksOpen -T1 $1 $2 /dev/console 2>&1 -) 200>/.console.lock +} 9>/.console.lock diff --git a/modules.d/99base/init b/modules.d/99base/init index fbfad05c1..ce26de607 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -79,10 +79,7 @@ while :; do sleep 0.5 i=$(($i+1)) - ( - flock -s 200 - [ $i -gt 20 ] && emergency_shell - ) 200>/.console_lock + { flock -s 9 ; [ $i -gt 20 ] && emergency_shell; } 9>/.console_lock done # pre pivot scripts are sourced just before we switch over to the new root.