about summary refs log tree commit diff
path: root/core-services
diff options
context:
space:
mode:
authorJan Tatje <jan@jnt.io>2016-09-02 02:21:21 +0200
committerJan Tatje <jan@jnt.io>2016-09-02 02:21:21 +0200
commit516e23ca257fb28e745e409cb73ffed30c61e6f9 (patch)
tree8274433f5c8c959cab07447c8f40b616f585e23a /core-services
parent5a920a4d15bbd6cae640205e545a4f4b0aa81ab7 (diff)
downloadrunit-void-516e23ca257fb28e745e409cb73ffed30c61e6f9.tar.gz
runit-void-516e23ca257fb28e745e409cb73ffed30c61e6f9.tar.xz
runit-void-516e23ca257fb28e745e409cb73ffed30c61e6f9.zip
Do not try to load modules if kernel doesn't support modules.
Diffstat (limited to 'core-services')
-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'