From 2d23dd1950e24ec6b64ae2405464a89b82e4cca5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 21 Apr 2009 22:47:30 +0200 Subject: hook-functions: MODULES=dep error out if sysfs not mounted on /sys. currently we fail sylently later, make it explicit. (closes: #524179) Signed-off-by: maximilian attems --- hook-functions | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3