diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index e958f80..a49bba8 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -47,7 +47,9 @@ $SIG{__WARN__} = # value for $tmp1. my $tmp1 = "/tmp"; # tmp should be default - Cristian my $lilo_conf = "/etc/lilo.conf"; -my $home = "$ENV{HOME}/.gbootroot"; +my $pwd = `pwd`; chomp $pwd; +my $home; +$option{home} ? ($home = $pwd) : ($home = "$ENV{HOME}/.gbootroot"); my $uml_xterm = "xterm -e"; # Don't edit from here, but you can if you want to change the HERE docs @@ -64,7 +66,6 @@ my $uml_xterm = "xterm -e"; my $version = "1.3.6"; my $date = "03.10.2002"; my $gtk_perl_version = "0.7002"; -my $pwd = `pwd`; chomp $pwd; my $home_rootfs = "$home/root_filesystem/"; my $home_uml_kernel = "$home/uml_kernel/"; my $modules_directory = "/lib/modules"; @@ -863,7 +864,6 @@ if ( $option{"preserve-ownership"} ) { } - $ars->{uml_exclusively} = $uml_exclusively; ars2($ars); #not used in function below $ars->{preserve_ownership} = $uml_exclusively; diff --git a/BootRoot/Options.pm b/BootRoot/Options.pm index 555f3cd..1b4f625 100644 --- a/BootRoot/Options.pm +++ b/BootRoot/Options.pm @@ -46,8 +46,15 @@ sub option { "preserve-ownership=s", "kernel=s", "kernel-version=s", - "no-stdout" - + "no-stdout", + + # hidden options for package making or for people who + # read the source Luke. Path's relative to `pwd`. + "home=s", # path relative to `pwd` usually "." + "root-fs-helper-location=s", # full path or rel path + # in Yard $ubd0 + "expect-program=s" # i.e. ./expect_uml + ); } diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 8145489..57bc421 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -1,4 +1,4 @@ -############################################################################ +########################################################################### ## ## Yard.pm combining ## MAKE_ROOT_FS, CHECK_ROOT_FS, and YARD_UTILS.PL by Tom Fawcett @@ -1514,10 +1514,16 @@ sub create_expect_uml { } - my $expect_program = "/usr/lib/bootroot/expect_uml"; + + my $expect_program; + $option{"expect-program"} ? + ($expect_program = $option{"expect-program"}) : + ($expect_program = "/usr/lib/bootroot/expect_uml"); my $version = "2.4"; - my $ubd0 = - "ubd0=/usr/lib/bootroot/root_filesystem/root_fs_helper"; + my $ubd0; + $option{"root-fs-helper-location"} ? + ($ubd0 = "ubd0=" . $option{"root-fs-helper-location"}) : + ($ubd0 = "ubd0=/usr/lib/bootroot/root_filesystem/root_fs_helper"); my $ubd1 = "ubd1=$device"; my $options = "root=/dev/ubd0"; # need to keep this 1 my $filesystem;