]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cvo.sh: Add support for CentOS, Fedora, Slackware, SuSE
authorHarlan Stenn <stenn@ntp.org>
Mon, 27 Jul 2009 06:57:03 +0000 (06:57 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 27 Jul 2009 06:57:03 +0000 (06:57 +0000)
bk: 4a6d4fbf3sTX9vxmR4xWTH39o-1OKQ

ChangeLog
scripts/cvo.sh

index 28832eccc080084fa7a5b5fd178b0a2df58c98dd..6e7c9a1214ecc07c2bc6ecc9a7fc6b141e9a4315 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* cvo.sh: Add support for CentOS, Fedora, Slackware, SuSE.
 (4.2.5p194) 2009/07/26 Released by Harlan Stenn <stenn@ntp.org>
 * Documentation updates from Dave Mills.
 * Use scripts/cvo.sh in the build script to get better subdir names.
index c9a3068b9f4b95e47c138704e9d74f95d5e4e2ac..e0932bf6a78c8848fb133cae701cbcbb568fac70 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Copyright 2002, Harlan Stenn.  Used by NTP with permission.
+# Copyright 2002, 2009, Harlan Stenn.  Used by NTP with permission.
 # Author: Harlan Stenn <harlan+cvo@pfcs.com>
 
 # Possible output formats:
@@ -42,19 +42,43 @@ case "$#" in
        elif test -f /etc/redhat-release
        then
            set `cat /etc/redhat-release`
-           case "$3" in
-            Enterprise)
-               CVO_OS=redhat$7.E
+           case "$1" in
+            CentOS)
+               CVO_OS=centos$3
                ;;
-            Linux)
-               CVO_OS=redhat$5
+            Fedora)
+               CVO_OS=fedora$3
+               ;;
+           *)
+               case "$3" in
+                Enterprise)
+                   CVO_OS=redhat$7.E
+                   ;;
+                Linux)
+                   CVO_OS=redhat$5
+                   ;;
+               esac
                ;;
            esac
            CVO_KOSVER=`uname -r`
+       elif test -f /etc/slackware-version
+       then
+           set `cat /etc/slackware-version`
+           CVO_OS=slackware$2
+           CVO_KOSVER=`uname -r`
+       elif test -f /etc/SuSE-release
+       then
+           set `cat /etc/SuSE-release`
+           CVO_OS=suse$9
+           CVO_KOSVER=`uname -r`
        else
            CVO_OS=$cvo_KERN`uname -r`
+
        fi
        ;;
+     nto)      # QNX
+       CVO_KOSVER=`uname -r`
+       ;;
      *)
        echo "gronk - I don't understand <$CVO>!"
        exit 1