From 927575ef4b945d27a263ff2787e6a97e1eb58723 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 2 Jun 2008 15:41:50 +0000 Subject: [PATCH] -Have genimage pre-emptively mkpath on every destination directory before attempting copy git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1547 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/netboot/rh/genimage | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server-2.0/share/xcat/netboot/rh/genimage b/xCAT-server-2.0/share/xcat/netboot/rh/genimage index cacac68ff..a3f199285 100755 --- a/xCAT-server-2.0/share/xcat/netboot/rh/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/rh/genimage @@ -378,6 +378,7 @@ EOMS if (-f "$pathtofiles/".$_->[0]) { $srcpath="$pathtofiles/".$_->[0]; } + mkpath(dirname("/tmp/xcatinitrd.$$/".$_->[1])); copy($srcpath,"/tmp/xcatinitrd.$$/".$_->[1]); chmod 0755,"/tmp/xcatinitrd.$$/".$_->[1]; } else { @@ -385,6 +386,7 @@ EOMS if (-f "$pathtofiles/$_") { $srcpatch = "$pathtofiles/$_"; } + mkpath(dirname("/tmp/xcatinitrd.$$/$_")); copy("$srcpath","/tmp/xcatinitrd.$$/$_"); chmod 0755,"/tmp/xcatinitrd.$$/".$_; }