All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 06/11] change file descriptor for flock locking
@ 2009-05-15 12:39 Harald Hoyer
  0 siblings, 0 replies; only message in thread
From: Harald Hoyer @ 2009-05-15 12:39 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]


dash does not like filedescriptors > 9
---
  modules.d/90crypt/cryptroot-ask.sh |    6 +++---
  modules.d/99base/init              |    5 +----
  2 files changed, 4 insertions(+), 7 deletions(-)



[-- Attachment #2: b6e0fea80c4aef66421af74dc1d29154cdae0264.diff --]
[-- Type: text/x-patch, Size: 864 bytes --]

diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
index 499f586..48cc0f7 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 >/dev/console 2>&1
-) 200>/.console.lock
+} 9>/.console.lock
 
diff --git a/modules.d/99base/init b/modules.d/99base/init
index fbfad05..ce26de6 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.


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-15 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 12:39 [PATCH 06/11] change file descriptor for flock locking Harald Hoyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.