diff --git a/expect_uml b/expect_uml index c1407d6..d354434 100755 --- a/expect_uml +++ b/expect_uml @@ -23,15 +23,6 @@ ## ############################################################################## -use BootRoot::UML; -use File::Basename; - -if ( !$ARGV[0] ) { - - die "expect_uml ubd0 ubd1 other-options mount-point preserve_ownership filesystem_command\n"; - -} - BEGIN { @@ -54,6 +45,16 @@ BEGIN { } + +use BootRoot::UML; +use File::Basename; + +if ( !$ARGV[0] ) { + + die "expect_uml ubd0 ubd1 other-options mount-point preserve_ownership filesystem_command\n"; + +} + my $arguments = "$ARGV[0] $ARGV[1] $ARGV[2]"; my $mount_point = "$ARGV[3]"; my $preserve_ownership = "$ARGV[4]"; diff --git a/yard_chrooted_tests b/yard_chrooted_tests index 5680bdb..460f3eb 100755 --- a/yard_chrooted_tests +++ b/yard_chrooted_tests @@ -30,6 +30,28 @@ ## ############################################################################## +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'}; + } + +} + + use strict; use BootRoot::Yard; use File::Path;