dracut.sh: early check for bash version
parent
e8f19bcf26
commit
ee44f62972
13
dracut.sh
13
dracut.sh
|
|
@ -22,6 +22,13 @@
|
|||
#
|
||||
|
||||
# store for logging
|
||||
|
||||
# Verify bash version, current minimum is 4
|
||||
if (( BASH_VERSINFO[0] < 4 )); then
|
||||
printf -- 'You need at least Bash 4 to use dracut, sorry.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dracut_args=( "$@" )
|
||||
readonly dracut_cmd="$(readlink -f $0)"
|
||||
|
||||
|
|
@ -828,12 +835,6 @@ if ! [[ $print_cmdline ]]; then
|
|||
rm -fr -- ${initdir}/*
|
||||
fi
|
||||
|
||||
# Verify bash version, current minimum is 4
|
||||
if (( BASH_VERSINFO[0] < 4 )); then
|
||||
dfatal 'You need at least Bash 4 to use dracut, sorry.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dracutfunctions=$dracutbasedir/dracut-functions.sh
|
||||
export dracutfunctions
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue