#!/bin/sh distro_name='unknown' distro_version='0.0.0' rhel_release='/etc/redhat-release' ora_release="/etc/oracle-release" set_rhversion() { distro_version=$(cat "$1" | sed -n 's/^.*release \([^[:space:]]\+\).*/\1/p') } get_distro() { if [ -f '/etc/os-release' ]; then while read line; do key=$(echo "$line" | cut -d= -f1) val=$(echo "$line" | cut -d= -f2 | sed -e s/\"//g) case x"$key" in x"ID") distro_name="$val" ;; x"VERSION_ID") distro_version="$val" ;; *) esac done <