From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CD49D138334 for ; Wed, 7 Aug 2019 15:46:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F185E08CD; Wed, 7 Aug 2019 15:46:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 781AFE08CD for ; Wed, 7 Aug 2019 15:46:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9E1F234948B for ; Wed, 7 Aug 2019 15:46:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F101175C for ; Wed, 7 Aug 2019 15:46:09 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1565124032.4dae613a3907917393f52e016b0377f5d1e1b926.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/unlock-luks.sh X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 4dae613a3907917393f52e016b0377f5d1e1b926 X-VCS-Branch: master Date: Wed, 7 Aug 2019 15:46:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9ce4712a-257a-47c9-a1c1-de921320949c X-Archives-Hash: f6520b7fec7609451317a9c0ac823d49 commit: 4dae613a3907917393f52e016b0377f5d1e1b926 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Aug 6 15:25:10 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 6 20:40:32 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4dae613a unlock-lucks.sh: Kill running cryptsetup prompt with SIGINT When using SIGTERM, running terminal would require a "reset" because cryptsetup cannot restore fds. Using SIGINT will end cryptsetup prompt gracefully allowing cryptsetup to restore fds and keep terminal working. Signed-off-by: Thomas Deutschmann gentoo.org> defaults/unlock-luks.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/unlock-luks.sh b/defaults/unlock-luks.sh index e8f28f6..16e654c 100644 --- a/defaults/unlock-luks.sh +++ b/defaults/unlock-luks.sh @@ -116,8 +116,9 @@ main() { if [ "${crypt_filter_ret}" = '0' ] then - # Kill any running cryptsetup prompt for this device - pkill -9 -f "luksOpen.*${LUKS_NAME}\$" >/dev/null 2>&1 + # Kill any running cryptsetup prompt for this device. + # But SIGINT only to keep shell functional. + pkill -2 -f "luksOpen.*${LUKS_NAME}\$" >/dev/null 2>&1 fi }