diff options
author | maximilian attems <maks@debian.org> | 2009-04-21 22:47:30 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2009-04-21 22:50:20 +0200 |
commit | 2d23dd1950e24ec6b64ae2405464a89b82e4cca5 (patch) | |
tree | 83d523fcaf370ec28b157fd1c9e3ebe39bdf6080 | |
parent | 4cf1ab73b5a1abdfb2fe37862b345976c8507dd1 (diff) | |
download | initramfs-tools-2d23dd1950e24ec6b64ae2405464a89b82e4cca5.tar.gz initramfs-tools-2d23dd1950e24ec6b64ae2405464a89b82e4cca5.zip |
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 <maks@debian.org>
-rw-r--r-- | hook-functions | 6 |
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 |