From: Michal Soltys Date: Mon, 10 Oct 2011 21:58:05 +0000 (+0200) Subject: explicitly verify bash version X-Git-Tag: 014~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d239b550ce9e6a80342965974c4503cfde736fbe;p=thirdparty%2Fdracut.git explicitly verify bash version A simple check in main dracut script. Signed-off-by: Michal Soltys --- diff --git a/dracut b/dracut index 63d4ea67c..205f5d174 100755 --- a/dracut +++ b/dracut @@ -418,6 +418,13 @@ else exit 1 fi +# Verify bash version, curret minimum is 3.1 +if (( ${BASH_VERSINFO[0]} < 3 || + ( ${BASH_VERSINFO[0]} == 3 && ${BASH_VERSINFO[1]} < 1 ) )); then + dfatal 'You need at least Bash 3.1 to use dracut, sorry.' + exit 1 +fi + dracutfunctions=$dracutbasedir/dracut-functions export dracutfunctions