Skip to content

Commit 1de8d75

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 9dbbebb commit 1de8d75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

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

53+
# install lvm commands symlinks useful for emergency shell
54+
_lvm_bin=$(find_binary lvm)
55+
while read -r -d '' file; do
56+
inst "${file}"
57+
done < <(find -L /sbin -maxdepth 1 -samefile "$_lvm_bin" -print0)
58+
5359
if [[ $hostonly_cmdline == "yes" ]]; then
5460
local _lvmconf
5561
_lvmconf=$(cmdline)

0 commit comments

Comments
 (0)