summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-31 16:06:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-31 16:06:05 +0000
commit044a25c662ce8d32dca7395dd1353b1c0b9346d7 (patch)
tree0aef383ed590afbe46f689021a6a287386f3332e /mdk-stage1
parent8de1c5b6aa62dcb4e69d4a7aed3786107ca2be4f (diff)
downloaddrakx-backup-do-not-use-044a25c662ce8d32dca7395dd1353b1c0b9346d7.tar
drakx-backup-do-not-use-044a25c662ce8d32dca7395dd1353b1c0b9346d7.tar.gz
drakx-backup-do-not-use-044a25c662ce8d32dca7395dd1353b1c0b9346d7.tar.bz2
drakx-backup-do-not-use-044a25c662ce8d32dca7395dd1353b1c0b9346d7.tar.xz
drakx-backup-do-not-use-044a25c662ce8d32dca7395dd1353b1c0b9346d7.zip
- have nothing talking about interactive when SPAWN_INTERACTIVE is unset
- same for SPAWN_SHELL
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/stage1.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 0146622a2..6176fe798 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -155,14 +155,13 @@ static void spawn_shell(void)
}
#endif
-
+#ifdef SPAWN_INTERACTIVE
char * interactive_fifo = "/tmp/stage1-fifo";
static pid_t interactive_pid = 0;
/* spawns my small interactive on console #6 */
static void spawn_interactive(void)
{
-#ifdef SPAWN_INTERACTIVE
int fd;
char * dev = "/dev/tty6";
@@ -211,8 +210,8 @@ static void spawn_interactive(void)
close(fd);
}
-#endif
}
+#endif
/************************************************************
@@ -583,6 +582,7 @@ void finish_preparing(void)
if (file_size(IS_RESCUE ? "/sbin/init" : "/etc/init") == -1)
stg1_fatal_message("Fatal error giving hand to second stage.");
+#ifdef SPAWN_SHELL
if (shell_pid != 0) {
int fd;
kill(shell_pid, 9);
@@ -590,6 +590,7 @@ void finish_preparing(void)
write(fd, "Killed\n", 7);
close(fd);
}
+#endif
}
int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)), char **env)
@@ -604,7 +605,9 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
mkdir(SLASH_LOCATION "/tmp", 0755);
}
+#ifdef SPAWN_INTERACTIVE
spawn_interactive();
+#endif
open_log();
log_message("welcome to the " DISTRIB_NAME " install (mdk-stage1, version " DISTRIB_VERSION " built " __DATE__ " " __TIME__")");
@@ -653,8 +656,10 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
log_perror("symlink from " IMAGE_LOCATION_REL "/" LIVE_LOCATION_REL " to " STAGE2_LOCATION " failed");
#endif
+#ifdef SPAWN_INTERACTIVE
if (interactive_pid != 0)
kill(interactive_pid, 9);
+#endif
finish_preparing();