Commit 8cf9f7193156ddad367ee8a6f3cab661c35b3937
1 parent
dbf6f7d1
Exists in
master
Identificação do repositório RedHat qdo estiver usando "Satellite"! By Questor
Showing
1 changed file
with
34 additions
and
3 deletions
Show diff stats
ez_i.sh
| ... | ... | @@ -901,7 +901,6 @@ f_chk_distro_status() { |
| 901 | 901 | DISTRO_NAME_P=$1 |
| 902 | 902 | RESOURCES_ARR_P=("${!2}") |
| 903 | 903 | TOTAL_2=${#RESOURCES_ARR_P[*]} |
| 904 | - | |
| 905 | 904 | RES_OK_ARR=() |
| 906 | 905 | REDHAT_ACTV=0 |
| 907 | 906 | |
| ... | ... | @@ -909,11 +908,42 @@ f_chk_distro_status() { |
| 909 | 908 | if [ "$DISTRO_NAME_P" == "RedHat" ] ; then |
| 910 | 909 | CHK_RES_CMD="subscription-manager list --consumed" |
| 911 | 910 | f_get_stderr_stdout "$CHK_RES_CMD" |
| 912 | - f_split "$F_GET_STDOUT_R" "Subscription Name:" | |
| 911 | + F_CHK_DISTRO_STATUS_R=$F_GET_STDOUT_R | |
| 912 | + | |
| 913 | + # NOTE: To debug! By Questor | |
| 914 | +# F_GET_STDOUT_R="No consumed subscription pools to list | |
| 915 | +# " | |
| 916 | + | |
| 917 | + if [[ $F_GET_STDOUT_R == *"No consumed subscription pools to list"* ]] ; then | |
| 918 | + f_get_stderr_stdout "yum repolist" | |
| 919 | + F_CHK_DISTRO_STATUS_R=$F_GET_STDOUT_R | |
| 920 | + | |
| 921 | + # NOTE: To debug! By Questor | |
| 922 | +# F_GET_STDOUT_R="Loaded plugins: product-id, rhnplugin, security, subscription-manager | |
| 923 | +# This system is receiving updates from RHN Classic or RHN Satellite. | |
| 924 | +# repo id repo name status | |
| 925 | +# epel Extra Packages for Enterprise Linux 6 12125 | |
| 926 | +# rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 14725 | |
| 927 | +# rhel-x86_64-server-optional-6 RHEL Server Optional (v. 6 64-bit x86_ 8257 | |
| 928 | +# rhel-x86_64-server-supplementary-6 RHEL Server Supplementary (v. 6 64-bit 483 | |
| 929 | +# repolist: 35590 | |
| 930 | +# " | |
| 931 | + | |
| 932 | + if [[ $F_GET_STDOUT_R == *"RHN Classic or RHN Satellite"* ]] ; then | |
| 933 | + WAR_MSGS_STR="REDHAT IS APPARENTLY USING \"RHN Classic\" OR \"RHN Satellite\" TO ACCESS ITS RESOURCES! | |
| 934 | +THIS INSTALLER WILL NOT VALIDATE THESE RESOURCES!" | |
| 935 | + WAR_MSGS_STR+=$'\n\n'"FOR MORE INFORMATION TRY: \"yum repolist\"." | |
| 936 | + f_warning_msg "$WAR_MSGS_STR" 1 | |
| 937 | + return 0 | |
| 938 | + fi | |
| 939 | + else | |
| 940 | + f_split "$F_GET_STDOUT_R" "Subscription Name:" | |
| 941 | + fi | |
| 913 | 942 | elif [ "$DISTRO_NAME_P" == "SLES" ] ; then |
| 914 | 943 | CHK_RES_CMD="zypper sl" |
| 915 | 944 | f_get_stderr_stdout "$CHK_RES_CMD" |
| 916 | 945 | f_split "$F_GET_STDOUT_R" "\n" |
| 946 | + F_CHK_DISTRO_STATUS_R=$F_GET_STDOUT_R | |
| 917 | 947 | fi |
| 918 | 948 | |
| 919 | 949 | F_SPLIT_R_0=("${F_SPLIT_R[@]}") |
| ... | ... | @@ -996,9 +1026,10 @@ f_chk_distro_status() { |
| 996 | 1026 | WAR_MSGS_STR+=$'\n\n'"FOR MORE INFORMATION TRY: \"$CHK_RES_CMD\"." |
| 997 | 1027 | f_warning_msg "$WAR_MSGS_STR" 1 |
| 998 | 1028 | fi |
| 999 | - F_CHK_DISTRO_STATUS_R=$F_GET_STDOUT_R | |
| 1000 | 1029 | } |
| 1001 | 1030 | |
| 1031 | +# < -------------------------------------------------------------------------- | |
| 1032 | + | |
| 1002 | 1033 | # > -------------------------------------------------------------------------- |
| 1003 | 1034 | # GRAFICO! |
| 1004 | 1035 | # -------------------------------------- | ... | ... |