mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-12-28 04:40:56 +00:00
Fix shellcheck issues
Fix issues found by shellcheck.
This commit is contained in:
parent
606390af59
commit
1529747183
1 changed files with 3 additions and 2 deletions
|
@ -231,6 +231,7 @@ bin_check() {
|
|||
for pkg in "${!pkgs[@]}"; do
|
||||
ver=${pkgs[$pkg]}
|
||||
if ! pkg_ver "$pkg" "$ver"; then
|
||||
# shellcheck disable=SC2140
|
||||
exit_message \
|
||||
"$pkg >= $ver is required for this script. Please run "\
|
||||
"\"dnf install $pkg; dnf update\" first."
|
||||
|
@ -381,7 +382,7 @@ collect_system_info () {
|
|||
kname=$(lsblk -dno kname "$efi_mount")
|
||||
cd "/sys/block/$kname/slaves" || exit_message \
|
||||
"Unable to gather EFI data: Can't cd to /sys/block/$kname/slaves."
|
||||
if ! (shopt -s failglob; : *) 2>/dev/null; then
|
||||
if ! (shopt -s failglob; : ./*) 2>/dev/null; then
|
||||
exit_message \
|
||||
"Unable to gather EFI data: No slaves found in /sys/block/$kname/slaves."
|
||||
fi
|
||||
|
@ -577,7 +578,7 @@ $'because continuing with the migration could cause further damage to system.'
|
|||
repl=${module_glob_map[$gl]}
|
||||
mod=${mod/$gl/$repl}
|
||||
done
|
||||
if [[ $mod != ${enabled_modules[$i]} ]]; then
|
||||
if [[ $mod != "${enabled_modules[$i]}" ]]; then
|
||||
disable_modules+=(${enabled_modules[$i]})
|
||||
enabled_modules[$i]=$mod
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue