Browse Source

This is what is wanted, but ars is still necessary.

master
freesource 23 years ago
parent
commit
e366990b5e
  1. 23
      BootRoot/BootRoot.pm

23
BootRoot/BootRoot.pm

@ -23,7 +23,6 @@
## ##
############################################################################## ##############################################################################
package BootRoot::BootRoot; package BootRoot::BootRoot;
use vars qw(@ISA @EXPORT %EXPORT_TAGS); use vars qw(@ISA @EXPORT %EXPORT_TAGS);
use Exporter; use Exporter;
@ -38,17 +37,12 @@ use File::Basename;
use File::Find; use File::Find;
use File::Path; use File::Path;
# If you want gBootRoot to do it's stuff somewhere else, change the # If you want gBootRoot to do it's stuff somewhere else, change the
# value for $tmp1. # value for $tmp1.
my $tmp1 = "/tmp"; # tmp should be default - Cristian my $tmp1 = "/tmp"; # tmp should be default - Cristian
my $lilo_conf = "/etc/lilo.conf"; my $lilo_conf = "/etc/lilo.conf";
my $home = "$ENV{HOME}/.gbootroot"; my $home = "$ENV{HOME}/.gbootroot";
my $uml_xterm = "xterm -e"; my $uml_xterm = "xterm -e";
$main::editor = "emacs --font 6x13";
$main::makefs = "mke2fs -F -m0 -i8192"; # Root Disk
$main::sudo = "sudo";
# Don't edit from here, but you can if you want to change the HERE docs # Don't edit from here, but you can if you want to change the HERE docs
# and/or the contents of initrd (in which case you need to make sure the # and/or the contents of initrd (in which case you need to make sure the
@ -64,15 +58,12 @@ my $pwd = `pwd`; chomp $pwd;
my $home_rootfs = "$home/root_filesystem/"; my $home_rootfs = "$home/root_filesystem/";
my $home_uml_kernel = "$home/uml_kernel/"; my $home_uml_kernel = "$home/uml_kernel/";
my $modules_directory = "/lib/modules"; my $modules_directory = "/lib/modules";
if ( $> != 0 && -e "/usr/lib/bootroot/genext2fs" ) {
$main::makefs = "genext2fs -z -r0"; # -i8192 not a good idea
}
# This is for experimental stuff .. basically so I can test # This is for experimental stuff .. basically so I can test
# the boot fs as a normal user, since it's hard to create a boot disk # the boot fs as a normal user, since it's hard to create a boot disk
# with enough room using genext2fs. # with enough room using genext2fs.
my $busybox; my $busybox;
# Yard Stuff # Yard Stuff
my $home_yard = "$home/yard"; my $home_yard = "$home/yard";
my $template_dir = "$home_yard/templates/"; my $template_dir = "$home_yard/templates/";
@ -85,7 +76,6 @@ my $global_yard_replacements_arch_dep = "/usr/lib/bootroot/yard/Replacements";
my $global_yard_templates = "/usr/share/gbootroot/yard/templates"; my $global_yard_templates = "/usr/share/gbootroot/yard/templates";
$ENV{'PATH'} = "$home_yard:" . $ENV{'PATH'}; $ENV{'PATH'} = "$home_yard:" . $ENV{'PATH'};
my $initrd; my $initrd;
my $compress; my $compress;
my $false = 0; my $false = 0;
@ -265,6 +255,12 @@ BEGIN {
sub start { sub start {
if ( $> != 0 && -e "/usr/lib/bootroot/genext2fs" ) {
$main::makefs = "genext2fs -z -r0"; # -i8192 not a good idea
}
$SIG{INT} = \&signal; $SIG{INT} = \&signal;
$SIG{ABRT} = \&signal; $SIG{ABRT} = \&signal;
$SIG{TERM} = \&signal; $SIG{TERM} = \&signal;
@ -311,7 +307,7 @@ else {
# auto defaults,noauto,user,loop 0 0 # auto defaults,noauto,user,loop 0 0
# #
# For the boot/root disks the administrator will have to give the user # For the boot/root disks the administrator will have to give the user
# special su privileges (mknod) to make special devices. The $main::sudo # special su privileges (mknod) to make special devices. The $sudo
# variable can be set to sudo or super, fakeroot won't work. # variable can be set to sudo or super, fakeroot won't work.
# These include: /dev/{console,null,ram0,ram1,tty0} # These include: /dev/{console,null,ram0,ram1,tty0}
# These two lines need to be added to create the boot_fs and the boot/root # These two lines need to be added to create the boot_fs and the boot/root
@ -1095,10 +1091,12 @@ sub advanced_root_section {
$filesystem_size = 4096 if !$filesystem_size; $filesystem_size = 4096 if !$filesystem_size;
$ars->{filesystem_size} = $filesystem_size; $ars->{filesystem_size} = $filesystem_size;
ars($ars); ars($ars);
filesystem_size();
$adj3->signal_connect( "value_changed", sub { $adj3->signal_connect( "value_changed", sub {
$filesystem_size = $spinner_size->get_value_as_int(); $filesystem_size = $spinner_size->get_value_as_int();
$ars->{filesystem_size} = $filesystem_size; $ars->{filesystem_size} = $filesystem_size;
ars($ars); ars($ars);
filesystem_size();
}); });
$spinner_size->set_value($filesystem_size) if $filesystem_size; $spinner_size->set_value($filesystem_size) if $filesystem_size;
@ -1106,7 +1104,6 @@ sub advanced_root_section {
# Compression # Compression
# gBootRoot methods # gBootRoot methods
my $hbox_between = Gtk::HBox->new(0,1); my $hbox_between = Gtk::HBox->new(0,1);
$table_advanced_root->attach($hbox_between,0,3,4,5, $table_advanced_root->attach($hbox_between,0,3,4,5,
['fill'], ['fill'],

Loading…
Cancel
Save