Skip to content
Snippets Groups Projects
Select Git revision
  • 37270da56ae887aedb729066e261d0d447af16d9
  • master default protected
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
4 results

autodetect-os

Blame
  • user avatar
    Hahn Axel (hahn) authored
    37270da5
    History
    autodetect-os 739 B
    # ----------------------------------------------------------------------------
    # 
    # EOL - End of life detection - Warn before reaching end of life
    #
    # AUTODETECT LINUX OS
    #
    # ----------------------------------------------------------------------------
    # 2021-11-02  v1.0  <axel.hahn@iml.unibe.ch>
    # ----------------------------------------------------------------------------
    
    
    myKey=`ph.getOS`
    myVersion=`ph.getOSMajor`
    
    case "$mykey" in
        centos)
            # detect centos stream
            grep -i stream /etc/centos-release >/dev/null 2>&1 && myVersion="${myVersion}-stream"
            ;;
        *)
            echo no special handling
    esac
    
    # ----------------------------------------------------------------------------
    
    echo "|$myKey|$myVersion"