From c970e359b39a2fea47c7dfc956ac09220f187c7a Mon Sep 17 00:00:00 2001
From: John Hodge <tpg@mutabah.net>
Date: Wed, 12 Oct 2011 11:26:56 +0800
Subject: [PATCH] Modules/InitRD - Fixed dependencies in InitRD script

---
 Modules/Filesystems/InitRD/GenerateInitRD.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Modules/Filesystems/InitRD/GenerateInitRD.php b/Modules/Filesystems/InitRD/GenerateInitRD.php
index 4632cc01..a7152cc0 100644
--- a/Modules/Filesystems/InitRD/GenerateInitRD.php
+++ b/Modules/Filesystems/InitRD/GenerateInitRD.php
@@ -46,7 +46,6 @@ foreach($lines as $line)
 	if(preg_match('/^File\s+"([^"]+)"\s+"([^"]+)"$/', $line, $matches))
 	{
 		$lStack[$lDepth][1][] = array($matches[1], $matches[2]);
-		$gDependencies[] = $matches[2];
 		continue;
 	}
 	echo "ERROR: $line\n";
@@ -68,7 +67,7 @@ function hd8($fp)
 
 function ProcessFolder($prefix, $items)
 {
-	global	$gOutput;
+	global	$gOutput, $gDependencies;
 	global	$ACESSDIR, $ARCH;
 	foreach($items as $i=>$item)
 	{
@@ -107,6 +106,8 @@ EOF;
 			$path = str_replace("__FS__", "$ACESSDIR/Usermode/Filesystem", $path);
 			echo $path,"\n";
 			// ---
+			
+			$gDependencies[] = $path;
 
 			if(!file_exists($path)) {
 				echo "ERROR: '{$path}' does not exist\n", 
-- 
GitLab