diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-09 19:32:55 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-09 19:32:55 +0000 |
commit | 20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42 (patch) | |
tree | 15a9b7b2cbf27b772aae036d252611a5b6cd2078 | |
parent | a2a42e0c5efb522f34685ea5fe64f3aa9a39449c (diff) | |
download | drakx-backup-do-not-use-20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42.tar drakx-backup-do-not-use-20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42.tar.gz drakx-backup-do-not-use-20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42.tar.bz2 drakx-backup-do-not-use-20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42.tar.xz drakx-backup-do-not-use-20ec59e5e3d8e532bf22cfa7d696a6ceef9ecc42.zip |
first try with /bin/bash which is available in move. specify --rcfile or else it'll try /.bashrc which doesn't exist, and miss good definitions from /etc/bashrc (aliases, home/end keys, etc)
-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 { |