aboutsummaryrefslogtreecommitdiff
path: root/arch-modules-load
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-07-28 01:32:35 +0200
committerTom Gundersen <teg@jklm.no>2012-07-28 02:35:48 +0200
commitb0b1d8fb0f933b37e5878541e18034614eed47fb (patch)
treec114a209c2c5dcdd9fa716f6d79fb14874a406d1 /arch-modules-load
parent22c3b22688f451fb24f9075712fce732e9057a10 (diff)
downloadinitscripts-b0b1d8fb0f933b37e5878541e18034614eed47fb.tar.xz
merge initscripts-systemd
This makes sure that systemd supports some initscripts API's. With this patch, systemd will: * Parse and use DAEMONS and MODULES from rc.conf * Run rc.local and rc.local.shutdown on boot and shutdown respectively Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'arch-modules-load')
-rwxr-xr-xarch-modules-load15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch-modules-load b/arch-modules-load
new file mode 100755
index 0000000..e522c2b
--- /dev/null
+++ b/arch-modules-load
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# /usr/lib/systemd/arch-modules-load
+#
+
+. /etc/rc.conf
+
+# generate list of modules to be loaded by systemd-module-load in /run/modules-load.d/
+if [[ $MODULES ]]; then
+ mkdir /run/modules-load.d
+ echo "# Autogenerated by /usr/lib/systemd/arch-modules-load" > /run/modules-load.d/rc.conf
+ printf '%s\n' "${MODULES[@]}" >> /run/modules-load.d/rc.conf
+fi
+
+# vim: set noet ts=2 sw=2: