From 7886ea01f10a7b8d36a830e2f2c2c79ebf18cf2f Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 1 Nov 2001 08:44:07 +0000 Subject: [PATCH] The beginnings of a regexp for building the device table. --- BootRoot/Yard.pm | 61 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 2c6e450..fd839da 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -159,6 +159,9 @@ sub read_contents_file { } $contents_file_tmp = $contents_file; + # Need to know whether genext2fs is being used + my $fs_type = (split(/\s/,$main::makefs))[0]; + info(0, "\n\nPASS 1: Reading $contents_file"); info(0, "\n"); @@ -179,6 +182,58 @@ sub read_contents_file { $line =~ s/^\s+//; # Delete leading/trailing whitespace $line =~ s/\s+$//; + # If genext2fs is being used we want to grab the values for + # devices and process them individually, globbing if necessary, + # and appending the changes to the device table. --freesource + + if ( $fs_type eq "genext2fs" ) { + + # If a device is found on the same line with a non-device(s) + # the non-device(s) is sent on its merry way. + if ( $line =~ m, + + (?/) { ##### EXPLICIT LINK if ($line =~ /[\*\?\[]/) { cf_warn($line, "Can't use wildcards in link specification!"); @@ -1601,8 +1656,9 @@ sub test_glob { } } -##### Check glob() -- In some Perl versions it's reported not to work. +##### Check glob() -- In some Perl versions it's reported not to work. sub yard_glob { + my($expr) = @_; ## first part HISTORY @@ -1614,7 +1670,8 @@ sub yard_glob { } else { glob($expr); } -} + +} # end yard_glob sub mount_device {