Createfile problems with substitution

(imported topic written by SystemAdmin)

I need to create a response file to do an automated uninstall of Veritas Volumne manager on Solaris.

I have to subsitute the bigfix value {computer name}, but there are other { } also in the file I need to create that are NOT bigfix substitutions. Is there another way to create this file?

createfile until __EOF

  1. Configuration Values:

our %CFG;

$CFG{opt}{uninstall}=1;

$CFG{prod}=“SF51”;

$CFG{systems}=

qw({computer name})

;

1;

__EOF

move __createfile /tmp/uninstall.response

(imported comment written by NoahSalzman)

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=1230

You need to escape the opening brace for the brace-pairs that are not supposed to be treated as Relevance.

createfile until __EOF

  1. Configuration Values:

our %CFG;

$CFG

{{

opt}

{{

uninstall}=1;

$CFG

{{

prod}=“SF51”;

$CFG

{{

systems}=

qw({computer name})

;

1;

__EOF

move __createfile /tmp/uninstall.response

(imported comment written by SystemAdmin)

I have another that does not seem to work with escaping… specifically the second line with computer name

Without the line with vm_restore_cfg… the others work

Command failed (Substitution failed while writing file) createfile until __EOF (fixlet 394)

createfile until __EOF

  1. Configuration Values:

our %CFG;

$CFG{{accepteula}=1;

$CFG{{opt}{{configure}=1;

$CFG{{opt}{{install}=1;

$CFG{{opt}{{installrecpkgs}=1;

$CFG{{prod}=“SF51”;

$CFG{{systems}=

qw({computer name})

;

$CFG{{vm_restore_cfg}{{{computer name}}=0;

1;

__EOF

move __createfile /tmp/install.response

Resulting file needs to look like this:

  1. Configuration Values:

our %CFG;

$CFG{accepteula}=1;

$CFG{opt}{configure}=1;

$CFG{opt}{install}=1;

$CFG{opt}{installrecpkgs}=1;

$CFG{prod}=“SF51”;

$CFG{systems}=

qw(uxwks201)

;

$CFG{vm_restore_cfg}{uxwks201}=0;

1;

(imported comment written by NoahSalzman)

Looks like the braces without spaces is confusing the parser because this works, but leaves spaces:

$CFG{{vm_restore_cfg}{{ {computer name} }=0;

I think this should be a suitable workaround:

$CFG{{vm_restore_cfg}{"%7B" & (computer name) & “%7D”}=0;

(imported comment written by SystemAdmin)

That worked!! Thank you…