Browse Source

Always use lowercase

Ernesto Nicolás Carrea 5 years ago
parent
commit
4e3df1f615
1 changed files with 4 additions and 4 deletions
  1. 4 4
      func/osal.sh

+ 4 - 4
func/osal.sh

@@ -3,17 +3,17 @@
 # Identifies OS type and variant
 # Identifies OS type and variant
 # Setups variables and provides OS-agnostic wrapper functions
 # Setups variables and provides OS-agnostic wrapper functions
 
 
-OS_TYPE=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=' | sed -e 's/^"//' -e 's/"$//')
+OS_TYPE=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=' | sed -e 's/^"//' -e 's/"$//' | sed -e 's/\(.*\)/\L\1/')
 case "$OS_TYPE" in
 case "$OS_TYPE" in
-debian|Debian)
+debian)
     OS_BASE='debian'
     OS_BASE='debian'
     OS_VERSION=$(cat /etc/debian_version|grep -o "[0-9]\{1,2\}"|head -n1)
     OS_VERSION=$(cat /etc/debian_version|grep -o "[0-9]\{1,2\}"|head -n1)
     ;;
     ;;
-ubuntu|Ubuntu)
+ubuntu)
     OS_BASE='debian'
     OS_BASE='debian'
     OS_VERSION="$(lsb_release -s -r)"
     OS_VERSION="$(lsb_release -s -r)"
     ;;
     ;;
-centos|CentOS|rhel|RHEL|fedora|Fedora|RedHat)
+centos|rhel|fedora|redhat)
     OS_BASE='rhel'
     OS_BASE='rhel'
     OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | sed -e "s/VERSION_ID=//" | sed -e 's/^"//' -e 's/"$//')
     OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | sed -e "s/VERSION_ID=//" | sed -e 's/^"//' -e 's/"$//')
     ;;
     ;;