diff --git a/modules_on_boot.patch b/modules_on_boot.patch new file mode 100644 index 00000000..929a2caa --- /dev/null +++ b/modules_on_boot.patch @@ -0,0 +1,79 @@ +From 051e407e1af70e779c092c81733a98832c29d6b4 Mon Sep 17 00:00:00 2001 +From: Frederic Crozat +Date: Wed, 12 Oct 2011 15:18:29 +0200 +Subject: [PATCH] module-load: handle SUSE /etc/sysconfig/kernel module list + +--- + src/modules-load.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 42 insertions(+), 0 deletions(-) + +diff --git a/src/modules-load.c b/src/modules-load.c +index 8dd98f7..73ef5f5 100644 +--- a/src/modules-load.c ++++ b/src/modules-load.c +@@ -36,6 +36,9 @@ int main(int argc, char *argv[]) { + char **arguments = NULL; + unsigned n_arguments = 0, n_allocated = 0; + char **files, **fn; ++#if defined(TARGET_SUSE) ++ char *modules_on_boot = NULL; ++#endif + + if (argc > 1) { + log_error("This program takes no argument."); +@@ -126,6 +129,42 @@ int main(int argc, char *argv[]) { + } + + strv_free(files); ++#if defined(TARGET_SUSE) ++ 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)); ++ } ++ if (modules_on_boot) { ++ char **modules = strv_split(modules_on_boot,WHITESPACE); ++ char **module; ++ if (modules) { ++ STRV_FOREACH(module, modules) { ++ if (n_arguments >= n_allocated) { ++ char **a; ++ unsigned m; ++ ++ m = MAX(16U, n_arguments*2); ++ ++ if (!(a = realloc(arguments, sizeof(char*) * (m+1)))) { ++ log_error("Failed to increase module array size."); ++ free(*module); ++ r = EXIT_FAILURE; ++ continue; ++ } ++ ++ arguments = a; ++ n_allocated = m; ++ } ++ log_debug("adding module: %s\n", *module); ++ arguments[n_arguments++] = strdup(*module); ++ } ++ } ++ strv_free(modules); ++ } ++#endif ++ + finish: + + if (n_arguments > 3) { +@@ -138,6 +177,9 @@ finish: + } + + strv_free(arguments); ++#if defined(TARGET_SUSE) ++ free(modules_on_boot); ++#endif + + return r; + } +-- +1.7.3.4 + diff --git a/systemd-gtk.changes b/systemd-gtk.changes index 133a2383..2391e022 100644 --- a/systemd-gtk.changes +++ b/systemd-gtk.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 12 13:21:15 UTC 2011 - fcrozat@suse.com + +- Shadow single sysv service, it was breaking runlevel 1. +- Add modules_on_boot.patch to handle /etc/sysconfig/kernel + MODULES_ON_BOOT variable (bnc#721662). + ------------------------------------------------------------------- Wed Oct 12 08:38:36 UTC 2011 - fcrozat@suse.com diff --git a/systemd.changes b/systemd.changes index 133a2383..2391e022 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 12 13:21:15 UTC 2011 - fcrozat@suse.com + +- Shadow single sysv service, it was breaking runlevel 1. +- Add modules_on_boot.patch to handle /etc/sysconfig/kernel + MODULES_ON_BOOT variable (bnc#721662). + ------------------------------------------------------------------- Wed Oct 12 08:38:36 UTC 2011 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 60b1bfbd..6c973dc4 100644 --- a/systemd.spec +++ b/systemd.spec @@ -66,6 +66,7 @@ Patch8: tty1.patch Patch10: 0001-service-Fix-dependencies-added-when-parsing-insserv..patch Patch13: 0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch Patch15: support-sysvinit.patch +Patch16: modules_on_boot.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -120,6 +121,7 @@ Plymouth integration for systemd %patch10 -p1 %patch13 -p1 %patch15 -p1 +%patch16 -p1 %build autoreconf -fiv @@ -180,6 +182,7 @@ install -m644 %{S:2} %{buildroot}/lib/systemd/system/localfs.service #ln -s /dev/null %{buildroot}/lib/systemd/system/localnet.service ln -s /dev/null %{buildroot}/lib/systemd/system/proc.service ln -s fsck-root.service %{buildroot}/lib/systemd/system/rootfsck.service +ln -s /dev/null %{buildroot}/lib/systemd/system/single.service ln -s /dev/null %{buildroot}/lib/systemd/system/swap.service ln -s /dev/null %{buildroot}/lib/systemd/system/startpreload.service ln -s /dev/null %{buildroot}/lib/systemd/system/stoppreload.service