summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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