mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-21 20:51:26 +00:00
Group bash tests together
This commit is contained in:
parent
b587a7e7a4
commit
72927f398e
@ -39,18 +39,18 @@ if [ -n "$POSIXLY_CORRECT" ] || [ -z "$BASH_VERSION" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we're root.
|
||||
if (( EUID != 0 )); then
|
||||
printf '%s\n' "You must run this script as root. Either use sudo or 'su -c ${0}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We need bash version >= 4 for associative arrays.
|
||||
if (( BASH_VERSINFO < 4 )); then
|
||||
printf '%s\n' "bash >= 4.0 is required for this script." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we're root.
|
||||
if (( EUID != 0 )); then
|
||||
printf '%s\n' "You must run this script as root. Either use sudo or 'su -c ${0}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Path to logfile
|
||||
logfile=/var/log/migrate2rocky.log
|
||||
|
Loading…
Reference in New Issue
Block a user