[PATCH 2/2] explicitly verify bash version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


A simple check in main dracut script.

Signed-off-by: Michal Soltys <soltys@xxxxxxxx>
---
 dracut |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dracut b/dracut
index 63d4ea6..205f5d1 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
 
-- 
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux