Forum Discussion
bigben932_22424
Feb 01, 2016Altostratus
Ahh thanks for the info Fred. I have found our issue. It appears that an old template file was being used. I took a look at the new template file, and compared it to an older working version I had backed up and noticed where our issue was. I implemented the changes, and notified our development staff to use this new template file.
Let me post snippet the code which solves this issue:
Old:
proc move_files_to_apm {xml_file html_file} {
set fh [open my_script w]
puts $fh "
Moving configuration file and html template to the APM:
tmsh modify apm resource sandbox hosted-content { files add {\
$xml_file { folder /AppletInstall local-path /var/tmp/$xml_file }}} 2>/dev/null
inl_errno=\$?
echo \"call 1:\$inl_errno\"
if \[ \$inl_errno -ne 0 \]; then
tmsh modify apm resource sandbox hosted-content { files modify {\
$xml_file { folder /AppletInstall local-path /var/tmp/$xml_file }}}
inl_errno=\$?
echo \"call 1a:\$inl_errno\"
if \[ \$inl_errno -ne 0 \]; then
exit \$inl_errno
fi
fi
New: proc move_files_to_apm {xml_file html_file} {
set fh [open my_script w]
set partition [lindex [split [tmsh::pwd] /] 1]
adding this parameter and using the variable in the tmsh modify apm.... Solved our problem
puts $fh "
Moving configuration file and html template to the APM:
tmsh modify apm resource sandbox /$partition/hosted-content { files add {\
$xml_file { folder /AppletInstall local-path /var/tmp/$xml_file }}} 2>/dev/null
inl_errno=\$?
echo \"call 1:\$inl_errno\"
if \[ \$inl_errno -ne 0 \]; then
tmsh modify apm resource sandbox /$partition/hosted-content { files modify {\
$xml_file { folder /AppletInstall local-path /var/tmp/$xml_file }}}
inl_errno=\$?
echo \"call 1a:\$inl_errno\"
if \[ \$inl_errno -ne 0 \]; then
exit \$inl_errno
fi
fi
Thank for the help Fred.