diff options
-rw-r--r-- | perl-install/install_any.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index dc2122c08..2d6a6f482 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -201,8 +201,6 @@ sub getNextStep() { sub spawnShell() { return if $::o->{localInstall} || $::testing; - -x "/bin/sh" or die "cannot open shell - /bin/sh doesn't exist"; - fork() and return; $ENV{DISPLAY} ||= ":0"; #- why not :pp @@ -221,8 +219,12 @@ sub spawnShell() { ioctl(STDIN, c::TIOCSCTTY(), 0) or warn "could not set new controlling tty: $!"; - my $busybox = "/usr/bin/busybox"; - exec { -e $busybox ? $busybox : "/bin/sh" } "/bin/sh" or log::l("exec of /bin/sh failed: $!"); + my @args; -e '/etc/bashrc' and @args = qw(--rcfile /etc/bashrc); + foreach (qw(/bin/bash /usr/bin/busybox /bin/sh)) { + -x $_ or next; + exec { $_ } $_ =~ /busybox/ ? "/bin/sh" : $_, @args or log::l("exec of $_ failed: $!"); + } + die "cannot open shell"; } sub getAvailableSpace { |