Skip to content

Commit

Permalink
feat(lvm): install lvm commands symlinks
Browse files Browse the repository at this point in the history
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 <valentin.lefebvre@suse.com>
  • Loading branch information
keentux committed Dec 20, 2022
1 parent e0d57a8 commit 60c5993
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules.d/90lvm/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ installkernel() {
install() {
inst_multiple lvm grep

# install lvm command symlink useful for emergency shell
while read -r -d '' file; do
[[ ${file%%/*} == "lvm" ]] && inst "/${file#*/}"
done < <(find /sbin/ -maxdepth 1 -type l -exec readlink -n {} ';' -print0)

if [[ $hostonly_cmdline == "yes" ]]; then
local _lvmconf
_lvmconf=$(cmdline)
Expand Down

0 comments on commit 60c5993

Please sign in to comment.