Browse Source

This remembers uml options which is a nice thing.

master
freesource 24 years ago
parent
commit
aac58339db
  1. 39
      gBootRoot

39
gBootRoot

@ -246,6 +246,12 @@ home_builder($home_rootfs);
# $HOME/.gbootroot/uml_kernel # $HOME/.gbootroot/uml_kernel
home_builder($home_uml_kernel); home_builder($home_uml_kernel);
if (!-e "$home_uml_kernel/.options") {
open(OPTIONS,">$home_uml_kernel/.options")
or die "Couldn't write $home_uml_kernel/.options at $?\n";
print OPTIONS "root=/dev/ubd0\n";
close(OPTIONS);
}
sub home_builder { sub home_builder {
@ -1048,8 +1054,30 @@ sub uml_box {
#_______________________________________ #_______________________________________
# UML options # UML options
label_advanced("Options:",0,1,1,2,$table_uml); label_advanced("Options:",0,1,1,2,$table_uml);
$eab2 = entry_advanced(1,3,1,2,9,$table_uml); #$eab2 = entry_advanced(1,3,1,2,9,$table_uml);
$eab2->set_text("root=/dev/ubd0"); #$eab2->set_text("root=/dev/ubd0");
$eab2 = Gtk::Combo->new();
$table_uml->attach($eab2,1,3,1,2,
['expand','fill'],['fill','shrink'],0,0);
open(OPTIONS,"$home_uml_kernel/.options");
my @initial_options = <OPTIONS>;
close(OPTIONS); chomp @initial_options;
$eab2->entry->set_text($initial_options[0]);
$entry_advanced[9] = $eab2->entry->get_text();
$eab2->set_popdown_strings( @initial_options ) ;
$eab2->entry->signal_connect("changed", sub {
$entry_advanced[9] = $eab2->entry->get_text();
open(OPTIONS,">$home_uml_kernel/.options");
$entry_advanced[9] =~ s/\n/ /g;
print OPTIONS "$entry_advanced[9]\n";
foreach (@initial_options) {
if ($_ ne "$entry_advanced[9]") {
print OPTIONS "$_\n";
}
}
close(OPTIONS);
} );
$eab2->show();
#_______________________________________ #_______________________________________
# Root Filesystem defaults to generated one if found. # Root Filesystem defaults to generated one if found.
@ -1070,6 +1098,11 @@ sub uml_box {
# UML kernel = $entry_advanced[5] # UML kernel = $entry_advanced[5]
# xterm -e linux ubd#=root_fs # xterm -e linux ubd#=root_fs
# root=/dev/ubd# # root=/dev/ubd#
open(OPTIONS,"$home_uml_kernel/.options");
@initial_options = <OPTIONS>;
close(OPTIONS); chomp @initial_options;
$eab2->set_popdown_strings( @initial_options ) ;
my $pid; my $pid;
if ($entry_advanced[8] && if ($entry_advanced[8] &&
$entry_advanced[10]) { $entry_advanced[10]) {
@ -1100,6 +1133,7 @@ sub uml_box {
} }
waitpid($pid,0); waitpid($pid,0);
} }
else { else {
if (!$entry_advanced[8]) { if (!$entry_advanced[8]) {
@ -1116,6 +1150,7 @@ sub uml_box {
} }
} }
} ); } );

Loading…
Cancel
Save