Workaround RedHat bug in /etc/issue file.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 15 Jun 2015 16:50:39 +0000 (18:50 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 15 Jun 2015 16:50:39 +0000 (18:50 +0200)
mock.sh

diff --git a/mock.sh b/mock.sh
index be701d2..3356ccb 100755 (executable)
--- a/mock.sh
+++ b/mock.sh
@@ -38,7 +38,11 @@ if test "x$1" = "x-r"; then
        shift
 fi
 
-OS=`cat /etc/issue | head -n 1`
+if test -f /etc/redhat-release; then
+  OS=`cat /etc/redhat-release | head -n 1`
+else
+  OS=`cat /etc/issue | head -n 1`
+fi
 ARCH=`uname -i`
 
 was_build=