From d813ad115d93ce341f4385b5609ca2958a08a87e Mon Sep 17 00:00:00 2001 From: freesource Date: Sun, 6 Jan 2002 06:28:28 +0000 Subject: [PATCH] This should fix the bug reported by Liav Asseraf. The main program was rearragned and put in BootRoot, but the BEGIN block which sets up the FHS for perl's INC was now in this file, so ofcourse, gbootroot couldn't find the modules. --- BootRoot/BootRoot.pm | 23 ----------------------- gbootroot | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index 1f8ffd7..c5dccce 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -231,29 +231,6 @@ my $ars = {}; # anonymous hash " X X " ); - -# For distributions that don't adhere to the most recent FHS. -BEGIN { - - my $fhs = grep(/\/usr\/share\/perl5/,@INC); - - if ($fhs == 0) { - unshift(@INC,"/usr/share/perl5"); - } - - - my $sbin = grep(/\/sbin/,$ENV{'PATH'}); - if ($sbin == 0) { - $ENV{'PATH'} = "/sbin:" . $ENV{'PATH'}; - } - - $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'}); - if ($sbin == 0) { - $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; - } - -} - sub start { diff --git a/gbootroot b/gbootroot index bb502b8..1cf1e8a 100755 --- a/gbootroot +++ b/gbootroot @@ -205,6 +205,28 @@ use BootRoot::BootRoot; init Gtk; set_locale Gtk; +# For distributions that don't adhere to the most recent FHS. +BEGIN { + + my $fhs = grep(/\/usr\/share\/perl5/,@INC); + + if ($fhs == 0) { + unshift(@INC,"/usr/share/perl5"); + } + + + my $sbin = grep(/\/sbin/,$ENV{'PATH'}); + if ($sbin == 0) { + $ENV{'PATH'} = "/sbin:" . $ENV{'PATH'}; + } + + $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'}); + if ($sbin == 0) { + $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; + } + +} + $main::editor = "emacs --font 6x13"; $main::makefs = "mke2fs -F -m0 -i8192"; # Root Disk $main::sudo = "sudo";