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/trunk@15795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8360cddd12
commit
ea3431f5a7
@ -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
|
||||
|
@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user