systemd/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch
Stephan Kulow 74bf6f2e1d Accepting request 225960 from Base:System
- Add patch getty-generator-with-serial-3270-tty.patch to avoid
  harmless error messages on not existing getty@3270 files

- Replace systemd-big-endian-reply-matching.patch with upstream
  0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch 
  to solve broken systemd communication with and over dbus (bnc#866732)

- Readd patch 1008-add-msft-compability-rules.patch for
  older code base as 13.1 
- Modify pre_checkin.sh to throw an error if a patch will be
  applied which modifies one of Makefile.am, Makefile.in, or
  configiure.ac as this breaks bootstrapping
- Add second version of make-209-working-on-older-dist.patch
  to be able to apply for bootstrapping version

- Don't require non-existing binutils-gold

- Avoid file conflict between udev and systemd (bnc#868230)

- Modify patch
  module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch
  to ignore if /etc/sysconfig/kernel does not exist (bnc#865834) 

- Add patch systemd-big-endian-reply-matching.patch
  make sure that systemd can talk with dbus-daemon even on big
  endian systems (bnc#866732)
-----------------------------------------------------------------
- Due to previous reason, resurrect systemd-dbus-system-bus-address.patch
- Removed pkgconfig(dbus-1) BuildRequires - with 209 and newer, itis only
  needed for quering default DBus directories, which we nowpass to configure.

OBS-URL: https://build.opensuse.org/request/show/225960
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=178
2014-03-18 15:21:15 +00:00

65 lines
2.5 KiB
Diff

From: Frederic Crozat <fcrozat@suse.com>
Date: Wed, 12 Oct 2011 15:18:29 +0200
Subject: module-load: handle SUSE /etc/sysconfig/kernel module list
---
src/modules-load/modules-load.c | 27 ++++++++++++++++++++++++++-
units/systemd-modules-load.service.in | 1 +
2 files changed, 27 insertions(+), 1 deletion(-)
--- systemd-206_git201308300826.orig/src/modules-load/modules-load.c
+++ systemd-206_git201308300826/src/modules-load/modules-load.c
@@ -262,6 +262,9 @@ static int parse_argv(int argc, char *ar
int main(int argc, char *argv[]) {
int r, k;
struct kmod_ctx *ctx;
+#ifdef HAVE_SYSV_COMPAT
+ _cleanup_free_ char *modules_on_boot = NULL;
+#endif
r = parse_argv(argc, argv);
if (r <= 0)
@@ -318,7 +321,31 @@ int main(int argc, char *argv[]) {
r = k;
}
}
-
+#ifdef HAVE_SYSV_COMPAT
+ log_debug("apply: /etc/sysconfig/kernel MODULES_LOADED_ON_BOOT");
+ if ((r = parse_env_file("/etc/sysconfig/kernel", NEWLINE,
+ "MODULES_LOADED_ON_BOOT", &modules_on_boot,
+ NULL)) < 0) {
+ if (r != -ENOENT)
+ log_warning("Failed to read /etc/sysconfig/kernel: %s", strerror(-r));
+ else
+ r = EXIT_SUCCESS;
+ } else
+ r = EXIT_SUCCESS;
+ if (modules_on_boot) {
+ char **modules = strv_split(modules_on_boot,WHITESPACE);
+ char **module;
+
+ if (modules) {
+ STRV_FOREACH(module, modules) {
+ k = load_module(ctx, *module);
+ if (k < 0)
+ r = EXIT_FAILURE;
+ }
+ }
+ strv_free(modules);
+ }
+#endif
finish:
kmod_unref(ctx);
strv_free(arg_proc_cmdline_modules);
--- systemd-206_git201308300826.orig/units/systemd-modules-load.service.in
+++ systemd-206_git201308300826/units/systemd-modules-load.service.in
@@ -13,6 +13,7 @@ Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service
Before=sysinit.target shutdown.target
ConditionCapability=CAP_SYS_MODULE
+ConditionPathExists=|/etc/sysconfig/kernel
ConditionDirectoryNotEmpty=|/lib/modules-load.d
ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d
ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d