From 578af86baaa0deda7ee5e65e1c290db6c614acf6 Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 17 Dec 2025 17:58:31 +0100 Subject: [PATCH] Added guard for nonexisting askpass/network down and so on --- mkinitramfs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkinitramfs.py b/mkinitramfs.py index f411413..613dd5e 100755 --- a/mkinitramfs.py +++ b/mkinitramfs.py @@ -50,7 +50,12 @@ done if %s; then if [ ! -f ~/.cache/askpass ]; then - wget "https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/askpass.c" + if ! wget "https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/askpass.c"; then + if ! wget "https://raw.githubusercontent.com/gryf/mkinitramfs/refs/heads/master/askpass.c"; then + echo "Error: Unable to fetch the 'askpass.c'. Aborting" >&2 + exit 1 + fi + fi gcc -Os -static askpass.c -o ~/.cache/askpass rm askpass.c fi