about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEnno Boland <g@s01.de>2016-09-05 11:43:44 +0200
committerGitHub <noreply@github.com>2016-09-05 11:43:44 +0200
commita082284efd1a99cf2191e425a2afd6233103823a (patch)
tree8274433f5c8c959cab07447c8f40b616f585e23a
parent5a920a4d15bbd6cae640205e545a4f4b0aa81ab7 (diff)
parent516e23ca257fb28e745e409cb73ffed30c61e6f9 (diff)
downloadrunit-void-a082284efd1a99cf2191e425a2afd6233103823a.tar.gz
runit-void-a082284efd1a99cf2191e425a2afd6233103823a.tar.xz
runit-void-a082284efd1a99cf2191e425a2afd6233103823a.zip
Merge pull request #56 from jantatje/static-kernel
Do not try to load modules if kernel doesn't support modules.
-rw-r--r--core-services/02-kmods.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/core-services/02-kmods.sh b/core-services/02-kmods.sh
index 9d904c7..9b4636a 100644
--- a/core-services/02-kmods.sh
+++ b/core-services/02-kmods.sh
@@ -1,6 +1,8 @@
 # vim: set ts=4 sw=4 et:
 
 [ -n "$VIRTUALIZATION" ] && return 0
+# Do not try to load modules if kernel does not support them.
+[ ! -e /proc/modules ] && return 0
 
 msg "Loading kernel modules..."
 modules-load -v | tr '\n' ' ' | sed 's:insmod [^ ]*/::g; s:\.ko\(\.gz\)\? ::g'