Re: [systemd-devel] modprobe in service file

2011-11-09 Thread Lennart Poettering
On Wed, 09.11.11 08:13, Jóhann B. Guðmundsson (johan...@gmail.com) wrote:

 On 11/09/2011 01:14 AM, Lennart Poettering wrote:
 So, ideally all kmods these days can be autoloaded on use. And for the
 few ones which cannot be autoloaded placing a file in
 /etc/load-modules.d/
 
 Do you have any links to documentation on how to autoload kmods on use?

Well, this is a kernel feature. The kernel module developers have to add
the right directives to their .c sources to make the module
autoloadable. And there are a number of different hooks for the
auto-loading. i.e. since about always PCI vendor/product IDs could be
used to do module auto loading, but nowadays DMI info works too, or
device nodes can be precreated and information about it included in the
kmod, and so on. So, making modules autoloadable is something for the
kernel hackers to care for.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] modprobe in service file

2011-11-09 Thread Kay Sievers
2011/11/9 Lennart Poettering lenn...@poettering.net:
 On Wed, 09.11.11 08:13, Jóhann B. Guðmundsson (johan...@gmail.com) wrote:

 Do you have any links to documentation on how to autoload kmods on use?

 Well, this is a kernel feature. The kernel module developers have to add
 the right directives to their .c sources to make the module
 autoloadable. And there are a number of different hooks for the
 auto-loading. i.e. since about always PCI vendor/product IDs could be
 used to do module auto loading, but nowadays DMI info works too, or
 device nodes can be precreated and information about it included in the
 kmod, and so on. So, making modules autoloadable is something for the
 kernel hackers to care for.

The module in question here, ip_queue, is supposed to be loaded when
the netlink_firewall protocol is requested:

MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_FIREWALL);

# modinfo ip_queue | grep alias
alias:  net-pf-16-proto-3

Not sure if that works as expected. Someone needs to try that.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Requires and After

2011-11-09 Thread Michael D. Berger
myDaemon must start after myBaseDaemon, and must start only
if myBaseDaemon is started.

 Do I use:
  After=myBaseDaemon
  Requires=myBaseDaemon 
 ;or only:
  Requires=myBaseDaemon
 ?

Thanks,
Mike.

--
Michael D. Berger
m.d.ber...@ieee.org
http://www.rosemike.net/
 

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Requires and After

2011-11-09 Thread Manuel Amador (Rudd-O)
Both. Otherwise your daemon can be started in parallel and be done before the 
other daemon. 
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Michael D. Berger m.d.ber...@ieee.org wrote:

myDaemon must start after myBaseDaemon, and must start only
if myBaseDaemon is started.

Do I use:
After=myBaseDaemon
Requires=myBaseDaemon 
;or only:
Requires=myBaseDaemon
?

Thanks,
Mike.

--
Michael D. Berger
m.d.ber...@ieee.org
http://www.rosemike.net/


_

systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Requires and After

2011-11-09 Thread Mirco Tischler
2011/11/9 Michael D. Berger m.d.ber...@ieee.org:
 myDaemon must start after myBaseDaemon, and must start only
 if myBaseDaemon is started.

  Do I use:
  After=myBaseDaemon
  Requires=myBaseDaemon
  ;or only:
  Requires=myBaseDaemon
  ?

 Thanks,
 Mike.

The first. Requires alone doesn't ensure the ordering.

Mirco
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Fix same expression on both sides of ''

2011-11-09 Thread Thomas Jarosch
The code should probably look like the statements above it.
Please verify, I just detected it using cppcheck.

Signed-off-by: Thomas Jarosch thomas.jaro...@intra2net.com
---
 src/unit.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/unit.c b/src/unit.c
index 903a8e4..c793b11 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -564,8 +564,8 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
 c-std_output != EXEC_OUTPUT_KMSG_AND_CONSOLE 
 c-std_output != EXEC_OUTPUT_SYSLOG_AND_CONSOLE 
 c-std_error != EXEC_OUTPUT_KMSG 
-c-std_error != EXEC_OUTPUT_SYSLOG_AND_CONSOLE 
-c-std_error != EXEC_OUTPUT_KMSG 
+c-std_error != EXEC_OUTPUT_SYSLOG 
+c-std_error != EXEC_OUTPUT_KMSG_AND_CONSOLE 
 c-std_error != EXEC_OUTPUT_SYSLOG_AND_CONSOLE)
 return 0;
 
-- 
1.7.6.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel