Don't use crudini to get rhn server
crudini is not installed by default on Red Hat derivitive OS's, so we
shouldn't rely on it. We probably can't just install it since this
script is the rhel-registration script, so there are likely no repos
enabled when we need it.
Instead just use grep/cut/sed to get the value we need.
Change-Id: I78fce8b6c7f1d3528f9d8c02772f95cb8ad3b3c8
Closes-Bug: #1771830
(cherry picked from commit b4ff453f87
)
This commit is contained in:
parent
bb0b2a2397
commit
90cd669f78
|
@ -24,7 +24,8 @@ proxy_url=
|
|||
proxy_username=
|
||||
proxy_password=
|
||||
curl_opts="--retry-delay 10 --max-time 30 --retry ${retry_max_count} --cacert /etc/rhsm/ca/redhat-uep.pem"
|
||||
portal_test_url="https://$(crudini --get /etc/rhsm/rhsm.conf server hostname)/subscription/"
|
||||
server=$(grep '^hostname' /etc/rhsm/rhsm.conf | cut -d = -f2 | sed 's/\s//')
|
||||
portal_test_url="https://${server}/subscription/"
|
||||
|
||||
# process variables..
|
||||
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
|
||||
|
|
Loading…
Reference in New Issue