forked from pool/systemd
Accepting request 286315 from home:jengelh:systemd
restore lines that were dropped - Add first try of suse-sysv-bootd-support.diff OBS-URL: https://build.opensuse.org/request/show/286315 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=848
This commit is contained in:
parent
c21a4ca2f0
commit
bc3fbbd917
86
suse-sysv-bootd-support.diff
Normal file
86
suse-sysv-bootd-support.diff
Normal file
@ -0,0 +1,86 @@
|
||||
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 | 26 +++++++++++++++++++++-----
|
||||
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: systemd/src/sysv-generator/sysv-generator.c
|
||||
===================================================================
|
||||
--- systemd.orig/src/sysv-generator/sysv-generator.c
|
||||
+++ systemd/src/sysv-generator/sysv-generator.c
|
||||
@@ -42,7 +42,8 @@
|
||||
|
||||
typedef enum RunlevelType {
|
||||
RUNLEVEL_UP,
|
||||
- RUNLEVEL_DOWN
|
||||
+ RUNLEVEL_DOWN,
|
||||
+ RUNLEVEL_SYSINIT,
|
||||
} RunlevelType;
|
||||
|
||||
static const struct {
|
||||
@@ -50,6 +51,16 @@ static const struct {
|
||||
const char *target;
|
||||
const RunlevelType type;
|
||||
} rcnd_table[] = {
|
||||
+#ifdef HAVE_SYSV_COMPAT
|
||||
+ /* SUSE style boot.d */
|
||||
+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
|
||||
+#endif
|
||||
+#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || \
|
||||
+ defined(TARGET_ANGSTROM)
|
||||
+ /* Debian style rcS.d */
|
||||
+ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
|
||||
+#endif
|
||||
+
|
||||
/* Standard SysV runlevels for start-up */
|
||||
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
|
||||
{ "rc2.d", SPECIAL_RUNLEVEL2_TARGET, RUNLEVEL_UP },
|
||||
@@ -65,7 +76,7 @@ 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 */
|
||||
};
|
||||
|
||||
typedef struct SysvStub {
|
||||
@@ -235,6 +246,10 @@ static bool usage_contains_reload(const
|
||||
static char *sysv_translate_name(const char *name) {
|
||||
char *r;
|
||||
|
||||
+ if (startswith(name, "boot."))
|
||||
+ /* Drop SuSE-style boot. prefix */
|
||||
+ name += 5;
|
||||
+
|
||||
r = new(char, strlen(name) + strlen(".service") + 1);
|
||||
if (!r)
|
||||
return NULL;
|
||||
@@ -864,10 +879,10 @@ static int set_dependencies_from_rcnd(Lo
|
||||
|
||||
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);
|
||||
if (r < 0)
|
||||
@@ -878,7 +893,8 @@ static int set_dependencies_from_rcnd(Lo
|
||||
goto finish;
|
||||
|
||||
} 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)
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 11:47:04 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Add suse-sysv-bootd-support.diff (reinstate old
|
||||
Revert-service-drop-support-for-SysV-scripts-for-the-early.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 10:18:18 UTC 2015 - jengelh@inai.de
|
||||
|
||||
@ -37,6 +43,8 @@ Fri Jan 9 18:48:28 UTC 2015 - jengelh@inai.de
|
||||
N=no longer applies to source nor is it deemed needed;
|
||||
K=killed: no longer applicable and too complex to resolve:
|
||||
----
|
||||
G 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
|
||||
G avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch
|
||||
K service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch
|
||||
K remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch
|
||||
K handle-SYSTEMCTL_OPTIONS-environment-variable.patch
|
||||
|
@ -185,6 +185,7 @@ Patch21: allow-multiple-sulogin-to-be-started.patch
|
||||
Patch27: apply-ACL-for-nvidia-device-nodes.patch
|
||||
# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device
|
||||
Patch28: apply-ACL-for-nvidia-uvm-device-node.patch
|
||||
Patch37: suse-sysv-bootd-support.diff
|
||||
# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie.
|
||||
Patch39: systemd-tmp-safe-defaults.patch
|
||||
# PATCH-FIX-OPENSUSE sysctl-handle-boot-sysctl.conf-kernel_release.patch bnc#809420 fcrozat@suse.com -- handle /boot/sysctl.conf-<kernel_release> file
|
||||
@ -266,8 +267,9 @@ Patch368: 0001-let-systemctl-completion-ignore-at-names.patch
|
||||
Patch386: use-rndaddentropy-ioctl-to-load-random-seed.patch
|
||||
# PATCH-FIX-SUSE AUDIT-0: Power button press at gdm login should not prompt for credentials (bnc#888612)
|
||||
Patch430: 0001-bnc888612-logind-polkit-acpi.patch
|
||||
# PATCH-FIX-SUSE added on 2014/10/24
|
||||
Patch475: journald-advice-about-use-of-memory.patch
|
||||
# PATCH-FIX-SUSE added at 2014/11/05
|
||||
# PATCH-FIX-SUSE added on 2014/11/05
|
||||
Patch490: watch_resolv.conf_for_become_changed.patch
|
||||
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
|
||||
Patch520: systemd-add-user-keep.patch
|
||||
@ -600,6 +602,7 @@ cp %{SOURCE7} m4/
|
||||
# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch37 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 11:47:04 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Add suse-sysv-bootd-support.diff (reinstate old
|
||||
Revert-service-drop-support-for-SysV-scripts-for-the-early.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 10:18:18 UTC 2015 - jengelh@inai.de
|
||||
|
||||
@ -37,6 +43,8 @@ Fri Jan 9 18:48:28 UTC 2015 - jengelh@inai.de
|
||||
N=no longer applies to source nor is it deemed needed;
|
||||
K=killed: no longer applicable and too complex to resolve:
|
||||
----
|
||||
G 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
|
||||
G avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch
|
||||
K service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch
|
||||
K remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch
|
||||
K handle-SYSTEMCTL_OPTIONS-environment-variable.patch
|
||||
|
@ -180,6 +180,7 @@ Patch21: allow-multiple-sulogin-to-be-started.patch
|
||||
Patch27: apply-ACL-for-nvidia-device-nodes.patch
|
||||
# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device
|
||||
Patch28: apply-ACL-for-nvidia-uvm-device-node.patch
|
||||
Patch37: suse-sysv-bootd-support.diff
|
||||
# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie.
|
||||
Patch39: systemd-tmp-safe-defaults.patch
|
||||
# PATCH-FIX-OPENSUSE sysctl-handle-boot-sysctl.conf-kernel_release.patch bnc#809420 fcrozat@suse.com -- handle /boot/sysctl.conf-<kernel_release> file
|
||||
@ -261,8 +262,9 @@ Patch368: 0001-let-systemctl-completion-ignore-at-names.patch
|
||||
Patch386: use-rndaddentropy-ioctl-to-load-random-seed.patch
|
||||
# PATCH-FIX-SUSE AUDIT-0: Power button press at gdm login should not prompt for credentials (bnc#888612)
|
||||
Patch430: 0001-bnc888612-logind-polkit-acpi.patch
|
||||
# PATCH-FIX-SUSE added on 2014/10/24
|
||||
Patch475: journald-advice-about-use-of-memory.patch
|
||||
# PATCH-FIX-SUSE added at 2014/11/05
|
||||
# PATCH-FIX-SUSE added on 2014/11/05
|
||||
Patch490: watch_resolv.conf_for_become_changed.patch
|
||||
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
|
||||
Patch520: systemd-add-user-keep.patch
|
||||
@ -595,6 +597,7 @@ cp %{SOURCE7} m4/
|
||||
# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch37 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user