I am very new to the concept of perl wrapper. I need to know more about it, and i also need to understand how can i include a perl wrapper in a tpl to run some CLTs. Can someone please give me links to site/docs which can help me learn and write/use wrapper functionality.ThanksDixit TS 6.5 SP3 Win 2000
To run clts in tpl you can do it within the iw_perl tag of tpl, run the command within backticks(`)
Thanks, I know that we can run the CLTs from iw-perl tag, but there is certain requirement/scenario/permission issues, which i need to tackle.I need to read certain external attributes of files from another branch where the user does not have any kind of access. So i was thinking if this can be achieved using a wrapper. Just contemplating an option.ThanksAmit
Hi Amit,I am not sure if i understand your requirement. But if you want to execute a Perl script to perform some actions (like reading ext attr) within your tpl, you can iw_system to execute perl script orexecute pm function within your iw_perl tag.
Can you please give me a reference for iw_system , which u mentioned in the previous post.Thanks Amit
http://your-ts-server/iw/help/tst
You can either look at http://your-ts-server/iw/help/tst - and from there look at the various directives that are available - or from the command line run iwperldoc TeamSite:T::iw_system.However, I'm not sure if iw_system will force the script to be run as SYSTEM (please report back your findings) - if you're unsure - make a simple Perl script that creates a temporary log file and dumps the complete contents of %ENV into it. The owner of the file should either be the logged in user or a system account, the contents of the file should also help to determine "who" is running the script.
The other "solution" is to adjust the access on this other file (either directly or by moving it to a more general location if possible) such that all users would have READ access to it.
Adam, This solution wont fit into the business rules, the ownership of this branch lies with an external group, and access to this cannot be altered. However, writing the external attributes to another readable area was possible, but business, due to some "un explainable/quaotable reason", is not ready to go ahead with that. -Amit
The test output of the script (to dump %ENV info) is to verify the owner of the process that is invoked from iw_system. If it turns out to be the logged in user - you're still stuck with the same problem. If it turns out not to be the logged in user - then it provides a likely way to get around the issue without having to move the file or change the access on it.A convoluted method would be to kick off a no-op deployment with a DNR script (which I believe runs by default as SYSTEM - or can be set explicitly to do so?) and have that script retrieve the information into a temporary files (passed in on the command line as a parameter) and then after the deployment is done retrieve those values from that temporary file -- definitely a kludge - but if it's the only way to achieve what you need - do it and document the **** out of it.
Thanks Adam,Will be on it. However if I come back to the concept of perl wrapper, which i mentioned in my first step, I want to understand can a wrapper be used somehow to solve the issue. But before that i need to understand what exactly a wrapper can do. I read in the manuals that iw_cgi_wrapper.cgi is used for impersonization of TEamsite. Can you throw little more light on a perl wrapper(not cgi wrapper), or it would be great if U could provide me some links on it.ThanksAmit