mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-22 05:01:25 +00:00
Disable the ol and ol8 streams before enabling the rhel ones.
This commit is contained in:
parent
aa779583f9
commit
49d75e9788
@ -569,11 +569,18 @@ $'because continuing with the migration could cause further damage to system.'
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Map the known module name differences.
|
# Map the known module name differences.
|
||||||
|
disable_modules=()
|
||||||
|
local i gl repl mod
|
||||||
for i in "${!enabled_modules[@]}"; do
|
for i in "${!enabled_modules[@]}"; do
|
||||||
|
mod=${enabled_modules[$i]}
|
||||||
for gl in "${!module_glob_map[@]}"; do
|
for gl in "${!module_glob_map[@]}"; do
|
||||||
repl=${module_glob_map[$gl]}
|
repl=${module_glob_map[$gl]}
|
||||||
enabled_modules[$i]=${enabled_modules[$i]/$gl/$repl}
|
mod=${mod/$gl/$repl}
|
||||||
done
|
done
|
||||||
|
if [[ $mod != ${enabled_modules[$i]} ]]; then
|
||||||
|
disable_modules+=(${enabled_modules[$i]})
|
||||||
|
enabled_modules[$i]=$mod
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove entries matching any excluded modules.
|
# Remove entries matching any excluded modules.
|
||||||
@ -765,6 +772,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if (( ${#disable_modules[@]} )); then
|
||||||
|
infomsg $'Disabling modules\n\n'
|
||||||
|
safednf -y module disable "${disable_modules[@]}" ||
|
||||||
|
exit_message "Can't disable modules ${disable_modules[*]}"
|
||||||
|
fi
|
||||||
|
|
||||||
if (( ${#enabled_modules[@]} )); then
|
if (( ${#enabled_modules[@]} )); then
|
||||||
infomsg $'Enabling modules\n\n'
|
infomsg $'Enabling modules\n\n'
|
||||||
safednf -y module enable "${enabled_modules[@]}" ||
|
safednf -y module enable "${enabled_modules[@]}" ||
|
||||||
|
Loading…
Reference in New Issue
Block a user