centos2ol
centos2ol copied to clipboard
Unexpected Token error ( during migration
Scripts say you are already using Oracle Linux even if the script fails during execution. I got this script unexpected token ( at line 507 I tried to fix it but I failed to do it.
and also can we just validate the migration is successful based on /etc/oracle-release file because once this file generated migration is always successful even though it failed at the first attempt. basically below script block is failing
if "${reinstall_all_rpms}"; then
echo "Testing for remaining CentOS RPMs"
# If CentOS and Oracle Linux have identically versioned RPMs then those RPMs are left unchanged.
# This should have no technical impact but for completeness, reinstall these RPMs
# so there is no accidental cross pollination.
mapfile -t list_of_centos_rpms < <(rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE} %{VENDOR}\n" | grep CentOS | awk '{print $1}')
if [[ -n "${list_of_centos_rpms[*]}" ]]; then
echo "Reinstalling RPMs: ${list_of_centos_rpms[*]}"
yum --assumeyes --disablerepo "*" --enablerepo "ol*" reinstall "${list_of_centos_rpms[@]}"
fi
# See if non-Oracle RPMs are present and print them
mapfile -t non_oracle_rpms < <(rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}|%{VENDOR}|%{PACKAGER}\n" |grep -v Oracle)
if [[ -n "${non_oracle_rpms[*]}" ]]; then
echo "The following non-Oracle RPMs are installed on the system:"
printf '\t%s\n' "${non_oracle_rpms[@]}"
echo "This may be expected of your environment and does not necessarily indicate a problem."
echo "If a large number of CentOS RPMs are included and you're unsure why please open an issue on ${github_url}"
fi
fi