[PATCH] PRELOAD file:/location fix

Chad Walstrom chad at ima.umn.edu
Thu Nov 15 23:36:24 CET 2001


Here's a patch to all for the use of the file:/ URI in the PRELOAD
directive.  It could be improved to recognize multiple "/" after
"file:", but it works as is, regardless of howmany "/" characters there
are.

-- 
Chad C. Walstrom <chad at ima.umn.edu>             http://www.ima.umn.edu
Assistant Systems Manager, IMA                  Phone: 612-624-4353
                                                Fax: 612-626-7370
-------------- next part --------------
--- /home/chad/checkout/fai-upstream/scripts/install_packages	Thu Nov 15 08:50:44 2001
+++ install_packages	Thu Nov 15 16:22:45 2001
@@ -57,7 +56,13 @@
 # get file, which must exist before installing packages
 foreach $entry (@preloadlist, at preloadrmlist) {
   my ($url, $directory) = @$entry;
-  execute("wget -nv -P$FAI_ROOT/$directory $url");
+  if ($url =~ /file:*/) {
+    my $file = $url;
+    $file =~ s/file:\///;
+    execute("cp $FAI_ROOT/$file $FAI_ROOT/$directory");
+  } else {
+    execute("wget -nv -P$FAI_ROOT/$directory $url");
+  }
 }


More information about the linux-fai mailing list