aboutsummaryrefslogtreecommitdiff
path: root/init.d/modules.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/modules.in')
-rw-r--r--init.d/modules.in22
1 files changed, 21 insertions, 1 deletions
diff --git a/init.d/modules.in b/init.d/modules.in
index 6ff90d68..7a02c3a5 100644
--- a/init.d/modules.in
+++ b/init.d/modules.in
@@ -17,7 +17,18 @@ depend()
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
}
-start()
+FreeBSD_modules()
+{
+ local cnt=0 x
+ for x in $modules; do
+ ebegin "Loading module $x"
+ kldload "$x"
+ eend $? "Failed to load $x" && : $(( cnt += 1 ))
+ done
+ einfo "Autoloaded $cnt module(s)"
+}
+
+Linux_modules()
{
# Should not fail if kernel do not have module
# support compiled in ...
@@ -68,3 +79,12 @@ start()
done
einfo "Autoloaded $cnt module(s)"
}
+
+start()
+{
+ case "$RC_UNAME" in
+ FreeBSD|Linux) ${RC_UNAME}_modules ;;
+ *) ;;
+ esac
+ return 0
+}