summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD17
-rw-r--r--encrypt-hook.diff31
-rw-r--r--encrypt-hook.patch18
-rw-r--r--mkinitcpio-encrypt-bootsplash.install3
5 files changed, 46 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 415929bbcacd..5434e52c48fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
pkgbase = mkinitcpio-encrypt-bootsplash
pkgdesc = a mkinitcpio hook to pause bootsplash for LUKS password input
- pkgver = 1.0
+ pkgver = 2
pkgrel = 1
url = https://github.com/archlinux/svntogit-packages/tree/packages/cryptsetup/trunk
+ install = mkinitcpio-encrypt-bootsplash.install
arch = x86_64
license = GPL
depends = cryptsetup
depends = linux-bootsplash
source = encrypt-hook
- source = encrypt-hook.patch
+ source = encrypt-hook.diff
source = encrypt-install
sha256sums = 416aa179ce3c6a7a5eee0861f1f0a4fafac91b69e84a2aae82b6e5a6140e31e2
- sha256sums = 658cdae681c25d6c0abdaf6b3913c091d58e730c8e0124a5e3c24efeb2adbdd9
+ sha256sums = ce0edec30abd79e7f72de45d37beb0de6aefea6242a7b5057a51289ca0a7f387
sha256sums = d325dc239ecc9a5324407b0782da6df2573e8491251836d6c4e65fa61339ce57
pkgname = mkinitcpio-encrypt-bootsplash
diff --git a/PKGBUILD b/PKGBUILD
index 64c8c625b58c..5628fa7938f6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Kian Kasad <kian at kasad.com>
pkgname=mkinitcpio-encrypt-bootsplash
-pkgver=1.0
+pkgver=2
pkgrel=1
pkgdesc="a mkinitcpio hook to pause bootsplash for LUKS password input"
arch=(x86_64)
@@ -9,23 +9,22 @@ license=('GPL')
depends=(cryptsetup linux-bootsplash)
source=(
'encrypt-hook'
- 'encrypt-hook.patch'
+ 'encrypt-hook.diff'
'encrypt-install'
)
-sha256sums=(
- '416aa179ce3c6a7a5eee0861f1f0a4fafac91b69e84a2aae82b6e5a6140e31e2'
- '658cdae681c25d6c0abdaf6b3913c091d58e730c8e0124a5e3c24efeb2adbdd9'
- 'd325dc239ecc9a5324407b0782da6df2573e8491251836d6c4e65fa61339ce57'
-)
+sha256sums=('416aa179ce3c6a7a5eee0861f1f0a4fafac91b69e84a2aae82b6e5a6140e31e2'
+ 'ce0edec30abd79e7f72de45d37beb0de6aefea6242a7b5057a51289ca0a7f387'
+ 'd325dc239ecc9a5324407b0782da6df2573e8491251836d6c4e65fa61339ce57')
+install=$pkgname.install
prepare() {
cd "$srcdir"
- mkdir $pkgname
+ mkdir -p $pkgname
cp encrypt-hook encrypt-install -t $pkgname
cd $pkgname
- patch -Np1 -i ../encrypt-hook.patch
+ patch -Np1 -i ../encrypt-hook.diff
}
package() {
diff --git a/encrypt-hook.diff b/encrypt-hook.diff
new file mode 100644
index 000000000000..177152a1542e
--- /dev/null
+++ b/encrypt-hook.diff
@@ -0,0 +1,31 @@
+--- a/encrypt-hook 2020-07-30 04:12:39.225605612 -0700
++++ b/encrypt-hook 09:06:39.968085123 -0800
+@@ -80,6 +80,7 @@
+ fi
+ # Ask for a passphrase
+ if [ ${dopassphrase} -gt 0 ]; then
++ test -e /sys/devices/platform/bootsplash.0/enabled && echo 0 > /sys/devices/platform/bootsplash.0/enabled
+ echo ""
+ echo "A password is required to access the ${cryptname} volume:"
+
+@@ -87,6 +88,7 @@
+ while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
+ sleep 2;
+ done
++ test -e /sys/devices/platform/bootsplash.0/enabled && echo 1 > /sys/devices/platform/bootsplash.0/enabled
+ fi
+ if [ -e "/dev/mapper/${cryptname}" ]; then
+ if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
+@@ -116,10 +118,12 @@
+ if [ -f "$ckeyfile" ]; then
+ exe="$exe --key-file $ckeyfile"
+ else
++ test -e /sys/devices/platform/bootsplash.0/enabled && echo 0 > /sys/devices/platform/bootsplash.0/enabled
+ echo ""
+ echo "A password is required to access the ${cryptname} volume:"
+ fi
+ eval "$exe $CSQUIET"
++ test -e /sys/devices/platform/bootsplash.0/enabled && echo 1 > /sys/devices/platform/bootsplash.0/enabled
+
+ if [ $? -ne 0 ]; then
+ err "Non-LUKS device decryption failed. verify format: "
diff --git a/encrypt-hook.patch b/encrypt-hook.patch
deleted file mode 100644
index bda74421706c..000000000000
--- a/encrypt-hook.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/encrypt-hook 2020-07-30 03:43:40.432646025 -0700
-+++ b/encrypt-hook 2020-07-30 04:00:25.102118165 -0700
-@@ -80,6 +80,7 @@ EOF
- fi
- # Ask for a passphrase
- if [ ${dopassphrase} -gt 0 ]; then
-+ test -e /sys/devices/platform/bootsplash.0/enabled && echo off > /sys/devices/platform/bootsplash.0/enabled
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
-
-@@ -87,6 +88,7 @@ EOF
- while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
- sleep 2;
- done
-+ test -e /sys/devices/platform/bootsplash.0/enabled && echo on > /sys/devices/platform/bootsplash.0/enabled
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
diff --git a/mkinitcpio-encrypt-bootsplash.install b/mkinitcpio-encrypt-bootsplash.install
new file mode 100644
index 000000000000..b28ccd50907d
--- /dev/null
+++ b/mkinitcpio-encrypt-bootsplash.install
@@ -0,0 +1,3 @@
+post_install() {
+ printf "\033[34mInfo\033[0m: Replace 'encrypt' hook with 'encrypt-bootsplash' to enable password prompt with bootplash\n"
+}