dracut.sh: early check for bash version

master
Harald Hoyer 2015-07-09 19:44:30 +02:00
parent e8f19bcf26
commit ee44f62972
1 changed files with 7 additions and 6 deletions

View File

@ -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