From 35e125c9162dea1e60b3f34f8f85923f2b90a2f0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 1 Jul 2005 03:46:46 +0000 Subject: don't spawn a new shell if it's already running (useful when using the no-reboot-restart-install blino trick) --- perl-install/install_any.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index c111d117c..31163a31d 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -313,8 +313,11 @@ sub start_i810fb() { sub spawnShell() { return if $::local_install || $::testing || dont_run_directly_stage2(); + my $shellpid_file = '/var/run/drakx_shell.pid'; + return if -e $shellpid_file && -d '/proc/' . chomp_(cat_($shellpid_file)); + if (my $shellpid = fork()) { - output('/var/run/drakx_shell.pid', $shellpid); + output($shellpid_file, $shellpid); return; } -- cgit v1.2.1