dracut-functions.sh: only honor the first [0-9]+<module> dir
If multiple directories with different numbers exist, only honor the first one.master
parent
4358ace43c
commit
1339095dba
|
|
@ -1130,7 +1130,7 @@ inst_opt_decompress() {
|
||||||
# or the "check" script, if module-setup.sh is not found
|
# or the "check" script, if module-setup.sh is not found
|
||||||
# "check $hostonly" is called
|
# "check $hostonly" is called
|
||||||
module_check() {
|
module_check() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
local _forced=0
|
local _forced=0
|
||||||
local _hostonly=$hostonly
|
local _hostonly=$hostonly
|
||||||
|
|
@ -1161,7 +1161,7 @@ module_check() {
|
||||||
# or the "check" script, if module-setup.sh is not found
|
# or the "check" script, if module-setup.sh is not found
|
||||||
# "mount_needs=1 check 0" is called
|
# "mount_needs=1 check 0" is called
|
||||||
module_check_mount() {
|
module_check_mount() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
mount_needs=1
|
mount_needs=1
|
||||||
[[ -d $_moddir ]] || return 1
|
[[ -d $_moddir ]] || return 1
|
||||||
|
|
@ -1186,7 +1186,7 @@ module_check_mount() {
|
||||||
# execute the depends() function of module-setup.sh of <dracut module>
|
# execute the depends() function of module-setup.sh of <dracut module>
|
||||||
# or the "depends" script, if module-setup.sh is not found
|
# or the "depends" script, if module-setup.sh is not found
|
||||||
module_depends() {
|
module_depends() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
[[ -d $_moddir ]] || return 1
|
[[ -d $_moddir ]] || return 1
|
||||||
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
||||||
|
|
@ -1209,7 +1209,7 @@ module_depends() {
|
||||||
# execute the cmdline() function of module-setup.sh of <dracut module>
|
# execute the cmdline() function of module-setup.sh of <dracut module>
|
||||||
# or the "cmdline" script, if module-setup.sh is not found
|
# or the "cmdline" script, if module-setup.sh is not found
|
||||||
module_cmdline() {
|
module_cmdline() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
[[ -d $_moddir ]] || return 1
|
[[ -d $_moddir ]] || return 1
|
||||||
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
||||||
|
|
@ -1230,7 +1230,7 @@ module_cmdline() {
|
||||||
# execute the install() function of module-setup.sh of <dracut module>
|
# execute the install() function of module-setup.sh of <dracut module>
|
||||||
# or the "install" script, if module-setup.sh is not found
|
# or the "install" script, if module-setup.sh is not found
|
||||||
module_install() {
|
module_install() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
[[ -d $_moddir ]] || return 1
|
[[ -d $_moddir ]] || return 1
|
||||||
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
||||||
|
|
@ -1251,7 +1251,7 @@ module_install() {
|
||||||
# execute the installkernel() function of module-setup.sh of <dracut module>
|
# execute the installkernel() function of module-setup.sh of <dracut module>
|
||||||
# or the "installkernel" script, if module-setup.sh is not found
|
# or the "installkernel" script, if module-setup.sh is not found
|
||||||
module_installkernel() {
|
module_installkernel() {
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
[[ -d $_moddir ]] || return 1
|
[[ -d $_moddir ]] || return 1
|
||||||
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
if [[ ! -f $_moddir/module-setup.sh ]]; then
|
||||||
|
|
@ -1273,7 +1273,7 @@ module_installkernel() {
|
||||||
# device and filesystem types in "${host_fs_types[@]}"
|
# device and filesystem types in "${host_fs_types[@]}"
|
||||||
check_mount() {
|
check_mount() {
|
||||||
local _mod=$1
|
local _mod=$1
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
local _moddep
|
local _moddep
|
||||||
|
|
||||||
|
|
@ -1338,7 +1338,7 @@ check_mount() {
|
||||||
# that the modules were checked for the dependency tracking process
|
# that the modules were checked for the dependency tracking process
|
||||||
check_module() {
|
check_module() {
|
||||||
local _mod=$1
|
local _mod=$1
|
||||||
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; })
|
||||||
local _ret
|
local _ret
|
||||||
local _moddep
|
local _moddep
|
||||||
# If we are already scheduled to be loaded, no need to check again.
|
# If we are already scheduled to be loaded, no need to check again.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue