1 |
commit: 4dae613a3907917393f52e016b0377f5d1e1b926 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 6 15:25:10 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 6 20:40:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4dae613a |
7 |
|
8 |
unlock-lucks.sh: Kill running cryptsetup prompt with SIGINT |
9 |
|
10 |
When using SIGTERM, running terminal would require a "reset" |
11 |
because cryptsetup cannot restore fds. |
12 |
|
13 |
Using SIGINT will end cryptsetup prompt gracefully allowing |
14 |
cryptsetup to restore fds and keep terminal working. |
15 |
|
16 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
17 |
|
18 |
defaults/unlock-luks.sh | 5 +++-- |
19 |
1 file changed, 3 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/defaults/unlock-luks.sh b/defaults/unlock-luks.sh |
22 |
index e8f28f6..16e654c 100644 |
23 |
--- a/defaults/unlock-luks.sh |
24 |
+++ b/defaults/unlock-luks.sh |
25 |
@@ -116,8 +116,9 @@ main() { |
26 |
|
27 |
if [ "${crypt_filter_ret}" = '0' ] |
28 |
then |
29 |
- # Kill any running cryptsetup prompt for this device |
30 |
- pkill -9 -f "luksOpen.*${LUKS_NAME}\$" >/dev/null 2>&1 |
31 |
+ # Kill any running cryptsetup prompt for this device. |
32 |
+ # But SIGINT only to keep shell functional. |
33 |
+ pkill -2 -f "luksOpen.*${LUKS_NAME}\$" >/dev/null 2>&1 |
34 |
fi |
35 |
} |