Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
set -eu
|
||||
|
||||
printf "\e[95m[INFO] Starting : [/usr/lib/live/boot/0042_ciss_post_decrypt_attest] \n\e[0m"
|
||||
sleep 2
|
||||
|
||||
### Check panic command availability -------------------------------------------------------------------------------------------
|
||||
if ! command -v panic >/dev/null 2>&1; then
|
||||
@@ -220,7 +221,7 @@ verify_rootfs_payload() {
|
||||
payload_size=""
|
||||
payload_hash=""
|
||||
|
||||
payload_size="$(awk -F': ' '/^# rootfs-size-bytes: /{print $2; exit}' "${manifest_path}")"
|
||||
payload_size="$(awk '/^# Bytes[[:space:]]*:[[:space:]]Final filesystem[.]squashfs[[:space:]]+[0-9]+[[:space:]]*$/ {print $NF; exit}' "${manifest_path}")"
|
||||
payload_hash="$(awk '($0 !~ /^#/ && NF >= 2){print $1; exit}' "${manifest_path}")"
|
||||
|
||||
case "${payload_size}" in
|
||||
|
||||
@@ -497,8 +497,25 @@ setup_unionfs ()
|
||||
|
||||
### CISS override for /usr/lib/live/boot/0042_ciss_post_decrypt_attest -------------------------------------------------------
|
||||
printf "\e[95m[INFO] Calling : [/usr/lib/live/boot/0042_ciss_post_decrypt_attest] ... \n\e[0m"
|
||||
[ -x /usr/lib/live/boot/0042_ciss_post_decrypt_attest ] && /usr/lib/live/boot/0042_ciss_post_decrypt_attest
|
||||
chmod +x /usr/lib/live/boot/0042_ciss_post_decrypt_attest
|
||||
sleep 2
|
||||
|
||||
if [ -x /usr/lib/live/boot/0042_ciss_post_decrypt_attest ]; then
|
||||
|
||||
if ! /usr/lib/live/boot/0042_ciss_post_decrypt_attest; then
|
||||
|
||||
panic "[FATAL] [/usr/lib/live/boot/0042_ciss_post_decrypt_attest] failed."
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
panic "[FATAL] [/usr/lib/live/boot/0042_ciss_post_decrypt_attest] missing or not executable."
|
||||
|
||||
fi
|
||||
|
||||
printf "\e[92m[INFO] Calling : [/usr/lib/live/boot/0042_ciss_post_decrypt_attest] done. \n\e[0m"
|
||||
sleep 2
|
||||
### CISS override for /usr/lib/live/boot/0042_ciss_post_decrypt_attest -------------------------------------------------------
|
||||
|
||||
printf "\e[92m[INFO] Successfully applied : [/usr/lib/live/boot/9990-overlay.sh] \n\e[0m"
|
||||
|
||||
Reference in New Issue
Block a user