Date: Monday, March 20, 2023 @ 08:07:48
  Author: eworm
Revision: 471596

support plymouth (FS#77909)

Modified:
  cryptsetup/trunk/PKGBUILD
  cryptsetup/trunk/hooks-encrypt

---------------+
 PKGBUILD      |    2 +-
 hooks-encrypt |   18 ++++++++++++------
 2 files changed, 13 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-03-20 07:56:28 UTC (rev 471595)
+++ PKGBUILD    2023-03-20 08:07:48 UTC (rev 471596)
@@ -20,7 +20,7 @@
         'install-sd-encrypt')
 sha256sums=('410ded65a1072ab9c8e41added37b9729c087fef4d2db02bb4ef529ad6da4693'
             'SKIP'
-            'd5038468a01e970b9ca49b39f4164d1b00292f94677d46a834e92119914f3448'
+            '839e961e053512293052250b424f38c347cb46c14cbd51d7e2705b3f5378ec02'
             '2b71c6c56ef81e5bf4f49dcc08dbd1651b46bda51a8f75a0a342b344b2d0eccd'
             '0105a26b58b4c271b0f7b65405b96b47014a4a517fc752cf1af8f6c556d2ea87')
 

Modified: hooks-encrypt
===================================================================
--- hooks-encrypt       2023-03-20 07:56:28 UTC (rev 471595)
+++ hooks-encrypt       2023-03-20 08:07:48 UTC (rev 471596)
@@ -94,13 +94,19 @@
             fi
             # Ask for a passphrase
             if [ ${dopassphrase} -gt 0 ]; then
-                echo ""
-                echo "A password is required to access the ${cryptname} 
volume:"
+                if command -v plymouth >/dev/null 2>&1 && plymouth --ping 
2>/dev/null; then
+                    plymouth ask-for-password \
+                        --prompt="A password is required to access the 
${cryptname} volume" \
+                        --command="cryptsetup open --type luks --key-file=- 
${resolved} ${cryptname} ${cryptargs} ${CSQUIET}"
+                else
+                    echo ""
+                    echo "A password is required to access the ${cryptname} 
volume:"
 
-                #loop until we get a real password
-                while ! eval cryptsetup open --type luks ${resolved} 
${cryptname} ${cryptargs} ${CSQUIET}; do
-                    sleep 2;
-                done
+                    #loop until we get a real password
+                    while ! eval cryptsetup open --type luks ${resolved} 
${cryptname} ${cryptargs} ${CSQUIET}; do
+                        sleep 2;
+                    done
+                fi
             fi
             if [ -e "/dev/mapper/${cryptname}" ]; then
                 if [ ${DEPRECATED_CRYPT} -eq 1 ]; then

Reply via email to