From 6d452dbcd4bcfafa2c91dcd07680406557fc1c21 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 16 May 2013 14:14:59 +0000 Subject: [PATCH] remove writescript git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16325 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 62 ---------------------------- 1 file changed, 62 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 5c6e954a7..4e2a56a86 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -31,69 +31,7 @@ This program module file is a set of utilities to support xCAT post scripts. =cut -#------------------------------------------------------------------------------- - #---------------------------------------------------------------------------- - -=head3 writescript - - Create a node-specific post script for an xCAT node - - Arguments: - Returns: - Globals: - Error: - Example: - - xCAT::Postage->writescript($node, "/install/postscripts/" . $node, $state,$callback); - - Comments: - -=cut - -#----------------------------------------------------------------------------- - -sub writescript -{ - if (scalar(@_) eq 5) { shift; } #Discard self - my $node = shift; - my $scriptfile = shift; - my $nodesetstate = shift; # install or netboot - my $callback = shift; - my $rsp; - my $requires; - my $script; - open($script, ">", $scriptfile); - - unless ($scriptfile) - { - my %rsp; - push @{$rsp->{data}}, "Could not open $scriptfile for writing.\n"; - xCAT::MsgUtils->message("E", $rsp, $callback); - return 1; - } - - #Some common variables... - my @scriptcontents = makescript($node, $nodesetstate, $callback); - if (!defined(@scriptcontents)) - { - my %rsp; - push @{$rsp->{data}}, - "Could not create node post script file for node \'$node\'.\n"; - xCAT::MsgUtils->message("E", $rsp, $callback); - return 1; - } - else - { - foreach (@scriptcontents) - { - print $script $_; - } - } - close($script); - chmod 0755, $scriptfile; -} - #---------------------------------------------------------------------------- =head3 create_mypostscript_or_not