Dr. Werner Fink 2013-12-05 17:06:18 +00:00 committed by Git OBS Bridge
parent 80293b3a1e
commit 22fd4c00d8
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,49 @@
--- systemd-208/src/getty-generator/getty-generator.c
+++ systemd-208/src/getty-generator/getty-generator.c 2013-12-05 14:55:31.178235334 +0000
@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) {
/* Automatically add in a serial getty on all active
* kernel consoles */
FOREACH_WORD(w, l, active, state) {
- char *tty;
+ char *tty, *p;
int k;
tty = strndup(w, l);
@@ -144,6 +144,37 @@ int main(int argc, char *argv[]) {
continue;
}
+ if (asprintf(&p, "/sys/class/tty/%s", tty) < 0) {
+ log_oom();
+ r = EXIT_FAILURE;
+ goto finish;
+ }
+
+ k = access(p, F_OK);
+ free(p);
+
+ if (k < 0) {
+ char *t;
+ int n;
+ if ((p = strchr(tty, '-')) == NULL)
+ continue;
+ t = p+1;
+ if (*t < '1' || *t > '9')
+ continue;
+ k = safe_atoi(t, &n);
+ if (k < 0)
+ continue;
+ n--;
+ *p = '\0';
+ if (asprintf(&t, "%s%d", tty, n) < 0) {
+ log_oom();
+ r = EXIT_FAILURE;
+ goto finish;
+ }
+ free(tty);
+ tty = t;
+ }
+
/* We assume that gettys on virtual terminals are
* started via manual configuration and do this magic
* only for non-VC terminals. */

View File

@ -260,9 +260,12 @@ Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch
# PATCH-FIX-OPENSUSE 1011-check-4-valid-kmsg-device.patch -- Avoid busy systemd-journald (bnc#851393) # PATCH-FIX-OPENSUSE 1011-check-4-valid-kmsg-device.patch -- Avoid busy systemd-journald (bnc#851393)
Patch1011: 1011-check-4-valid-kmsg-device.patch Patch1011: 1011-check-4-valid-kmsg-device.patch
# PATCH-FIX-PSTREAM 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch # PATCH-FIX-UPSTREAM 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-UPSTREAM U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
# PATCH-FIX-UPSTREAM 1013-serial-console-names-and-index.patch
Patch1014: 1013-serial-console-names-and-index.patch
%description %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -542,6 +545,7 @@ cp %{SOURCE7} m4/
%patch1011 -p1 %patch1011 -p1
%patch1012 -p1 %patch1012 -p1
%patch1013 -p1 %patch1013 -p1
%patch1014 -p1
# ensure generate files are removed # ensure generate files are removed
rm -f units/emergency.service rm -f units/emergency.service