1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-03-12 07:43:22 -04:00

It was a very simple problem afterall, again BEGIN statements the

causation because expect_uml was looking in the normal places rather
than . when testing under rh8.  The stock agetty works.  Ready to go.
This commit is contained in:
freesource 2003-02-24 05:14:48 +00:00
parent 41e126df67
commit 73ce6f1b5f
3 changed files with 24 additions and 4 deletions

View File

@ -30,6 +30,7 @@ BEGIN {
if ($fhs == 0) { if ($fhs == 0) {
unshift(@INC,"/usr/share/perl5"); unshift(@INC,"/usr/share/perl5");
unshift(@INC,"."); # better make sure we mean . when we mean .
} }
@ -43,8 +44,20 @@ BEGIN {
$ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'};
} }
}
my $pwd = `pwd`; chomp $pwd;
my $tools = grep(/$pwd\/user-mode-linux\/usr\/bin/,$ENV{'PATH'});
if ($tools == 0) {
$ENV{'PATH'} = "$pwd/user-mode-linux/usr/bin:" . $ENV{'PATH'};
}
$tools = grep(/$pwd\/user-mode-linux\/usr\/lib\/uml/,$ENV{'PATH'});
if ($tools == 0) {
$ENV{'PATH'} = "$pwd/user-mode-linux/usr/lib\/uml:" . $ENV{'PATH'};
}
}
use BootRoot::UML; use BootRoot::UML;
use File::Basename; use File::Basename;
@ -91,7 +104,7 @@ my $uml =
login => "root", login => "root",
password_prompt => "Password: ", password_prompt => "Password: ",
password => "", password => "",
prompt => "init-.*# ", prompt => ".*# ",
halt => "exit" halt => "exit"
); );
@ -171,7 +184,14 @@ elsif ( $filesystem =~ /^mkfs\.jffs/ ) {
$uml->command("umount /mnt1; umount /mnt2"); $uml->command("umount /mnt1; umount /mnt2");
# Fall through # Fall through
$uml->close_no_init(); my $close = $uml->close_no_init();
# Wait until the last line # Wait until the last line
system "uml_mconsole $umid halt"; if ( $close ) {
system "uml_mconsole $umid halt";
}
else {
print "ERROR: problem shutting down, contact freesource@users.sourceforge.net if problem persists\n";
}