mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules
Date: Mon, 26 Mar 2012 14:51:50 +0200	[thread overview]
Message-ID: <1332766310-1764-1-git-send-email-post@lespocky.de> (raw)

systemd can statically load kernel modules at boot. This is done by
placing appropriate files *.conf in /etc/modules-load.d. To be
compatible with initmethod-busybox (e.g. if you switch between both)
just a symlink to /etc/modules is created like Debian does, too.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/initmethod-systemd.in   |   10 ++++++++--
 rules/initmethod-systemd.make |    7 +++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/rules/initmethod-systemd.in b/rules/initmethod-systemd.in
index 07010b4..20a2f43 100644
--- a/rules/initmethod-systemd.in
+++ b/rules/initmethod-systemd.in
@@ -11,6 +11,12 @@ config INITMETHOD_SYSTEMD_IFUPDOWN
 	help
 	  Enable this to install services to handle networks with ifup/ifdown
 
-endif
-
+config INITMETHOD_SYSTEMD_MODULES_LOAD
+	bool
+	prompt "load kernel modules at boot time"
+	help
+	  Installs /etc/modules and links /etc/modules-load.d/modules.conf
+	  to it for statically loading kernel modules at boot time. This is
+	  the hacked systemd equivalent of /etc/init.d/modules ...
 
+endif
diff --git a/rules/initmethod-systemd.make b/rules/initmethod-systemd.make
index 4a0667f..c3abee8 100644
--- a/rules/initmethod-systemd.make
+++ b/rules/initmethod-systemd.make
@@ -53,6 +53,13 @@ ifdef PTXCONF_INITMETHOD_SYSTEMD_IFUPDOWN
 	@$(call install_copy, initmethod-systemd, 0, 0, 0755, /etc/network/if-pre-up.d)
 endif
 
+ifdef PTXCONF_INITMETHOD_SYSTEMD_MODULES_LOAD
+	@$(call install_alternative, initmethod-systemd, 0, 0, 0644, \
+		/etc/modules)
+	@$(call install_link, initmethod-systemd, ../modules, \
+		/etc/modules-load.d/modules.conf)
+endif
+
 	@$(call install_finish,initmethod-systemd)
 
 	@$(call touch)
-- 
1.7.2.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2012-03-26 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 12:51 Alexander Dahl [this message]
2012-03-28  9:48 ` Michael Olbrich
2012-03-28 10:55   ` Alexander Dahl
2012-03-28 11:03     ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332766310-1764-1-git-send-email-post@lespocky.de \
    --to=post@lespocky.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox