Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 273849 Details for
Bug 367937
sys-fs/cryptsetup - dm-crypt-start.sh should not contain bashisms
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Change the C-style for loop to a while loop
0001-dm-crypt-start.sh-shouldn-t-contain-bashisms.patch (text/plain), 1.21 KB, created by
Petr Šabata
on 2011-05-18 17:22:48 UTC
(
hide
)
Description:
Change the C-style for loop to a while loop
Filename:
MIME Type:
Creator:
Petr Šabata
Created:
2011-05-18 17:22:48 UTC
Size:
1.21 KB
patch
obsolete
>From 5379e567cd1c1e7c7ffa6f881a05e183831b488e Mon Sep 17 00:00:00 2001 >From: Petr Sabata <petr@sabata.biz> >Date: Wed, 18 May 2011 19:13:31 +0200 >Subject: [PATCH] dm-crypt-start.sh shouldn't contain bashisms > >All shell scripts should be POSIX compatible, not depending on a >specific shell implementation without explicitly stating so. This patch >changes the fixes C-style for loop to a while equivalent. > >Signed-off-by: Petr Sabata <petr@sabata.biz> >--- > dm-crypt-start.sh | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/dm-crypt-start.sh b/dm-crypt-start.sh >index c78f0bc..38c4b20 100644 >--- a/dm-crypt-start.sh >+++ b/dm-crypt-start.sh >@@ -150,13 +150,14 @@ dm_crypt_execute_dmcrypt() { > : ${gpg_options:='-q -d'} > # gpg available ? > if type -p gpg >/dev/null ; then >- for (( i = 0 ; i < 3 ; i++ )) >+ i=0; while [ $i -lt 3 ] > do > # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected. > # save stdin stdout stderr "values" > gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3} > ret="$?" > [ "$ret" -eq 0 ] && break >+ i=$(($i+1)) > done > eend "${ret}" "failure running cryptsetup" > else >-- >1.7.5.rc3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 367937
:
273849