properly handle user specified modules
This commit is contained in:
parent
55fe9abfdc
commit
9f9ed09508
17
tinyramfs
17
tinyramfs
@ -342,11 +342,6 @@ install_hostonly_modules()
|
|||||||
}
|
}
|
||||||
done < /proc/mounts || panic "failed to install root partition module"
|
done < /proc/mounts || panic "failed to install root partition module"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install user specified modules if any
|
|
||||||
for _module in $modules; do
|
|
||||||
install_module "$_module"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_all_modules()
|
install_all_modules()
|
||||||
@ -501,6 +496,18 @@ create_initramfs()
|
|||||||
install_all_modules
|
install_all_modules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install user specified modules if any
|
||||||
|
[ "$modules" ] && {
|
||||||
|
for _module in $modules; do
|
||||||
|
install_module "$_module"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy config
|
||||||
|
printf "%s\n" \
|
||||||
|
modules="$modules" \
|
||||||
|
>> "${workdir}/etc/config"
|
||||||
|
}
|
||||||
|
|
||||||
for _binary in find sort modprobe; do
|
for _binary in find sort modprobe; do
|
||||||
install_binary "$_binary"
|
install_binary "$_binary"
|
||||||
done
|
done
|
||||||
|
@ -70,6 +70,8 @@ prepare_environment()
|
|||||||
ln -s /proc/self/fd/2 /dev/stderr
|
ln -s /proc/self/fd/2 /dev/stderr
|
||||||
|
|
||||||
trap 'panic "something went wrong"' EXIT
|
trap 'panic "something went wrong"' EXIT
|
||||||
|
|
||||||
|
[ "$modules" ] && modprobe -a "$modules"
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_cmdline()
|
parse_cmdline()
|
||||||
@ -147,10 +149,8 @@ unlock_luks()
|
|||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"--disable-locks" \
|
"--disable-locks" \
|
||||||
"$luks_key" \
|
"$luks_key" "$luks_header" \
|
||||||
"$luks_header" \
|
"$luks_discard" "$device" \
|
||||||
"$luks_discard" \
|
|
||||||
"$device" \
|
|
||||||
"${luks_name:-luks-${device##*/}}"
|
"${luks_name:-luks-${device##*/}}"
|
||||||
|
|
||||||
cryptsetup open $@ || panic "failed to unlock LUKS"
|
cryptsetup open $@ || panic "failed to unlock LUKS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user