aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2012-02-28 16:23:16 -0500
committerBrian Behlendorf <[email protected]>2012-03-05 10:38:27 -0800
commit76c2b24c613ddac896ee67250b467fd40d6a5689 (patch)
tree3cc1d7af11a3d27aad26351dab9a8ff047c8b11e /configure
parent613d88eda89945bb0011ddc05d3bd064bf1a8e1b (diff)
Fix distribution detection
Improve the distribution detection by moving the tests for distribution specific files first. The Ubuntu and Debian checks are left for last because they are the least likely to be unique. This is particularly true in the case of Debian since so many distributions are based on Debian. Since this is currently only used to identify the correct packaging method for this system the result in many instances is simply cosmetic. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure54
1 files changed, 29 insertions, 25 deletions
diff --git a/configure b/configure
index d63c1a1dc..14c1c4d5f 100755
--- a/configure
+++ b/configure
@@ -11674,24 +11674,26 @@ $as_echo "$ZFS_META_LICENSE" >&6; }
{ $as_echo "$as_me:$LINENO: checking linux distribution" >&5
$as_echo_n "checking linux distribution... " >&6; }
- if test -f /etc/redhat-release ; then
- VENDOR=redhat ;
+ if test -f /etc/toss-release ; then
+ VENDOR=toss ;
elif test -f /etc/fedora-release ; then
VENDOR=fedora ;
+ elif test -f /etc/redhat-release ; then
+ VENDOR=redhat ;
elif test -f /etc/gentoo-release ; then
VENDOR=gentoo ;
- elif test -f /etc/debian_version ; then
- VENDOR=debian ;
+ elif test -f /etc/arch-release ; then
+ VENDOR=arch ;
elif test -f /etc/SuSE-release ; then
VENDOR=sles ;
elif test -f /etc/slackware-version ; then
VENDOR=slackware ;
- elif test -f /etc/arch-release ; then
- VENDOR=arch ;
- elif test -f /etc/lsb-release ; then
- VENDOR=ubuntu ;
elif test -f /etc/lunar.release ; then
VENDOR=lunar ;
+ elif test -f /etc/lsb-release ; then
+ VENDOR=ubuntu ;
+ elif test -f /etc/debian_version ; then
+ VENDOR=debian ;
else
VENDOR= ;
fi
@@ -11702,16 +11704,17 @@ $as_echo "$VENDOR" >&6; }
{ $as_echo "$as_me:$LINENO: checking default package type" >&5
$as_echo_n "checking default package type... " >&6; }
case "$VENDOR" in
- redhat) DEFAULT_PACKAGE=rpm ;;
- fedora) DEFAULT_PACKAGE=rpm ;;
- ubuntu) DEFAULT_PACKAGE=deb ;;
- debian) DEFAULT_PACKAGE=deb ;;
- sles) DEFAULT_PACKAGE=rpm ;;
- slackware) DEFAULT_PACKAGE=tgz ;;
- gentoo) DEFAULT_PACKAGE=tgz ;;
- lunar) DEFAULT_PACKAGE=tgz ;;
- arch) DEFAULT_PACKAGE=arch;;
- *) DEFAULT_PACKAGE=rpm ;;
+ toss) DEFAULT_PACKAGE=rpm ;;
+ redhat) DEFAULT_PACKAGE=rpm ;;
+ fedora) DEFAULT_PACKAGE=rpm ;;
+ gentoo) DEFAULT_PACKAGE=tgz ;;
+ arch) DEFAULT_PACKAGE=arch ;;
+ sles) DEFAULT_PACKAGE=rpm ;;
+ slackware) DEFAULT_PACKAGE=tgz ;;
+ lunar) DEFAULT_PACKAGE=tgz ;;
+ ubuntu) DEFAULT_PACKAGE=deb ;;
+ debian) DEFAULT_PACKAGE=deb ;;
+ *) DEFAULT_PACKAGE=rpm ;;
esac
{ $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
@@ -11732,16 +11735,17 @@ $as_echo "$DEFAULT_INIT_DIR" >&6; }
{ $as_echo "$as_me:$LINENO: checking default init script type" >&5
$as_echo_n "checking default init script type... " >&6; }
case "$VENDOR" in
+ toss) DEFAULT_INIT_SCRIPT=redhat ;;
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
fedora) DEFAULT_INIT_SCRIPT=fedora ;;
- ubuntu) DEFAULT_INIT_SCRIPT=lsb ;;
- debian) DEFAULT_INIT_SCRIPT=lsb ;;
- sles) DEFAULT_INIT_SCRIPT=lsb ;;
- slackware) DEFAULT_INIT_SCRIPT=lsb ;;
gentoo) DEFAULT_INIT_SCRIPT=gentoo ;;
- lunar) DEFAULT_INIT_SCRIPT=lunar ;;
- arch) DEFAULT_INIT_SCRIPT=arch ;;
- *) DEFAULT_INIT_SCRIPT=lsb ;;
+ arch) DEFAULT_INIT_SCRIPT=arch ;;
+ sles) DEFAULT_INIT_SCRIPT=lsb ;;
+ slackware) DEFAULT_INIT_SCRIPT=lsb ;;
+ lunar) DEFAULT_INIT_SCRIPT=lunar ;;
+ ubuntu) DEFAULT_INIT_SCRIPT=lsb ;;
+ debian) DEFAULT_INIT_SCRIPT=lsb ;;
+ *) DEFAULT_INIT_SCRIPT=lsb ;;
esac
{ $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5