summaryrefslogtreecommitdiff
path: root/dracut
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2009-07-02 10:06:15 +0100
committerHarald Hoyer <harald@redhat.com>2009-07-02 17:18:09 +0200
commit1b9cae5cb25ee1b10eb414beacc8aec9e8ccccc2 (patch)
tree607f7b3a537bf8d8d6b7be9d01ce085dedffa928 /dracut
parent259e58a9046de21e23866ef8dcc358850d8cb364 (diff)
Remove modules dependency
This makes it possible to build a dracut initramfs without modules, where all needed kernel drivers are built into the kernel image.
Diffstat (limited to 'dracut')
-rwxr-xr-xdracut8
1 files changed, 5 insertions, 3 deletions
diff --git a/dracut b/dracut
index 1d440ef..ee8f6eb 100755
--- a/dracut
+++ b/dracut
@@ -140,9 +140,11 @@ echo $mods_to_load
## final stuff that has to happen
# generate module dependencies for the initrd
-if ! depmod -a -b "$initdir" $kernel; then
- echo "\"depmod -a $kernel\" failed."
- exit 1
+if [ -d "$initdir/lib/modules/$kernel" ]; then
+ if ! depmod -a -b "$initdir" $kernel; then
+ echo "\"depmod -a $kernel\" failed."
+ exit 1
+ fi
fi
# make sure that library links are correct and up to date