summaryrefslogtreecommitdiffstats
path: root/loader/init.c
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-01 21:59:29 +0000
committerjakub <jakub>1999-10-01 21:59:29 +0000
commit24f16c3eb103460f877a370e71d6e45205dbe18b (patch)
tree2b4cabdb557682b4e032415a9134161aafb4af71 /loader/init.c
parent3a72e67914531ee552124e9aa5ccf9c65a6d84dd (diff)
downloadanaconda-24f16c3eb103460f877a370e71d6e45205dbe18b.tar.gz
anaconda-24f16c3eb103460f877a370e71d6e45205dbe18b.tar.xz
anaconda-24f16c3eb103460f877a370e71d6e45205dbe18b.zip
Don't give up early when on serial console.
Diffstat (limited to 'loader/init.c')
-rw-r--r--loader/init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/loader/init.c b/loader/init.c
index 91e09c2c1..96d3da323 100644
--- a/loader/init.c
+++ b/loader/init.c
@@ -454,6 +454,12 @@ int main(void) {
}
printf("done\n");
#endif
+
+ if (!isSerial) {
+ char twelve = 12;
+ if (ioctl (0, TIOCLINUX, &twelve) < 0)
+ isSerial = 1;
+ }
if (isSerial) {
printf("Red Hat install init version %s using a serial console\n",
@@ -462,9 +468,9 @@ int main(void) {
printf("remember, cereal is an important part of a nutritionally "
"balanced breakfast.\n\n");
- fd = open("/dev/ttyS0", O_RDWR, 0);
+ fd = open("/dev/console", O_RDWR, 0);
if (fd < 0) {
- printf("failed to open /dev/ttyS0");
+ printf("failed to open /dev/console");
fatal_error(1);
}