summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-06-05 16:49:50 +0200
committerAaron Griffin <aaron@archlinux.org>2006-06-05 16:49:50 +0200
commit60d742305a5cc070f56e97bc8954a342c3180aec (patch)
tree8b74065b3d78041666a83e33127d1ad1bbd96f81 /functions
parent902bf52141dcdb862176eb7e629453ca00e2dcbe (diff)
downloadmkinitcpio-60d742305a5cc070f56e97bc8954a342c3180aec.tar.gz
mkinitcpio-60d742305a5cc070f56e97bc8954a342c3180aec.tar.xz
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@120 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'functions')
-rw-r--r--functions13
1 files changed, 5 insertions, 8 deletions
diff --git a/functions b/functions
index c9a85ad..d8f60b9 100644
--- a/functions
+++ b/functions
@@ -40,7 +40,6 @@ die () { echo "FATAL: ${@}" >&2; exit 1; }
add_dir ()
{
if [ "x${1}" != "x" -a "${1}" != "/" ]; then
-
if ! grep "dir ${1} " "${FILELIST}" 2>&1 > /dev/null; then
add_dir $(dirname "${1}")
msg " adding dir ${1}"
@@ -120,6 +119,7 @@ add_module ()
#cleanup - remove .ko, replace - and _ with [-_] to match either
fil=$(basename "${1}" | sed -e "s|[-_]|\[-_\]|g" -e "s|\.ko$||g")
+ found=0
for path in $(find "${MODULEDIR}" -type f -name "${fil}.ko"); do
for mod in $(modinfo -F depends "${path}" | tr ',' ' '); do
if [ "x${mod}" != "x" ]; then
@@ -127,14 +127,11 @@ add_module ()
HAS_MODULES="y"
fi
done
- add_file "${path}"
+ add_file "${path}" && found=1
done
-}
-
-_finish_modules ()
-{
- echo "wtf!"
-
+ if [ $found -eq 0 ]; then
+ die "module '$fil' not found, aborting..."
+ fi
}
add_binary ()