Skip to content

Commit

Permalink
Merge pull request #313 from gombasg/end_script_again
Browse files Browse the repository at this point in the history
aii-ks: end_script removal, try #2
  • Loading branch information
stdweird committed Nov 4, 2019
2 parents 8648413 + 4c7192e commit ac5eed9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion aii-ks/src/main/pan/quattor/aii/ks/variants/el7.pan
Expand Up @@ -8,7 +8,7 @@ prefix "/system/aii/osinstall/ks";
"langsupport" = null;
"packages_args" = list("--ignoremissing");

"end_script" = "%end";
"end_script" = "%end"; # TODO: remove - no longer used
"part_label" = true;
"volgroup_required" = false;
"lvmforce" = true;
Expand Down
2 changes: 1 addition & 1 deletion aii-ks/src/main/pan/quattor/aii/ks/variants/sl6.pan
Expand Up @@ -13,7 +13,7 @@ prefix "/system/aii/osinstall/ks";
"mouse" = null;
"langsupport" = null;

"end_script" = "%end";
"end_script" = "%end"; # TODO: remove - no longer used
"part_label" = true;
"volgroup_required" = false;

Expand Down
11 changes: 3 additions & 8 deletions aii-ks/src/main/perl/ks.pm
Expand Up @@ -50,7 +50,6 @@ use constant { KS => "/system/aii/osinstall/ks",
CCM_CONFIG_PATH => "/software/components/ccm",
NAMESERVER => "/system/network/nameserver/0",
FORWARDPROXY => "forward",
END_SCRIPT_FIELD => "/system/aii/osinstall/ks/end_script",
BASE_PKGS => "/system/aii/osinstall/ks/base_packages",
DISABLED_REPOS => "/system/aii/osinstall/ks/disabled_repos",
LOCALHOST => hostname(),
Expand Down Expand Up @@ -552,10 +551,8 @@ EOF
join ("\n", @packages_in_packages);
}
print "\n";
print $version >= ANACONDA_VERSION_EL_6_0 ? '%end' : '', "\n";

my $end = $config->elementExists(END_SCRIPT_FIELD) ? $config->getElement(END_SCRIPT_FIELD)->getValue() : '%end';
print $version >= ANACONDA_VERSION_EL_6_0 ? $end : '',
"\n";
return $unprocessed_packages;

}
Expand Down Expand Up @@ -864,7 +861,6 @@ EOF

ksuserhooks ($config, PREENDHOOK);

my $end = $config->elementExists(END_SCRIPT_FIELD) ? $config->getElement(END_SCRIPT_FIELD)->getValue() : '%end';
my $kstree = $config->getElement(KS)->getTree;
my $version = get_anaconda_version($kstree);

Expand All @@ -886,7 +882,7 @@ echo 'End of pre section'
# Drain remote logger (0 if not relevant)
sleep \$drainsleep
$end
%end
EOF

Expand Down Expand Up @@ -1705,14 +1701,13 @@ EOF
}

ksuserhooks ($config, PREREBOOTHOOK);
my $end = $config->getElement(END_SCRIPT_FIELD)->getValue();
print <<EOF;
echo 'End of post section'
# Drain remote logger (0 if not relevant)
sleep \$drainsleep
$end
%end
EOF

Expand Down
6 changes: 2 additions & 4 deletions aii-ks/src/main/perl/ks.pod
Expand Up @@ -183,11 +183,9 @@ List of switches to add to the kickstart "%packages" line.
Defaults to "--resolvedeps --ignoremissing"; you probably
want to keep those in the list.

=item * end_script : string
=item * end_script ? string

Closing tag used for Kickstart scripts C<%pre> and C<%post> and C<%packages> section
(usually either empty or "%end"). Early Anaconda versions (< 6) did not have such a closing
tag. Later the use of %end became optional, and recent Anaconda releases made it mandatory.
No longer used.

=item * part_label: boolean

Expand Down

0 comments on commit ac5eed9

Please sign in to comment.