summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--functions13
-rw-r--r--hooks/filesystems4
2 files changed, 7 insertions, 10 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 ()
diff --git a/hooks/filesystems b/hooks/filesystems
index cd2f28c..12bc945 100644
--- a/hooks/filesystems
+++ b/hooks/filesystems
@@ -6,7 +6,7 @@ run_hook ()
FSTYPE="${rootfstype}"
else
if [ ! -e "${root}" ]; then
- msg "Attempting to create root device '${root}'"
+ msg -e "\nAttempting to create root device '${root}'"
if [ "x${rootdelay}" != "x" ]; then
msg -n "Waiting for devices to settle..."
@@ -22,7 +22,7 @@ run_hook ()
echo "ERROR: Failed to parse block device '${root}'"
else
export root="${BLOCKNAME}"
- /bin/mknod "${BLOCKNAME}" b ${BLOCKDEVICE} >/dev/null 2>&1
+ /bin/mknod "${BLOCKNAME}" b ${BLOCKDEVICE} >/dev/null
fi
fi