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: 26fcf5a25759cc431bbf2d6dd7ede48e61203b09
parent bc0ff8b5aa54c0b23c0fbcae8daa8fc3e24b3870
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 27 Apr 2024 20:10:39 +0200

init.sh: die+rescueshell on failure and at end of script

Diffstat:

Minit.sh13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/init.sh b/init.sh @@ -1,4 +1,14 @@ #!/bin/mrsh +die() { + echo "die: $*" + rescueshell +} + +rescueshell() { + # Note: Strip out -l on switching back to mrsh + exec $SHELL -l +} + profile_export() { export "$@" echo "export '$@'" >>/etc/profile @@ -98,5 +108,4 @@ build_bmake cd / -# Note: Strip out -l on switching back to mrsh -exec $SHELL -l +rescueshell