From 11964eed4ffa75513bae8a5c4442e426350bb555 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 7 Mar 2013 21:00:39 +0000 Subject: [PATCH] Create otherpkgdir if it doesn't exist on management node or service node git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15416 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kit.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 0b44df680..30a559582 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -480,6 +480,11 @@ sub assign_to_osimage my $otherpkgdir = $linuximagetable->{otherpkgdir}; my $kitrepodir = $kitrepotable->{kitrepodir}; + # Create otherpkgdir if it doesn't exist + unless ( -d "$otherpkgdir" ) { + mkpath("$otherpkgdir"); + } + # Create symlink if doesn't exist unless ( -d "$otherpkgdir/$kitcomptable->{kitreponame}" ) { system("ln -sf $kitrepodir $otherpkgdir/$kitcomptable->{kitreponame} ");