logo

bootstrap-initrd

Linux initrd generator to bootstrap a POSIX-ish system from a reasonably small binary seed git clone https://hacktivis.me/git/make-initrd.git
commit: 8bf4eae39058132f39e378f378d6536d66e9bed0
parent 970777fb04b59c99405e3532b5dae7370b0e2060
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 28 Sep 2023 16:24:42 +0200

make-initrd.sh: Die if copying bins and libs fails

Diffstat:

Mmake-initrd.sh4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/make-initrd.sh b/make-initrd.sh @@ -40,7 +40,7 @@ mknod -m 620 dev/tty1 c 4 1 for elf in $elves; do origin=$(command -v "$elf") - cp "$origin" bin/ + cp "$origin" bin/ || die done cp "${WORKDIR}/init" . || die "copying init" @@ -48,7 +48,7 @@ chmod 755 init || die "init chmod" ln bin/mksh bin/sh for lib in $(find bin -type f -exec lddtree -l {} + | grep -v bin/ | sort | uniq); do - cp "$lib" lib/ + cp "$lib" lib/ || die done if find . -print0 | cpio --null -ov --format=newc | xz -9 --check=crc32 > "../${out_base}.cpio.xz"; then