CLI parameter is not being replaced in if statement in JBoss EAP 6?

Solution Unverified - Updated -

Issue

  • I execute a simple CLI script:
/host=${HOST-01}:read-attribute(name="name")
if (result == "${HOST-01}") of /host=${HOST-01}:read-attribute(name="name")
   /host=${HOST-01}:write-attribute(name="name", value="${HOST-01}-test")
else
  /host=${HOST-01}:write-attribute(name="name", value="${HOST-01}")
end-if
/host=${HOST-01}:read-attribute(name="name")
  • It is not working for parameter "${HOST-01}" but working if I use hard coded value. What is the cause of this?
  • The same script is working using bash variables and not when using a properties file to pass parameter values. why?

Environment

  • Red Hat Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content