Репозитории ALT
5.1: | 2.86-alt2 |
4.1: | 2.86-alt2 |
4.0: | 2.86-alt1 |
3.0: | 2.85-alt8 |
Группа :: Система/Настройка/Загрузка и инициализация
Пакет: SysVinit
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: sysvinit-2.86-deb-init-emerg-tty.patch
Скачать
Скачать
#! /bin/sh /usr/share/dpatch/dpatch-run
## 66_init_ermg_tty.dpatch by Samuel Thibault
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix emergency mode's tty, making sure ^C and ^Z work when
## DP: booting with 'emergency' kernel option. Closes bug #374543.
@DPATCH@
Index: sysvinit/src/init.c
===================================================================
--- sysvinit/src/init.c (revisjon 808)
+++ sysvinit/src/init.c (arbeidskopi)
@@ -89,7 +89,7 @@
CHILD *newFamily = NULL; /* The list after inittab re-read */
CHILD ch_emerg = { /* Emergency shell */
- 0, 0, 0, 0, 0,
+ WAITING, 0, 0, 0, 0,
"~~",
"S",
3,
Index: sysvinit/src/sulogin.c
===================================================================
--- sysvinit/src/sulogin.c (revisjon 808)
+++ sysvinit/src/sulogin.c (arbeidskopi)
@@ -23,6 +23,7 @@
#include <pwd.h>
#include <shadow.h>
#include <termios.h>
+#include <errno.h>
#include <sys/ioctl.h>
#if defined(__GLIBC__)
# include <crypt.h>
@@ -410,7 +411,6 @@
if (pid != getsid(0)) {
if (pid == getpgid(0))
setpgid(0, getpgid(getppid()));
- setsid();
}
signal(SIGHUP, SIG_IGN);
@@ -421,13 +421,15 @@
close(2);
close(fd);
fd = open(tty, O_RDWR);
- ioctl(0, TIOCSCTTY, (char *)1);
dup(fd);
dup(fd);
} else
close(fd);
}
}
+ setsid();
+ if (ioctl(0, TIOCSCTTY, (char *)1))
+ perror("ioctl(TIOCSCTTY)");
/*
* Get the root password.