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
+21
View File
@@ -56,6 +56,8 @@ if ( !$ARGV[0] ) {
}
my $arguments = "$ARGV[0] $ARGV[1] $ARGV[2]";
$ARGV[2] =~ /umid=([\w_]+)\s*/;
my $umid = $1;
my $mount_point = "$ARGV[3]";
my $preserve_ownership = "$ARGV[4]";
my $uml_kernel = "$ARGV[5]";
@@ -81,6 +83,9 @@ for ( 6 .. $#ARGV ) {
}
}
=pod
my $uml =
BootRoot::UML->new( login_prompt => "bootroot login: ",
kernel => $uml_kernel,
@@ -91,6 +96,19 @@ my $uml =
prompt => "bootroot:.*# ",
halt => "shutdown -h now"
);
=cut
my $uml =
BootRoot::UML->new( login_prompt => "",
kernel => $uml_kernel,
arguments => $arguments,
login => "root",
password_prompt => "Password: ",
password => "",
prompt => ".*# ",
halt => "shutdown -h now"
);
$uml->boot();
# Make the GID/UID 0 FS
@@ -155,4 +173,7 @@ elsif ( $filesystem =~ /^mkfs\.jffs/ ) {
}
$uml->command("umount /mnt1; umount /mnt2");
# The fast way
system "uml_mconsole $umid halt";
# Fall through
$uml->halt()