From 4646688d9417ca64965e366e1eab2c18c4e2c8fbb1249e319a8d58c753a05e68 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 11 Mar 2011 16:57:09 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=104 --- startpar-0.57.dif | 27 +++++++++++++++++++++++---- sysvinit.changes | 6 ++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/startpar-0.57.dif b/startpar-0.57.dif index eba5d85..e4c47d3 100644 --- a/startpar-0.57.dif +++ b/startpar-0.57.dif @@ -1,5 +1,5 @@ --- makeboot.c -+++ makeboot.c 2010-10-12 16:42:53.996426160 +0000 ++++ makeboot.c 2010-10-12 16:42:54.000000000 +0000 @@ -407,6 +407,7 @@ void check_run_files(const char *action, */ #ifndef USE_BLOGD @@ -9,7 +9,7 @@ /* --- proc.c -+++ proc.c 2010-09-30 12:19:16.000000000 +0000 ++++ proc.c 2011-03-11 16:00:04.491925980 +0000 @@ -94,3 +94,74 @@ int read_proc(unsigned long int * const return 0; } @@ -50,7 +50,7 @@ +void detect_consoles(void) +{ + FILE *fc; -+ if ((fc = fopen("/proc/tty/consoles", "r"))) { ++ if ((fc = fopen("/proc/consoles", "r"))) { + char fbuf[16]; + int maj, min; + DIR *dir; @@ -94,7 +94,7 @@ -extern void unraw_consoles(void); -extern void raw_consoles(void); --- startpar.c -+++ startpar.c 2010-10-12 16:45:32.040429641 +0000 ++++ startpar.c 2011-03-11 15:59:16.388425553 +0000 @@ -52,6 +52,12 @@ #include #include @@ -164,6 +164,15 @@ if (setpgid(0, 0)) perror("setpgid"); +@@ -486,7 +481,7 @@ void run(struct prg *p) + _exit(1); + } + TEMP_FAILURE_RETRY(dup2(1, 2)); +- if (tcsetattr(1, TCSANOW, &tio)) ++ if (tcsetattr(1, TCSANOW, &tio) && errno != ENOTTY) + perror("tcsetattr"); + if (wzok) + ioctl(1, TIOCSWINSZ, &wz); @@ -582,14 +577,7 @@ int run_single(const char *prg, const ch { sigset_t nmask; @@ -244,3 +253,13 @@ (void)sigemptyset(&nmask); (void)sigaddset(&nmask, SIGHUP); sigprocmask(SIG_UNBLOCK, &nmask, NULL); +@@ -1015,7 +1021,8 @@ int main(int argc, char **argv) + + if (tcgetattr(0, &tio)) + { +- perror("tcgetattr"); ++ if (errno != ENOTTY) ++ perror("tcgetattr"); + tcgetattr(2, &tio); + } + cfmakeraw(&tio); diff --git a/sysvinit.changes b/sysvinit.changes index 7810115..c78da4c 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 11 17:05:55 CET 2011 - werner@suse.de + +- startpar: fix location of consoles under /proc +- startpar: ignore errors from system console not being a tty + ------------------------------------------------------------------- Thu Mar 10 15:15:33 CET 2011 - werner@suse.de