]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
chore: remove dead code that is no longer expected to be executed
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 2 Aug 2025 15:44:26 +0000 (11:44 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Tue, 5 Aug 2025 16:57:11 +0000 (12:57 -0400)
/lib/modules should always exists, which is consistent with the
assumptions made in the rest of the dracut mode.

dracut.sh
lsinitrd.sh

index b53d729241b97278a4f6c4704c55807a334c2869..68a3ed1f7f9437fdd183e927c662fe3e418fb925 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -974,8 +974,6 @@ if ! [[ $kernel ]] && [[ $regenerate_all_l != "yes" ]]; then
     else
         # shellcheck disable=SC2012
         kernel="$(cd /lib/modules && ls -1v | tail -1)"
-        # shellcheck disable=SC2012
-        [[ $kernel ]] || kernel="$(cd /usr/lib/modules && ls -1v | tail -1)"
     fi
 fi
 
index fd0633dfad524d0f81b9f274d9377b719d82d312..0595694b50e13910515abbaeabdb80e276aaa619 100755 (executable)
@@ -102,8 +102,6 @@ if ! [[ $KERNEL_VERSION ]]; then
     else
         # shellcheck disable=SC2012
         KERNEL_VERSION="$(cd /lib/modules && ls -1v | tail -1)"
-        # shellcheck disable=SC2012
-        [[ $KERNEL_VERSION ]] || KERNEL_VERSION="$(cd /usr/lib/modules && ls -1v | tail -1)"
     fi
 fi