Makes a more effecient root_fs_helper by not making logon mandatory,

and using uml_mconsole halt for a quick halt rather than shutdown -h
now.
This commit is contained in:
freesource
2003-02-18 18:14:43 +00:00
parent 584ff4c566
commit 806baff56e
5 changed files with 46 additions and 4 deletions
+12 -2
View File
@@ -7,6 +7,9 @@
# Changes:
# 12/15/2001 Changed UML to BootRoot::UML
# Can now set password to "" to allow no password.
#
# 02/18/2003 Now login isn't mandatory which allows login-free
# inits like /bin/bash.
package BootRoot::UML;
@@ -76,8 +79,11 @@ sub boot {
$log = $me->open_log($log_file);
$me->{expect_handle}->log_stdout(0);
}
$me->{expect_handle}->expect(undef, "$me->{login_prompt}");
$me->{expect_handle}->print("$me->{login}\n");
if ( $me->{login_prompt} ne "" ) {
$me->{expect_handle}->expect(undef, "$me->{login_prompt}");
$me->{expect_handle}->print("$me->{login}\n");
}
# It's o.k. not to have a password .. password_prompt will be ignored.
# --freesource
@@ -86,7 +92,11 @@ sub boot {
$me->{expect_handle}->print("$me->{password}\n");
}
$me->{expect_handle}->expect(undef, "-re", "$me->{prompt}");
$me->{expect_handle}->print("echo Let's make you're root_fs!\r");
$me->{expect_handle}->print("\r");
return($log);
}
+3 -2
View File
@@ -1925,10 +1925,11 @@ sub create_expect_uml {
if ( !$option{template} ) {
$options = "root=/dev/ubd0 " . "mode=" .
BootRoot::BootRoot::skas_or_tt() . " " .
$option{"uml-options"};
$option{"uml-options"} . " umid=root_fs_helper init=/bin/bash";
}
else {
$options = "root=/dev/ubd0 " . $option{"uml-options"};
$options = "root=/dev/ubd0 " . $option{"uml-options"} .
" umid=root_fs_helper init=/bin/bash";
}
my $filesystem;
if ( $fs_type eq "genext2fs" ) {