systemd/suse-sysv-bootd-support.diff

81 lines
3.2 KiB
Diff
Raw Permalink Normal View History

From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 12 Apr 2013 16:56:26 +0200
Subject: Revert "service: drop support for SysV scripts for the early boot"
This reverts commit 3cdebc217c42c8529086f2965319b6a48eaaeabe.
[Implementation note: currently, the unit is generated, but not
activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
---
src/sysv-generator/sysv-generator.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
Index: systemd-228/src/sysv-generator/sysv-generator.c
===================================================================
--- systemd-228.orig/src/sysv-generator/sysv-generator.c
+++ systemd-228/src/sysv-generator/sysv-generator.c
@@ -46,7 +46,8 @@
typedef enum RunlevelType {
RUNLEVEL_UP,
- RUNLEVEL_DOWN
+ RUNLEVEL_DOWN,
+ RUNLEVEL_SYSINIT,
} RunlevelType;
static const struct {
@@ -54,6 +55,9 @@ static const struct {
const char *target;
const RunlevelType type;
} rcnd_table[] = {
+ /* SUSE style boot.d */
+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
+
/* Standard SysV runlevels for start-up */
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
{ "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
@@ -69,10 +73,10 @@ static const struct {
directories in this order, and we want to make sure that
sysv_start_priority is known when we first load the
unit. And that value we only know from S links. Hence
- UP must be read before DOWN */
+ UP/SYSINIT must be read before DOWN */
};
Accepting request 286574 from home:elvigia:branches:Base:System - spec : remove --with-firmware-path, firmware loader was removed in v217 - spec: remove --disable-multi-seat-x, gone.(fixed in xorg) - spec: Do not enable systemd-readahead-collect.service and systemd-readahead-replay.service as these do not exist anymore. - spec: drop timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Yast was fixed to write all timezone changes exactly how timedated expects things to be done. - spec: remove handle-etc-HOSTNAME.patch, since late 2014 the netcfg package handles the migration from /etc/HOSTNAME to /etc/hostname and owns both files. -spec: remove boot.udev and systemd-journald.init as they currently serve no purpose. - suse-sysv-bootd-support.diff: Remove HAVE_SYSVINIT conditions, we are in sysvcompat-only codepath, also remove the code targetting other distributions, never compiled as the TARGET_$DISTRO macros are never defined. - systemd-powerd-initctl-support.patch guard with HAVE_SYSV_COMPAT - set-and-use-default-logconsole.patch: fix HAVE_SYSV_COMPAT guards - insserv-generator.patch: Only build when sysvcompat is enabled - vhangup-on-all-consoles.patch add a comment indicating this is a workaround for a kernel bug. - spec: Add option to allow disabling sysvinit compat at build time. - spec: Add option to enable resolved at build time. - spec: Remove all %ifs for !factory products, current systemd releases can neither be built nor installed in older products without upgrading several components of the base system. (removed: 1008-add-msft-compability-rules.patch was only for =< 13.1) - spec: remove all dummy "aliases" to /etc/init.d, that made sense only when those init scripts still existed. (dummy localfs.service source: gone) - systemd-sleep-grub: moved to the grub2 package where it belongs as a suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch) OBS-URL: https://build.opensuse.org/request/show/286574 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=856
2015-02-18 13:10:33 +01:00
-const char *arg_dest = "/tmp";
+static const char *arg_dest = "/tmp";
typedef struct SysvStub {
char *name;
@@ -261,6 +265,10 @@ static char *sysv_translate_name(const c
Accepting request 315632 from home:elvigia:branches:Base:System - Systemd v222, bugfix release. - Drop upstream patches 0006-pam_systemd-Properly-check-kdbus-availability.patch 0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch 0031-install-fix-bad-memory-access.patch 1032-ata_id-unbotch-format-specifier.patch - Drop SUSE patch 1013-no-runtime-PM-for-IBM-consoles.patch udev does no longer enable USB HID power management at all. - The udev accelerometer helper was removed, obsoleted by iio-sensor-proxy package. - networkd gained a new configuration option IPv6PrivacyExtensions. - udev does not longer support the WAIT_FOR_SYSFS= key in udev rules. There are no known issues with current sysfs, and udev does not need or should be used to work around such bugs. - Systemd v222, bugfix release. - Drop upstream patches 0006-pam_systemd-Properly-check-kdbus-availability.patch 0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch 0031-install-fix-bad-memory-access.patch 1032-ata_id-unbotch-format-specifier.patch - Drop SUSE patch 1013-no-runtime-PM-for-IBM-consoles.patch udev does no longer enable USB HID power management at all. - The udev accelerometer helper was removed, obsoleted by iio-sensor-proxy package. - networkd gained a new configuration option IPv6PrivacyExtensions. - udev does not longer support the WAIT_FOR_SYSFS= key in udev rules. There are no known issues with current sysfs, and udev does not need or should be used to work around such bugs. OBS-URL: https://build.opensuse.org/request/show/315632 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=885
2015-07-16 12:04:35 +02:00
_cleanup_free_ char *c = NULL;
char *res;
+ if (startswith(name, "boot."))
+ /* Drop SuSE-style boot. prefix */
+ name += 5;
+
Accepting request 315632 from home:elvigia:branches:Base:System - Systemd v222, bugfix release. - Drop upstream patches 0006-pam_systemd-Properly-check-kdbus-availability.patch 0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch 0031-install-fix-bad-memory-access.patch 1032-ata_id-unbotch-format-specifier.patch - Drop SUSE patch 1013-no-runtime-PM-for-IBM-consoles.patch udev does no longer enable USB HID power management at all. - The udev accelerometer helper was removed, obsoleted by iio-sensor-proxy package. - networkd gained a new configuration option IPv6PrivacyExtensions. - udev does not longer support the WAIT_FOR_SYSFS= key in udev rules. There are no known issues with current sysfs, and udev does not need or should be used to work around such bugs. - Systemd v222, bugfix release. - Drop upstream patches 0006-pam_systemd-Properly-check-kdbus-availability.patch 0023-core-fix-reversed-dependency-check-in-unit_check_unn.patch 0031-install-fix-bad-memory-access.patch 1032-ata_id-unbotch-format-specifier.patch - Drop SUSE patch 1013-no-runtime-PM-for-IBM-consoles.patch udev does no longer enable USB HID power management at all. - The udev accelerometer helper was removed, obsoleted by iio-sensor-proxy package. - networkd gained a new configuration option IPv6PrivacyExtensions. - udev does not longer support the WAIT_FOR_SYSFS= key in udev rules. There are no known issues with current sysfs, and udev does not need or should be used to work around such bugs. OBS-URL: https://build.opensuse.org/request/show/315632 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=885
2015-07-16 12:04:35 +02:00
c = strdup(name);
if (!c)
return NULL;
@@ -882,7 +890,8 @@ static int set_dependencies_from_rcnd(co
if (de->d_name[0] == 'S') {
- if (rcnd_table[i].type == RUNLEVEL_UP)
+ if (rcnd_table[i].type == RUNLEVEL_UP ||
+ rcnd_table[i].type == RUNLEVEL_SYSINIT)
service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
r = set_ensure_allocated(&runlevel_services[i], NULL);
@@ -898,7 +907,8 @@ static int set_dependencies_from_rcnd(co
}
} else if (de->d_name[0] == 'K' &&
- (rcnd_table[i].type == RUNLEVEL_DOWN)) {
+ (rcnd_table[i].type == RUNLEVEL_DOWN ||
+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
r = set_ensure_allocated(&shutdown_services, NULL);
if (r < 0) {