Skip to content

Commit 60c5993

Browse files
committed
feat(lvm): install lvm commands symlinks
It will install for convenience, lvm's core commands tools. Lvm package installs all of them as symlink to the binary, and they are universally used without `lvm` command. If someone is reaching for these tools in the initrd it's probably because something is wrong, and so the admin may be stressed or flustered and may not connect that "lvm" as a command does everything they need. So recreating a familiar environment during the emergency shell will really help them. Signed-off-by: Valentin Lefebvre <[email protected]>
1 parent e0d57a8 commit 60c5993

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules.d/90lvm/module-setup.sh

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ installkernel() {
5050
install() {
5151
inst_multiple lvm grep
5252

53+
# install lvm command symlink useful for emergency shell
54+
while read -r -d '' file; do
55+
[[ ${file%%/*} == "lvm" ]] && inst "/${file#*/}"
56+
done < <(find /sbin/ -maxdepth 1 -type l -exec readlink -n {} ';' -print0)
57+
5358
if [[ $hostonly_cmdline == "yes" ]]; then
5459
local _lvmconf
5560
_lvmconf=$(cmdline)

0 commit comments

Comments
 (0)