From 65e94770bcdd65b490674b0bd71d9f5f4b5b25be Mon Sep 17 00:00:00 2001 From: illiliti Date: Sun, 12 Apr 2020 22:17:01 +0300 Subject: [PATCH] minor fixes --- README.md | 4 ++-- config | 2 +- tinyramfs | 8 ++++---- usr/share/tinyramfs/init | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6c4a924..e380fbb 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Usage ``` usage: ./tinyramfs [option] - -o, --output set initramfs image name + -o, --output set initramfs output path -c, --config set config file path -m, --moddir set modules directory -k, --kernel set kernel version @@ -49,7 +49,7 @@ debug=0 # force=0 -# initramfs name +# initramfs output path # # default - /tmp/initramfs-$kernel # example - output="/tmp/myinitramfs.img.gz" diff --git a/config b/config index 094d2f2..a17aedd 100644 --- a/config +++ b/config @@ -10,7 +10,7 @@ debug=0 # force=0 -# initramfs name +# initramfs output path # # default - /tmp/initramfs-$kernel # example - output="/tmp/myinitramfs.img.gz" diff --git a/tinyramfs b/tinyramfs index bba62cf..90eae9f 100755 --- a/tinyramfs +++ b/tinyramfs @@ -19,7 +19,7 @@ usage() { cat << EOF usage: $0 [option] - -o, --output set initramfs image name + -o, --output set initramfs output path -c, --config set config file path -m, --moddir set modules directory -k, --kernel set kernel version @@ -327,13 +327,13 @@ install_hostonly_modules() if [ "$root_type" ]; then install_module "$root_type" else - while read -r _ _dir _type _ _ _; do + while read -r _ _dir _type _ _ _ || [ "$root_type" ]; do [ "$_dir" = / ] && { - install_module "$_type" + install_module "${root_type=$_type}" break } - done < /proc/mounts + done < /proc/mounts || msg panic "failed to install root partition module" fi # install user specified modules if any diff --git a/usr/share/tinyramfs/init b/usr/share/tinyramfs/init index d088e2e..0cd4c2b 100755 --- a/usr/share/tinyramfs/init +++ b/usr/share/tinyramfs/init @@ -143,7 +143,7 @@ unlock_luks() findfs "$luks_root" - set -- "--disable-locks" "$luks_key" "$luks_discard" "$luks_header" "$device" "${luks_name:-luks-${device##*/}}" + set -- "--disable-locks" "$luks_key" "$luks_header" "$luks_discard" "$device" "${luks_name:-luks-${device##*/}}" cryptsetup open $@ || panic "failed to unlock LUKS" }