Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aii-ks: end_script removal, try #2 #313

Merged
merged 1 commit into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion aii-ks/src/main/pan/quattor/aii/ks/variants/el7.pan
Original file line number Diff line number Diff line change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gombasg can you make an issue that we should remove it later

"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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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 @@ -551,10 +550,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 @@ -863,7 +860,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 @@ -885,7 +881,7 @@ echo 'End of pre section'
# Drain remote logger (0 if not relevant)
sleep \$drainsleep

$end
%end

EOF

Expand Down Expand Up @@ -1713,14 +1709,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
Original file line number Diff line number Diff line change
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