renamed module-info.sh to module-setup.sh
parent
6ae5caf008
commit
71df3c4329
2
NEWS
2
NEWS
|
|
@ -2,7 +2,7 @@ dracut-008
|
|||
==========
|
||||
- removed --ignore-kernel-modules option (no longer necessary)
|
||||
- renamed kernel command line arguments to follow the rd. naming scheme
|
||||
- merged check, install, installkernel to module-info.sh
|
||||
- merged check, install, installkernel to module-setup.sh
|
||||
- support for bzip2 and xz compressed initramfs images.
|
||||
- source code beautification
|
||||
- lots of documentation
|
||||
|
|
|
|||
|
|
@ -518,14 +518,14 @@ inst_opt_decompress() {
|
|||
module_check() {
|
||||
local moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
||||
[[ -d $moddir ]] || return 1
|
||||
if [[ ! -f $moddir/module-info.sh ]]; then
|
||||
if [[ ! -f $moddir/module-setup.sh ]]; then
|
||||
# if we do not have a check script, we are unconditionally included
|
||||
[[ -x $moddir/check ]] || return 0
|
||||
$moddir/check $hostonly
|
||||
return $?
|
||||
else
|
||||
unset check depends install installkernel
|
||||
. $moddir/module-info.sh
|
||||
. $moddir/module-setup.sh
|
||||
is_func check || return 0
|
||||
check
|
||||
ret=$?
|
||||
|
|
@ -537,14 +537,14 @@ module_check() {
|
|||
module_depends() {
|
||||
local moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
||||
[[ -d $moddir ]] || return 1
|
||||
if [[ ! -f $moddir/module-info.sh ]]; then
|
||||
if [[ ! -f $moddir/module-setup.sh ]]; then
|
||||
# if we do not have a check script, we have no deps
|
||||
[[ -x $moddir/check ]] || return 0
|
||||
$moddir/check -d
|
||||
return $?
|
||||
else
|
||||
unset check depends install installkernel
|
||||
. $moddir/module-info.sh
|
||||
. $moddir/module-setup.sh
|
||||
is_func depends || return 0
|
||||
depends
|
||||
ret=$?
|
||||
|
|
@ -556,12 +556,12 @@ module_depends() {
|
|||
module_install() {
|
||||
local moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
||||
[[ -d $moddir ]] || return 1
|
||||
if [[ ! -f $moddir/module-info.sh ]]; then
|
||||
if [[ ! -f $moddir/module-setup.sh ]]; then
|
||||
[[ -x $moddir/install ]] && . "$moddir/install"
|
||||
return $?
|
||||
else
|
||||
unset check depends install installkernel
|
||||
. $moddir/module-info.sh
|
||||
. $moddir/module-setup.sh
|
||||
is_func install || return 0
|
||||
install
|
||||
ret=$?
|
||||
|
|
@ -573,12 +573,12 @@ module_install() {
|
|||
module_installkernel() {
|
||||
local moddir=$(echo ${dracutbasedir}/modules.d/??${1})
|
||||
[[ -d $moddir ]] || return 1
|
||||
if [[ ! -f $moddir/module-info.sh ]]; then
|
||||
if [[ ! -f $moddir/module-setup.sh ]]; then
|
||||
[[ -x $moddir/installkernel ]] && . "$moddir/installkernel"
|
||||
return $?
|
||||
else
|
||||
unset check depends install installkernel
|
||||
. $moddir/module-info.sh
|
||||
. $moddir/module-setup.sh
|
||||
is_func installkernel || return 0
|
||||
installkernel
|
||||
ret=$?
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ Common used functions are in <filename>dracut-lib.sh</filename>, which can be so
|
|||
<section>
|
||||
<title>Writing a Module</title>
|
||||
<para>A simple example module is <filename>96insmodpost</filename>, which modprobes a kernel module after udev has settled and the basic device drivers have been loaded.</para>
|
||||
<para>All module installation information is in the file module-info.sh.</para>
|
||||
<para>All module installation information is in the file module-setup.sh.</para>
|
||||
<para>First we create a <function>check()</function> function, which just exits with <errorcode>0</errorcode> indicating that this module should be included by default.</para>
|
||||
<para><function>check()</function>:</para>
|
||||
<programlisting>return 0</programlisting>
|
||||
|
|
|
|||
Loading…
Reference in New Issue