Browse Source

Add CentOS support to /etc/system-release parser

Alois Mahdal 6 years ago
parent
commit
03174c8292
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/_distp_esr.sh.skel

+ 4
- 0
src/_distp_esr.sh.skel View File

16
         id)
16
         id)
17
             grep -q 'Red Hat Enterprise Linux Server' $esr \
17
             grep -q 'Red Hat Enterprise Linux Server' $esr \
18
              && echo rhel
18
              && echo rhel
19
+            grep -q 'CentOS ' $esr \
20
+             && echo centos
19
             ;;
21
             ;;
20
         ver)
22
         ver)
21
             grep -q 'Red Hat Enterprise Linux Server release [5-6]\.[0-9]\+ ' $esr \
23
             grep -q 'Red Hat Enterprise Linux Server release [5-6]\.[0-9]\+ ' $esr \
22
              && grep -o '[5-6]\.[0-9]\+' $esr
24
              && grep -o '[5-6]\.[0-9]\+' $esr
25
+            grep -q 'CentOS release [5-6]\.[0-9]\+ ' $esr \
26
+             && grep -o '[5-6]\.[0-9]\+' $esr
23
             ;;
27
             ;;
24
         ver.x)
28
         ver.x)
25
             _distp_esr__get ver | cut -d. -f1
29
             _distp_esr__get ver | cut -d. -f1