Simple implementation of postscripts, put in postscripts table and /install/winpostscripts
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16237 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e1a21649ff
commit
2bbce57260
@ -220,6 +220,7 @@ sub subvars {
|
||||
$inc =~ s/#WINPRODKEY:([^#]+)#/get_win_prodkey($1)/eg;
|
||||
$inc =~ s/#WINNETCFG#/windows_net_cfg()/eg;
|
||||
$inc =~ s/#WINADJOIN#/windows_join_data()/eg;
|
||||
$inc =~ s/#WINPOSTSCRIPTS#/windows_postscripts()/eg;
|
||||
$inc =~ s/#WINDNSCFG#/windows_dns_cfg()/eg;
|
||||
$inc =~ s/#WINACCOUNTDATA#/windows_account_data()/eg;
|
||||
$inc =~ s/#WINDISABLENULLADMIN#/windows_disable_null_admin()/eg;
|
||||
@ -394,6 +395,24 @@ sub windows_dns_cfg {
|
||||
$componentxml .= "</DNSServerSearchOrder>\r\n</Interface>\r\n</Interfaces>\r\n</component>\r\n";
|
||||
return $componentxml;
|
||||
}
|
||||
#this will lay out the data from postscripts table in a manner that is appropriate for windows consumption in Microsoft-Windows-Deployment
|
||||
#component under specialize pass
|
||||
sub windows_postscripts {
|
||||
my $posttab = xCAT::Table->new('postscripts',-create=>0);
|
||||
unless ($posttab) { return ""; }
|
||||
my $psent = $posttab->getNodeAttribs($node,['postscripts'],prefetchcache=>1);
|
||||
unless ($psent and $psent->{postscripts}) { return ""; }
|
||||
my @cmds = split /,/,$psent->{postscripts};
|
||||
my $order = 1;
|
||||
my $xml;
|
||||
my $pscript;
|
||||
foreach $pscripts (@cmds) {
|
||||
unless ($pscript =~ /\\/) {
|
||||
$pscript = "C:\\xcatpost\\".$pscript;
|
||||
}
|
||||
$xml .= "<RunSynchronousCommand wcm:action=\"add\">\r\n<Order>$order</Order>\r\n<Path>$pscript</Path>\r\n</RunSynchronousCommand>\r\n";
|
||||
}
|
||||
}
|
||||
#this will examine table data, decide *if* a Microsoft-Windows-UnattendedJoin is warranted
|
||||
#there are two variants in how to proceed:
|
||||
#-Hide domain administrator from node: xCAT will use MACHINEPASSWORD to do joining to AD. Currently requires SSL be enabled on DC. Samba 4 TODO
|
||||
|
@ -461,6 +461,12 @@ sub mkinstall
|
||||
print $shandle 'reg copy HKLM\system\CurrentControlSet\services\TCPIP6\parameters HKLM\csystem\ControlSet001\services\TCPIP6\parameters /f'."\r\n";
|
||||
print $shandle 'reg copy HKLM\system\CurrentControlSet\services\TCPIP6\parameters HKLM\csystem\ControlSet002\services\TCPIP6\parameters /f'."\r\n";
|
||||
print $shandle 'reg unload HKLM\csystem'."\r\n";
|
||||
print $shandle "If EXIST %instdrv%\\winpostscripts GOTO wps\r\n";
|
||||
print $shandle "goto up\r\n";
|
||||
print $shandle ":wps\r\n";
|
||||
print $shandle "mkdir c:\\xcatpost\r\n";
|
||||
print $shandle "xcopy %instdrv%\\winpostscripts c:\\xcatpost\r\n";
|
||||
print $shandle ":up\r\n";
|
||||
print $shandle "If EXIST X:\\Windows\\system32\\WindowsPowerShell GOTO PSH\r\n";
|
||||
print $shandle "IF %PROCESSOR_ARCHITECTURE%==AMD64 GOTO x64\r\n";
|
||||
print $shandle "IF %PROCESSOR_ARCHITECTURE%==x64 GOTO x64\r\n";
|
||||
|
Loading…
Reference in New Issue
Block a user