defect 3385 again - need separate subs for both real kitname and modified kitname

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15794 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mellor 2013-04-02 19:49:43 +00:00
parent feadffbc7b
commit 0cb19bfa2b
3 changed files with 18 additions and 16 deletions

View File

@ -2840,8 +2840,9 @@ sub edit_plugin
my $kitname = $::bldkit_config->{kit}{entries}[0]->{kitname};
# convert dashes to underscore since the kitname is used as perl pkg names
# in the plugin and this causes perl syntax errors
$kitname =~ s/\-/\_/g;
$kitname =~ s/\./\_/g;
my $mod_kitname = $kitname;
$mod_kitname =~ s/\-/\_/g;
$mod_kitname =~ s/\./\_/g;
# read in the file
my $PF;
@ -2854,6 +2855,7 @@ sub edit_plugin
for (@lines) {
s/<<<buildkit_WILL_INSERT_kitname_HERE>>>/$kitname/g;
s/<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>/$mod_kitname/g;
}
# Write the plugin back out

View File

@ -3,7 +3,7 @@
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
#package xCAT_plugin::imageprofile;
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
package xCAT_plugin::<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile;
use strict;
use warnings;
@ -128,14 +128,14 @@ sub handled_commands {
# kitimagepostdelete => 'imageprofile',
#};
return {
kitimagepregenerate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepostgenerate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimageprecopy => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepostcopy => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepreupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepostupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepredelete => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepostdelete => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
kitimagepregenerate => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepostgenerate => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimageprecopy => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepostcopy => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepreupdate => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepostupdate => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepredelete => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
kitimagepostdelete => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_imageprofile',
};
}

View File

@ -3,7 +3,7 @@
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
#package xCAT_plugin::nodemgmt;
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
package xCAT_plugin::<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_nodemgmt;
use strict;
use warnings;
@ -113,10 +113,10 @@ sub handled_commands {
# kitnoderefresh => 'nodemgmt',
#};
return {
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
kitnodeadd => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_nodemgmt',
kitnoderemove => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_nodemgmt',
kitnodeupdate => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_nodemgmt',
kitnoderefresh => '<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>_nodemgmt',
};
}