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: 1db5b33acc3421fbd9c79a49f54515fbca626624
parent 19ef410663f6baf934a11b2618248350c523eed9
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 22 Mar 2019 10:19:09 +0100

make-initrd.bash: Issue a warning if the modules are non-existent

Diffstat:

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

diff --git a/make-initrd.bash b/make-initrd.bash @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2017-2018 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Copyright 2017-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me> # Distributed under the terms of the ISC license kv=${1:-$(uname -r)} @@ -32,7 +32,12 @@ ln -s lib{$arc,} ln -s /proc/mounts etc/mtab pushd usr && ln -s lib{$arc,} && popd -mkdir -p lib/modules ; cp -pr /lib/modules/$kv lib/modules +if test -d /lib/modules/$kv +then + mkdir -p lib/modules ; cp -pr /lib/modules/$kv lib/modules +else + echo "[Warning] “/lib/modules/$kv” doesn’t exist" +fi mknod -m 600 dev/console c 5 1 mknod -m 666 dev/urandom c 1 9