Sfoglia il codice sorgente

Add CentOS support to /etc/system-release parser

Alois Mahdal 6 anni fa
parent
commit
03174c8292
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4
    0
      src/_distp_esr.sh.skel

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

@@ -16,10 +16,14 @@ _distp_esr__get() {
16 16
         id)
17 17
             grep -q 'Red Hat Enterprise Linux Server' $esr \
18 18
              && echo rhel
19
+            grep -q 'CentOS ' $esr \
20
+             && echo centos
19 21
             ;;
20 22
         ver)
21 23
             grep -q 'Red Hat Enterprise Linux Server release [5-6]\.[0-9]\+ ' $esr \
22 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 28
         ver.x)
25 29
             _distp_esr__get ver | cut -d. -f1