summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-08-06 16:56:42 +0200
committerHarald Hoyer <harald@redhat.com>2013-08-07 10:33:15 +0200
commitaacdba2bdb3efddd7b3b9cdb149204d86f5020b0 (patch)
treee2b3bd18ff7cfda9b00b616525c6d1cce303fca5
parent5ae33613ab3145db12f21bca491d97832160cc1a (diff)
downloaddracut-aacdba2bdb3efddd7b3b9cdb149204d86f5020b0.tar.gz
dracut-aacdba2bdb3efddd7b3b9cdb149204d86f5020b0.tar.bz2
dracut-aacdba2bdb3efddd7b3b9cdb149204d86f5020b0.zip
dracut.sh: check the value of --kver
https://bugzilla.redhat.com/show_bug.cgi?id=993327
-rwxr-xr-xdracut.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/dracut.sh b/dracut.sh
index 4ef71f34..0b674ae2 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -478,6 +478,11 @@ if [[ $regenerate_all == "yes" ]]; then
((ret+=$?))
done
exit $ret
+elif [[ $kernel ]]; then
+ if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then
+ printf -- "Kernel version $kernel has no modules in /lib/modules/$kernel\n" >&2
+ exit 1
+ fi
fi
if ! [[ $kernel ]]; then