summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hook-functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/hook-functions b/hook-functions
index 295bce8..780812a 100644
--- a/hook-functions
+++ b/hook-functions
@@ -229,6 +229,12 @@ dep_add_modules()
{
local block minor root FSTYPE root_dev_path x
+ # require mounted sysfs
+ if [ ! -d /sys/kernel/ ]; then
+ echo "mkinitramfs: MODULES dep requires mounted sysfs on /sys"
+ exit 1
+ fi
+
# findout root block device + fstype
eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')"
if [ "${root}" = "/dev/root" ] ; then