From 5942dfdc99b42939238ea52a196a32c5dd70e187 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 Jun 2016 03:08:00 -0400 Subject: [PATCH] Check if the postscript is only for diskless --- xCAT-server/lib/xcat/plugins/kit.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index d9f32a853..81525eaef 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -436,6 +436,13 @@ sub assign_to_osimage } if ( $osimagetable->{provmethod} =~ /install/ ) { + # If the script is only for diskless node + my $cmd = "grep \"#FLAG FOR DISKLESS ONLY#\" $installdir/postscripts/$kitcompscript"; + my $res = xCAT::Utils->runcmd($cmd, -1); + if ($res eq "#FLAG FOR DISKLESS ONLY#"){ + next; + } + # for diskfull node my $match = 0; my @scripts = split ',', $osimagetable->{postbootscripts};