* [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules
@ 2012-03-26 12:51 Alexander Dahl
2012-03-28 9:48 ` Michael Olbrich
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2012-03-26 12:51 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules
2012-03-26 12:51 [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules Alexander Dahl
@ 2012-03-28 9:48 ` Michael Olbrich
2012-03-28 10:55 ` Alexander Dahl
0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2012-03-28 9:48 UTC (permalink / raw)
To: ptxdist
On Mon, Mar 26, 2012 at 02:51:50PM +0200, Alexander Dahl wrote:
> 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.
PTXdist doesn't really support switching the initmethod at runtime. I'd
prefer to just install /etc/modules-load.d/modules.conf. If you need both
you can add the symlink in projectroot.
Michael
> 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
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules
2012-03-28 9:48 ` Michael Olbrich
@ 2012-03-28 10:55 ` Alexander Dahl
2012-03-28 11:03 ` Michael Olbrich
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2012-03-28 10:55 UTC (permalink / raw)
To: ptxdist
Hello Michael,
Am 2012-03-28 11:48, schrieb Michael Olbrich:
> PTXdist doesn't really support switching the initmethod at runtime.
I'm aware of this. I guess there's no system like this and there's no
need to. What I do is switching those for development, build a new
image and test it afterwards. I would have only one file then in
projectroot in my BSP and it would be handy for me.
> I'd prefer to just install /etc/modules-load.d/modules.conf. If you
> need both you can add the symlink in projectroot.
So just add an empty generic/etc/modules-load.d/modules.conf to
ptxdist and call install_alternative if someone says yes to
PTXCONF_INITMETHOD_SYSTEMD_MODULES_LOAD?
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules
2012-03-28 10:55 ` Alexander Dahl
@ 2012-03-28 11:03 ` Michael Olbrich
0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2012-03-28 11:03 UTC (permalink / raw)
To: ptxdist
On Wed, Mar 28, 2012 at 12:55:08PM +0200, Alexander Dahl wrote:
> Am 2012-03-28 11:48, schrieb Michael Olbrich:
> > PTXdist doesn't really support switching the initmethod at runtime.
>
> I'm aware of this. I guess there's no system like this and there's no
> need to. What I do is switching those for development, build a new
> image and test it afterwards. I would have only one file then in
> projectroot in my BSP and it would be handy for me.
>
> > I'd prefer to just install /etc/modules-load.d/modules.conf. If you
> > need both you can add the symlink in projectroot.
>
> So just add an empty generic/etc/modules-load.d/modules.conf to
> ptxdist and call install_alternative if someone says yes to
> PTXCONF_INITMETHOD_SYSTEMD_MODULES_LOAD?
sounds right.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-28 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26 12:51 [ptxdist] [PATCH] add config and install symlink to let systemd load modules from /etc/modules Alexander Dahl
2012-03-28 9:48 ` Michael Olbrich
2012-03-28 10:55 ` Alexander Dahl
2012-03-28 11:03 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox