| 1 | #!/bin/ksh | 
|---|
| 2 | # IBM_PROLOG_BEGIN_TAG  | 
|---|
| 3 | # This is an automatically generated prolog.  | 
|---|
| 4 | #   | 
|---|
| 5 | #   | 
|---|
| 6 | #   | 
|---|
| 7 | # Licensed Materials - Property of IBM  | 
|---|
| 8 | #   | 
|---|
| 9 | # (C) COPYRIGHT International Business Machines Corp. 2005,2007  | 
|---|
| 10 | # All Rights Reserved  | 
|---|
| 11 | #   | 
|---|
| 12 | # US Government Users Restricted Rights - Use, duplication or  | 
|---|
| 13 | # disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  | 
|---|
| 14 | #   | 
|---|
| 15 | # IBM_PROLOG_END_TAG  | 
|---|
| 16 | # @(#)90 1.10.1.11 src/avs/fs/mmfs/ts/admin/mmprodname.sh, mmfs, avs_rgpfs24, rgpfs24s012a 4/6/07 16:11:47 | 
|---|
| 17 | ############################################################# | 
|---|
| 18 | # | 
|---|
| 19 | #  This file contains external product-related information. | 
|---|
| 20 | #  It must be kept in sync with the corresponding packaging | 
|---|
| 21 | #  files and the GPFS daemon counterpart prodname.h file. | 
|---|
| 22 | # | 
|---|
| 23 | ############################################################# | 
|---|
| 24 | sourceFile="mmprodname.sh" | 
|---|
| 25 | [[ -n $DEBUGprodname ]] && set -x | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | # Set product release information. | 
|---|
| 29 | # Must match the information in src/packages/gpfs/base/Makefile | 
|---|
| 30 | # and src/packages/gpfs/base/gpfs.base.spec. | 
|---|
| 31 | productVersion="3.1.0.12" | 
|---|
| 32 | compatibleProductVersion="3.1.0.0" | 
|---|
| 33 | initialProductVersion="3.1.0.0"    # first multi-release enabled version | 
|---|
| 34 |  | 
|---|
| 35 | # Set version numbers for communication between daemons. | 
|---|
| 36 | # Must match the values in ts/classes/basic/prodname.h. | 
|---|
| 37 | currentDaemonVersion=913           # CURRENT_DAEMON_VERSION_NO | 
|---|
| 38 | compatibleDaemonVersion=901        # COMPATIBLE_DAEMON_VERSION_NO | 
|---|
| 39 | initialDaemonVersion=901           # first multi-release enabled version | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | #################################################################### | 
|---|
| 43 | # | 
|---|
| 44 | # Function:  Converts the input value to the corresponding | 
|---|
| 45 | #            daemon version as per prodname.h (e.g. 700). | 
|---|
| 46 | # | 
|---|
| 47 | # Input:     $1 - release version string or daemon version | 
|---|
| 48 | # | 
|---|
| 49 | # Output:    daemon version (0 if unknown) | 
|---|
| 50 | # | 
|---|
| 51 | # Returns:   always 0 | 
|---|
| 52 | # | 
|---|
| 53 | #################################################################### | 
|---|
| 54 | function releaseToDaemonVersion  # <releaseVersion> | 
|---|
| 55 | { | 
|---|
| 56 |   typeset sourceFile="mmprodname.sh" | 
|---|
| 57 |   [[ -n $DEBUG || -n $DEBUGreleaseToDaemonVersion ]] && set -x | 
|---|
| 58 |   $mmTRACE_ENTER "$*" | 
|---|
| 59 |   typeset inValue=$1 | 
|---|
| 60 |   typeset result=0 | 
|---|
| 61 |  | 
|---|
| 62 |  | 
|---|
| 63 |   if [[ $inValue = 9[0-9][0-9] || $inValue = 8[0-9][0-9] || $inValue = 70[0-1] ]] | 
|---|
| 64 |   then | 
|---|
| 65 |     result=$inValue | 
|---|
| 66 |  | 
|---|
| 67 |   else | 
|---|
| 68 |     case $inValue | 
|---|
| 69 |     in | 
|---|
| 70 |       2.2.0.[0-4])  result=700 ;; | 
|---|
| 71 |       2.2.1.[0-9])  result=700 ;; | 
|---|
| 72 |       2.2.1.1[0-3]) result=701 ;; | 
|---|
| 73 |  | 
|---|
| 74 |       2.3.0.0)      result=804 ;; | 
|---|
| 75 |       2.3.0.1)      result=805 ;; | 
|---|
| 76 |       2.3.0.2)      result=806 ;; | 
|---|
| 77 |       2.3.0.3)      result=808 ;; | 
|---|
| 78 |       2.3.0.4)      result=809 ;; | 
|---|
| 79 |       2.3.0.5)      result=810 ;; | 
|---|
| 80 |       2.3.0.6)      result=811 ;; | 
|---|
| 81 |       2.3.0.7)      result=812 ;; | 
|---|
| 82 |       2.3.0.8)      result=813 ;; | 
|---|
| 83 |       2.3.0.9)      result=814 ;; | 
|---|
| 84 |       2.3.0.10)     result=815 ;; | 
|---|
| 85 |       2.3.0.11)     result=816 ;; | 
|---|
| 86 |       2.3.0.12)     result=817 ;; | 
|---|
| 87 |       2.3.0.13)     result=818 ;; | 
|---|
| 88 |       2.3.0.14)     result=819 ;; | 
|---|
| 89 |       2.3.0.15)     result=820 ;; | 
|---|
| 90 |       2.3.0.16)     result=821 ;; | 
|---|
| 91 |       2.3.0.17)     result=822 ;; | 
|---|
| 92 |       2.3.0.18)     result=823 ;; | 
|---|
| 93 |       2.3.0.19)     result=824 ;; | 
|---|
| 94 |       2.3.0.20)     result=825 ;; | 
|---|
| 95 |       2.3.0.21)     result=826 ;; | 
|---|
| 96 |       2.3.0.22)     result=827 ;; | 
|---|
| 97 |  | 
|---|
| 98 |       3.1.0.0)      result=901 ;; | 
|---|
| 99 |       3.1.0.1)      result=902 ;; | 
|---|
| 100 |       3.1.0.2)      result=903 ;; | 
|---|
| 101 |       3.1.0.3)      result=904 ;; | 
|---|
| 102 |       3.1.0.4)      result=905 ;; | 
|---|
| 103 |       3.1.0.5)      result=906 ;; | 
|---|
| 104 |       3.1.0.6)      result=907 ;; | 
|---|
| 105 |       3.1.0.7)      result=908 ;; | 
|---|
| 106 |       3.1.0.8)      result=909 ;; | 
|---|
| 107 |       3.1.0.9)      result=910 ;; | 
|---|
| 108 |       3.1.0.10)     result=911 ;; | 
|---|
| 109 |       3.1.0.11)     result=912 ;; | 
|---|
| 110 |       3.1.0.12)     result=913 ;; | 
|---|
| 111 |  | 
|---|
| 112 |       * )           result=0   ;; | 
|---|
| 113 |  | 
|---|
| 114 |     esac  # end of case $inValue | 
|---|
| 115 |   fi  #end of if [[ $inValue = 9[0-9][0-9] || $inValue = 8[0-9][0-9] || $inValue = 70[0-1] ]] | 
|---|
| 116 |  | 
|---|
| 117 |   print -- "$result" | 
|---|
| 118 |   return 0 | 
|---|
| 119 |  | 
|---|
| 120 | }  #------- end of function releaseToDaemonVersion -------------- | 
|---|
| 121 |  | 
|---|
| 122 |  | 
|---|
| 123 | #################################################################### | 
|---|
| 124 | # | 
|---|
| 125 | # Function:  Converts the input value to the corresponding | 
|---|
| 126 | #            product version string (e.g. 2.2.0.0). | 
|---|
| 127 | # | 
|---|
| 128 | # Input:     $1 - daemon version or release string | 
|---|
| 129 | # | 
|---|
| 130 | # Output:    release version or "unknown" | 
|---|
| 131 | # | 
|---|
| 132 | # Returns:   always 0 | 
|---|
| 133 | # | 
|---|
| 134 | #################################################################### | 
|---|
| 135 | function releaseToProductVersion  # <daemonVersion> | 
|---|
| 136 | { | 
|---|
| 137 |   typeset sourceFile="mmprodname.sh" | 
|---|
| 138 |   [[ -n $DEBUG || -n $DEBUGreleaseToProductVersion ]] && set -x | 
|---|
| 139 |   $mmTRACE_ENTER "$*" | 
|---|
| 140 |   typeset inValue=$1 | 
|---|
| 141 |   typeset result="unknown" | 
|---|
| 142 |  | 
|---|
| 143 |  | 
|---|
| 144 |   if [[ $inValue = [23].[1234].[01].+([0-9]) ]] | 
|---|
| 145 |   then | 
|---|
| 146 |     result=$inValue | 
|---|
| 147 |  | 
|---|
| 148 |   else | 
|---|
| 149 |     case $inValue | 
|---|
| 150 |     in | 
|---|
| 151 |       700)  result="2.2.0.0" ;; | 
|---|
| 152 |       701)  result="2.2.1.10" ;; | 
|---|
| 153 |  | 
|---|
| 154 |       800)  result="2.3.0.0" ;; | 
|---|
| 155 |       804)  result="2.3.0.0" ;; | 
|---|
| 156 |       805)  result="2.3.0.1" ;; | 
|---|
| 157 |       806)  result="2.3.0.2" ;; | 
|---|
| 158 |       808)  result="2.3.0.3" ;; | 
|---|
| 159 |       809)  result="2.3.0.4" ;; | 
|---|
| 160 |       810)  result="2.3.0.5" ;; | 
|---|
| 161 |       811)  result="2.3.0.6" ;; | 
|---|
| 162 |       812)  result="2.3.0.7" ;; | 
|---|
| 163 |       813)  result="2.3.0.8" ;; | 
|---|
| 164 |       814)  result="2.3.0.9" ;; | 
|---|
| 165 |       815)  result="2.3.0.10" ;; | 
|---|
| 166 |       816)  result="2.3.0.11" ;; | 
|---|
| 167 |       817)  result="2.3.0.12" ;; | 
|---|
| 168 |       818)  result="2.3.0.13" ;; | 
|---|
| 169 |       819)  result="2.3.0.14" ;; | 
|---|
| 170 |       820)  result="2.3.0.15" ;; | 
|---|
| 171 |       821)  result="2.3.0.16" ;; | 
|---|
| 172 |       822)  result="2.3.0.17" ;; | 
|---|
| 173 |       823)  result="2.3.0.18" ;; | 
|---|
| 174 |       824)  result="2.3.0.19" ;; | 
|---|
| 175 |       825)  result="2.3.0.20" ;; | 
|---|
| 176 |       826)  result="2.3.0.21" ;; | 
|---|
| 177 |       827)  result="2.3.0.22" ;; | 
|---|
| 178 |  | 
|---|
| 179 |  | 
|---|
| 180 |       900)  result="3.1.0.0" ;; | 
|---|
| 181 |       901)  result="3.1.0.0" ;; | 
|---|
| 182 |       902)  result="3.1.0.1" ;; | 
|---|
| 183 |       903)  result="3.1.0.2" ;; | 
|---|
| 184 |       904)  result="3.1.0.3" ;; | 
|---|
| 185 |       905)  result="3.1.0.4" ;; | 
|---|
| 186 |       906)  result="3.1.0.5" ;; | 
|---|
| 187 |       907)  result="3.1.0.6" ;; | 
|---|
| 188 |       908)  result="3.1.0.7" ;; | 
|---|
| 189 |       909)  result="3.1.0.8" ;; | 
|---|
| 190 |       910)  result="3.1.0.9" ;; | 
|---|
| 191 |       911)  result="3.1.0.10" ;; | 
|---|
| 192 |       912)  result="3.1.0.11" ;; | 
|---|
| 193 |       913)  result="3.1.0.12" ;; | 
|---|
| 194 |  | 
|---|
| 195 |       *  )  result="unknown" ;; | 
|---|
| 196 |  | 
|---|
| 197 |     esac  # end of case $inValue | 
|---|
| 198 |   fi  # end of if [[ $inValue = [23].[1234].[01].+([0-9]) ]] | 
|---|
| 199 |  | 
|---|
| 200 |   print -- "$result" | 
|---|
| 201 |   return 0 | 
|---|
| 202 |  | 
|---|
| 203 | }  #------ end of function releaseToProductVersion --------------- | 
|---|
| 204 |  | 
|---|
| 205 |  | 
|---|
| 206 | ############################################################################ | 
|---|
| 207 | # | 
|---|
| 208 | # Function:  Converts the input values to the corresponding | 
|---|
| 209 | #            product version strings (e.g. 2.2.0.0) | 
|---|
| 210 | # | 
|---|
| 211 | # Input:     $* - a sequence of daemon version(s) or release string(s) | 
|---|
| 212 | # | 
|---|
| 213 | # Output:    release version(s) or "unknown"(s) | 
|---|
| 214 | # | 
|---|
| 215 | # Returns:   always 0 | 
|---|
| 216 | # | 
|---|
| 217 | ############################################################################ | 
|---|
| 218 | function releaseToProductVersionMult  # <daemonVersion> <daemonVersion> ... | 
|---|
| 219 | { | 
|---|
| 220 |   [[ -n $DEBUG || -n $DEBUGreleaseToProductVersionMult ]] && set -x | 
|---|
| 221 |   $mmTRACE_ENTER "$*" | 
|---|
| 222 |   typeset inValueList=$* | 
|---|
| 223 |   typeset inValue | 
|---|
| 224 |  | 
|---|
| 225 |   for inValue in $inValueList | 
|---|
| 226 |   do | 
|---|
| 227 |      releaseToProductVersion $inValue | 
|---|
| 228 |   done | 
|---|
| 229 |   return 0 | 
|---|
| 230 |  | 
|---|
| 231 | }  #------ end of function releaseToProductVersionMult ------------ | 
|---|
| 232 |  | 
|---|