3 # Simple OS detection script
6 # * Red Hat 5 / CentOS 5
10 # Authors: Christian Bayle <bayle@debian.org>
11 # Alain Peyrat <aljeux@free.fr>
13 # FusionForge is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # FusionForge is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License along
24 # with FusionForge; if not, write to the Free Software Foundation, Inc.,
25 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 if [ -f "/etc/redhat-release" ]
32 distrib=`awk '{print $1}' /etc/redhat-release`
50 elif [ -f "/etc/SuSE-release" ]
52 distrib=`awk '{print $1}' /etc/SuSE-release | head -n 1`
53 if grep -q openSUSE /etc/SuSE-release
59 elif [ -f "/etc/ubuntu_version" ]
61 distrib=`awk '{print $1}' /etc/ubuntu_version`
63 elif [ -f "/etc/debian_version" ]
65 distrib=`awk '{print $1}' /etc/debian_version`
84 centos|rhel|redhat_unknown|fedora)