Skip to content

Commit

Permalink
moved https repo conversion to post FAI requisites, removed repos fro…
Browse files Browse the repository at this point in the history
…m FAI postrequisites
  • Loading branch information
tuxedo-bot committed Sep 12, 2022
1 parent 6972ac1 commit 89bd17c
Showing 1 changed file with 41 additions and 32 deletions.
73 changes: 41 additions & 32 deletions src/tuxedo-tomte
Original file line number Diff line number Diff line change
Expand Up @@ -2211,8 +2211,15 @@ sub prerequisitesFAI {
}

sub postrequisitesFAI {
reconfigureSingleModule('tuxedo-repos');
reconfigureSingleModule('tuxedo-mirrors');
if (httpToHttps(\%tuxedo_repos)) {
printLog('TUXEDO debian repos set to https', 'L0');
}
if (httpToHttps(\%tuxedo_mirrors)) {
printLog('mirror repos set to https', 'L0');
}
# assuming the repos from FAI are all correct
#reconfigureSingleModule('tuxedo-repos');
#reconfigureSingleModule('tuxedo-mirrors');
my $output = `apt-get update`;
printLog("return from apt-get update: $output", 'T2');
}
Expand Down Expand Up @@ -3025,21 +3032,22 @@ sub tuxedorepos() {

# if this is a FAI-installation all repos should be already set correctly
# only http has to be replaced by https in postrequisitesFAI
if ($FAI) {
if (httpToHttps(\%tuxedo_repos) >= 1) {
$origConfModules{$module}{installed} = "yes";
$origConfModules{$module}{upgraded} = "yes";
addToConfiguredModules($module, "success");
printLog('tuxedo repos set to https', 'L0');
return (1);
} else {
$origConfModules{$module}{installed} = "no";
$origConfModules{$module}{upgraded} = "no";
addToConfiguredModules($module, "failed");
printLog('tuxedo repos could not be set to https', 'L0');
return (0);
}
}
# TODO remove
# if ($FAI) {
# if (httpToHttps(\%tuxedo_repos) >= 1) {
# $origConfModules{$module}{installed} = "yes";
# $origConfModules{$module}{upgraded} = "yes";
# addToConfiguredModules($module, "success");
# printLog('tuxedo repos set to https', 'L0');
# return (1);
# } else {
# $origConfModules{$module}{installed} = "no";
# $origConfModules{$module}{upgraded} = "no";
# addToConfiguredModules($module, "failed");
# printLog('tuxedo repos could not be set to https', 'L0');
# return (0);
# }
# }

if ($action eq 'install') {
printLog("applying $origConfModules{$module}{name}", 'L1');
Expand Down Expand Up @@ -3143,21 +3151,22 @@ sub tuxedomirrors() {

# if this is a FAI-installation all repos should be already set correctly
# only http has to be replaced by https
if ($FAI) {
if (httpToHttps(\%tuxedo_mirrors)) {
$origConfModules{$module}{installed} = "yes";
$origConfModules{$module}{upgraded} = "yes";
addToConfiguredModules($module, "success");
printLog('mirror repos set to https', 'L0');
return (1);
} else {
$origConfModules{$module}{installed} = "no";
$origConfModules{$module}{upgraded} = "no";
addToConfiguredModules($module, "failed");
printLog('mirror repos could not be set to https', 'L0');
return (0);
}
}
# TODO remove
# if ($FAI) {
# if (httpToHttps(\%tuxedo_mirrors)) {
# $origConfModules{$module}{installed} = "yes";
# $origConfModules{$module}{upgraded} = "yes";
# addToConfiguredModules($module, "success");
# printLog('mirror repos set to https', 'L0');
# return (1);
# } else {
# $origConfModules{$module}{installed} = "no";
# $origConfModules{$module}{upgraded} = "no";
# addToConfiguredModules($module, "failed");
# printLog('mirror repos could not be set to https', 'L0');
# return (0);
# }
# }


if ($action eq 'install') {
Expand Down

0 comments on commit 89bd17c

Please sign in to comment.