Browse Source

Remove a useless use of cat in instmods

We also need to decide whenter we are going to support modules.* files.

Not only are they Fedora-specific, but doing so makes =* arguments to instmods
have two different and incompatible meanings depending on whether that file
exists.
master
Victor Lowther 16 years ago
parent
commit
74534e19c9
  1. 10
      dracut-functions

10
dracut-functions

@ -154,7 +154,8 @@ inst_rules() {
# Same args as above. # Same args as above.
inst() { inst() {
if (($# != 1 && $# != 2 )); then if (($# != 1 && $# != 2 )); then
echo "usage: inst <file> [<destination file>]" echo "dracut error: inst only takes 1 or 2 arguments"
exit 1
fi fi
for x in inst_symlink inst_script inst_binary inst_simple; do for x in inst_symlink inst_script inst_binary inst_simple; do
$x "$@" && return 0 $x "$@" && return 0
@ -194,11 +195,12 @@ instmods() {
while (($# > 0)); do while (($# > 0)); do
mod=${1%.ko} mod=${1%.ko}
case $mod in case $mod in
=*) =*) # This introduces 2 incompatible menaings for =* arguments
# to instmods. We need to decide which one to keep.
if [ "$mod" = "=ata" -a -f $srcmods/modules.block ] ; then if [ "$mod" = "=ata" -a -f $srcmods/modules.block ] ; then
instmods $mpargs $(cat "${srcmods}/modules.block" |egrep 'ata|ahci') instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules.block")
elif [ -f $srcmods/modules.${mod#=} ]; then elif [ -f $srcmods/modules.${mod#=} ]; then
instmods $mpargs $(cat ${srcmods}/modules.${mod#=} ) instmods $mpargs $(cat ${srcmods}/modules.${mod#=} )
else else
instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*") instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*")
fi fi

Loading…
Cancel
Save