SHA256
1
0
forked from pool/systemd
systemd/modules_on_boot.patch

72 lines
2.7 KiB
Diff
Raw Normal View History

From 051e407e1af70e779c092c81733a98832c29d6b4 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
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(-)
Index: systemd-191/src/modules-load/modules-load.c
Accepting request 96193 from Base:System - Remove storage-after-cryptsetup.service, add storage-after-cryptsetup.patch instead to prevent dependency cycle (bnc#722539). - Add delay-fsck-cryptsetup-after-md-lvm-dmraid.patch: ensure fsck/cryptsetup is run after lvm/md/dmraid have landed (bnc#724912). - Add cron-tty-pam.patch: Fix cron filling logs (bnc#731358). - Add do_not_warn_pidfile.patch: Fix PID warning in logs (bnc#732912). - Add mount-swap-log.patch: Ensure swap and mount output is redirected to default log target (rhb#750032). - Add color-on-boot.patch: ensure colored status are displayed at boot time. - Update modules_on_boot.patch to fix bnc#732041. - Replace private_tmp_crash.patch with log_on_close.patch, better upstream fix for bnc#699829 and fix bnc#731719. - Update vconsole patch to fix memleaks and crash (bnc#734527). - Add handle-racy-daemon.patch: fix warnings with sendmail (bnc#732912). - Add new-lsb-headers.patch: support PIDFile: and X-Systemd-RemainAfterExit: header in initscript (bnc#727771). - Update bootsplash services to not start if vga= is missing from cmdline (bnc#727771) - Add lock-opensuse.patch: disable /var/lock/{subsys,lockdev} and change default permissions on /var/lock (bnc#733523). - Add garbage_collect_units: ensure error units are correctly garbage collected (rhb#680122). - Add crypt-loop-file.patch: add support for crypt file loop (bnc#730496). OBS-URL: https://build.opensuse.org/request/show/96193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=84
2011-12-12 16:59:25 +01:00
===================================================================
--- systemd-191.orig/src/modules-load/modules-load.c
+++ systemd-191/src/modules-load/modules-load.c
@@ -173,6 +173,9 @@ int main(int argc, char *argv[]) {
int r = EXIT_FAILURE, k;
char **files = NULL, **fn, **i;
struct kmod_ctx *ctx;
+#if defined(TARGET_SUSE)
+ char *modules_on_boot = NULL;
+#endif
if (argc > 1) {
log_error("This program takes no argument.");
@@ -256,9 +259,34 @@ int main(int argc, char *argv[]) {
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
fclose(f);
}
-
+#if defined(TARGET_SUSE)
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
+ 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;
+ if (modules_on_boot) {
+ char **modules = strv_split(modules_on_boot,WHITESPACE);
+ char **module;
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
+
+ if (modules) {
+ STRV_FOREACH(module, modules) {
+ k = load_module(ctx, *module);
+ if (k < 0)
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
+ r = EXIT_FAILURE;
+ }
+ }
+ strv_free(modules);
+ }
+#endif
finish:
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
strv_free(files);
+#if defined(TARGET_SUSE)
+ free(modules_on_boot);
+#endif
Accepting request 104941 from Base:System - Update to version 42: + Various bug fixes + Watchdog support for supervising services is now usable + Service start rate limiting is now configurable and can be turned off per service. + New CanReboot(), CanPowerOff() bus calls in systemd-logind - Dropped fix-kmod-build.patch, fix-message-after-chkconfig.patch, is-enabled-non-existing-service.patch (merged upstream) - Add libxslt1 / docbook-xsl-stylesheets as BuildRequires for manpage generation - Update to version 41: + systemd binary is now installed in /lib/systemd (symlink for /bin/systemd is available now) + kernel modules are now loaded through libkmod + Watchdog support is now useful (not complete) + new kernel command line available to set system wide environment variable: systemd.setenv + journald capabilities set is now limited + SIGPIPE is ignored by default. This can be disabled with IgnoreSIGPIPE=no in unit files. - Add fix-kmod-build.patch: fix build with libkmod - Drop remote-fs-after-network.patch (merged upstream) - Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm /dmraid is started before mounting partitions, if fsck was disabled for them (bnc#733283). - Update lsb-header patch to correctly disable heuristic if X-Systemd-RemainAfterExit is specified (whatever its value) - Add fix-message-after-chkconfig.patch: don't complain if only sysv services are called in systemctl. OBS-URL: https://build.opensuse.org/request/show/104941 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=88
2012-02-16 16:24:03 +01:00
kmod_unref(ctx);
strv_free(arg_proc_cmdline_modules);
Index: systemd-191/units/systemd-modules-load.service.in
Accepting request 96193 from Base:System - Remove storage-after-cryptsetup.service, add storage-after-cryptsetup.patch instead to prevent dependency cycle (bnc#722539). - Add delay-fsck-cryptsetup-after-md-lvm-dmraid.patch: ensure fsck/cryptsetup is run after lvm/md/dmraid have landed (bnc#724912). - Add cron-tty-pam.patch: Fix cron filling logs (bnc#731358). - Add do_not_warn_pidfile.patch: Fix PID warning in logs (bnc#732912). - Add mount-swap-log.patch: Ensure swap and mount output is redirected to default log target (rhb#750032). - Add color-on-boot.patch: ensure colored status are displayed at boot time. - Update modules_on_boot.patch to fix bnc#732041. - Replace private_tmp_crash.patch with log_on_close.patch, better upstream fix for bnc#699829 and fix bnc#731719. - Update vconsole patch to fix memleaks and crash (bnc#734527). - Add handle-racy-daemon.patch: fix warnings with sendmail (bnc#732912). - Add new-lsb-headers.patch: support PIDFile: and X-Systemd-RemainAfterExit: header in initscript (bnc#727771). - Update bootsplash services to not start if vga= is missing from cmdline (bnc#727771) - Add lock-opensuse.patch: disable /var/lock/{subsys,lockdev} and change default permissions on /var/lock (bnc#733523). - Add garbage_collect_units: ensure error units are correctly garbage collected (rhb#680122). - Add crypt-loop-file.patch: add support for crypt file loop (bnc#730496). OBS-URL: https://build.opensuse.org/request/show/96193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=84
2011-12-12 16:59:25 +01:00
===================================================================
--- systemd-191.orig/units/systemd-modules-load.service.in
+++ systemd-191/units/systemd-modules-load.service.in
@@ -13,6 +13,7 @@ Conflicts=shutdown.target
Accepting request 96193 from Base:System - Remove storage-after-cryptsetup.service, add storage-after-cryptsetup.patch instead to prevent dependency cycle (bnc#722539). - Add delay-fsck-cryptsetup-after-md-lvm-dmraid.patch: ensure fsck/cryptsetup is run after lvm/md/dmraid have landed (bnc#724912). - Add cron-tty-pam.patch: Fix cron filling logs (bnc#731358). - Add do_not_warn_pidfile.patch: Fix PID warning in logs (bnc#732912). - Add mount-swap-log.patch: Ensure swap and mount output is redirected to default log target (rhb#750032). - Add color-on-boot.patch: ensure colored status are displayed at boot time. - Update modules_on_boot.patch to fix bnc#732041. - Replace private_tmp_crash.patch with log_on_close.patch, better upstream fix for bnc#699829 and fix bnc#731719. - Update vconsole patch to fix memleaks and crash (bnc#734527). - Add handle-racy-daemon.patch: fix warnings with sendmail (bnc#732912). - Add new-lsb-headers.patch: support PIDFile: and X-Systemd-RemainAfterExit: header in initscript (bnc#727771). - Update bootsplash services to not start if vga= is missing from cmdline (bnc#727771) - Add lock-opensuse.patch: disable /var/lock/{subsys,lockdev} and change default permissions on /var/lock (bnc#733523). - Add garbage_collect_units: ensure error units are correctly garbage collected (rhb#680122). - Add crypt-loop-file.patch: add support for crypt file loop (bnc#730496). OBS-URL: https://build.opensuse.org/request/show/96193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=84
2011-12-12 16:59:25 +01:00
After=systemd-readahead-collect.service systemd-readahead-replay.service
Before=sysinit.target shutdown.target
ConditionCapability=CAP_SYS_MODULE
Accepting request 96193 from Base:System - Remove storage-after-cryptsetup.service, add storage-after-cryptsetup.patch instead to prevent dependency cycle (bnc#722539). - Add delay-fsck-cryptsetup-after-md-lvm-dmraid.patch: ensure fsck/cryptsetup is run after lvm/md/dmraid have landed (bnc#724912). - Add cron-tty-pam.patch: Fix cron filling logs (bnc#731358). - Add do_not_warn_pidfile.patch: Fix PID warning in logs (bnc#732912). - Add mount-swap-log.patch: Ensure swap and mount output is redirected to default log target (rhb#750032). - Add color-on-boot.patch: ensure colored status are displayed at boot time. - Update modules_on_boot.patch to fix bnc#732041. - Replace private_tmp_crash.patch with log_on_close.patch, better upstream fix for bnc#699829 and fix bnc#731719. - Update vconsole patch to fix memleaks and crash (bnc#734527). - Add handle-racy-daemon.patch: fix warnings with sendmail (bnc#732912). - Add new-lsb-headers.patch: support PIDFile: and X-Systemd-RemainAfterExit: header in initscript (bnc#727771). - Update bootsplash services to not start if vga= is missing from cmdline (bnc#727771) - Add lock-opensuse.patch: disable /var/lock/{subsys,lockdev} and change default permissions on /var/lock (bnc#733523). - Add garbage_collect_units: ensure error units are correctly garbage collected (rhb#680122). - Add crypt-loop-file.patch: add support for crypt file loop (bnc#730496). OBS-URL: https://build.opensuse.org/request/show/96193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=84
2011-12-12 16:59:25 +01:00
+ConditionPathExists=|/etc/sysconfig/kernel
ConditionDirectoryNotEmpty=|/lib/modules-load.d
ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d
ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d