[Fusionforge-commits] FusionForge branch Branch_5_3 updated. b532b94aa5d9e4e1c1cb0e92874620b327b42860

Franck VILLAUME nerville at fusionforge.org
Thu Feb 13 16:53:45 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  b532b94aa5d9e4e1c1cb0e92874620b327b42860 (commit)
      from  a7daf6c6d2f05c46d1494a5a1ca89e1d66d4d38b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b532b94aa5d9e4e1c1cb0e92874620b327b42860
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Feb 13 16:53:30 2014 +0100

    install-ng: fix detect_version

diff --git a/src/install/detect_os b/src/install/detect_os
index 6c62522..524d938 100755
--- a/src/install/detect_os
+++ b/src/install/detect_os
@@ -3,7 +3,7 @@
 # Simple OS detection script
 #
 # Currently supported:
-# * Red Hat 5 / CentOS 5
+# * Red Hat 5,6 / CentOS 5,6
 # * Fedora
 # * OpenSuSE 11
 #
@@ -98,6 +98,19 @@ detect_type()
 
 detect_version()
 {
-	version=$(lsb_release -rs | cut -f1 -d.)
+	version=''
+	lsb_release_bin=$(which lsb_release)
+	ret=`echo $?`
+	if [ $ret ]
+	then
+		os=$(detect_os)
+		case $os in
+			centos|rhel|redhat_unknown|fedora)
+				release=$(rpm -q --queryformat='%{release}' kernel)
+				version=${release##*.}
+				;;
+	else
+		version=$(lsb_release -rs | cut -f1 -d.)
+	fi
 	echo $version
 }

-----------------------------------------------------------------------

Summary of changes:
 src/install/detect_os |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list