http://defect.opensolaris.org/bz/show_bug.cgi?id=9254





--- Comment #3 from Anurag S. Maskey <Anurag.Maskey at Sun.COM>  2009-06-02 
05:48:52 ---
(In reply to comment #2)
> how to produce it in one command line instead of interactive mode?
> such as:
> # nwamcfg "create enm enm1; set activation-mode=conditional-all; set
> conditions=\"\"loc loc1 is active\", \"loc loc2 is active\"\""
> 
> however it report "syntax error at 'enm'"

I am not seeing the syntax error at "enm", however, I do see a syntax error at
"loc".

bash-3.2# nwamcfg "create enm enm1; set activation-mode=conditional-all; set co
nditions=\"\"loc loc1 is active\", \"loc loc2 is active\"\""
syntax error at 'loc'
[...]

The error above is you have quoted the conditions twice.  It equivalent to
writing:

nwamcfg:enm:enm1> set conditions=""loc loc1 is active", "loc loc2 is active""

Each condition (which is a string) is individually quoted.  Also, there's no
space between the comma and the second condition.  (The lex parser uses spaces
as tokens.)

The correct sequence of commands is below:

bash-3.2# nwamcfg "create enm enm1; set activation-mode=conditional-all; set
conditions=\"loc loc1 is active\",\"loc loc2 is active\""
Commit error: entity is missing required member: 'fmri'

Let's set the "start" property rather than the "fmri" in this example.

bash-3.2# nwamcfg "create enm enm1; set activation-mode=conditional-all; set
conditions=\"loc loc1 is active\",\"loc loc2 is active\";set start=/foo"

bash-3.2# nwamcfg list enm enm1
ENM:enm1
        activation-mode conditional-all
        conditions      "loc loc1 is active","loc loc2 is active"
        start           "/foo"

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

Reply via email to