minor fixes
This commit is contained in:
parent
b9137bf486
commit
65e94770bc
@ -28,7 +28,7 @@ Usage
|
|||||||
|
|
||||||
```
|
```
|
||||||
usage: ./tinyramfs [option]
|
usage: ./tinyramfs [option]
|
||||||
-o, --output <file> set initramfs image name
|
-o, --output <file> set initramfs output path
|
||||||
-c, --config <file> set config file path
|
-c, --config <file> set config file path
|
||||||
-m, --moddir <dir> set modules directory
|
-m, --moddir <dir> set modules directory
|
||||||
-k, --kernel <ver> set kernel version
|
-k, --kernel <ver> set kernel version
|
||||||
@ -49,7 +49,7 @@ debug=0
|
|||||||
#
|
#
|
||||||
force=0
|
force=0
|
||||||
|
|
||||||
# initramfs name
|
# initramfs output path
|
||||||
#
|
#
|
||||||
# default - /tmp/initramfs-$kernel
|
# default - /tmp/initramfs-$kernel
|
||||||
# example - output="/tmp/myinitramfs.img.gz"
|
# example - output="/tmp/myinitramfs.img.gz"
|
||||||
|
2
config
2
config
@ -10,7 +10,7 @@ debug=0
|
|||||||
#
|
#
|
||||||
force=0
|
force=0
|
||||||
|
|
||||||
# initramfs name
|
# initramfs output path
|
||||||
#
|
#
|
||||||
# default - /tmp/initramfs-$kernel
|
# default - /tmp/initramfs-$kernel
|
||||||
# example - output="/tmp/myinitramfs.img.gz"
|
# example - output="/tmp/myinitramfs.img.gz"
|
||||||
|
@ -19,7 +19,7 @@ usage()
|
|||||||
{
|
{
|
||||||
cat << EOF
|
cat << EOF
|
||||||
usage: $0 [option]
|
usage: $0 [option]
|
||||||
-o, --output <file> set initramfs image name
|
-o, --output <file> set initramfs output path
|
||||||
-c, --config <file> set config file path
|
-c, --config <file> set config file path
|
||||||
-m, --moddir <dir> set modules directory
|
-m, --moddir <dir> set modules directory
|
||||||
-k, --kernel <ver> set kernel version
|
-k, --kernel <ver> set kernel version
|
||||||
@ -327,13 +327,13 @@ install_hostonly_modules()
|
|||||||
if [ "$root_type" ]; then
|
if [ "$root_type" ]; then
|
||||||
install_module "$root_type"
|
install_module "$root_type"
|
||||||
else
|
else
|
||||||
while read -r _ _dir _type _ _ _; do
|
while read -r _ _dir _type _ _ _ || [ "$root_type" ]; do
|
||||||
[ "$_dir" = / ] &&
|
[ "$_dir" = / ] &&
|
||||||
{
|
{
|
||||||
install_module "$_type"
|
install_module "${root_type=$_type}"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
done < /proc/mounts
|
done < /proc/mounts || msg panic "failed to install root partition module"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install user specified modules if any
|
# install user specified modules if any
|
||||||
|
@ -143,7 +143,7 @@ unlock_luks()
|
|||||||
|
|
||||||
findfs "$luks_root"
|
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"
|
cryptsetup open $@ || panic "failed to unlock LUKS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user