Your script checks if $xen holds anything. If it is empty this check will fail and the Else statement will be executed. You need to put something in it to get a successful check. If you just do an If $xen check and $xen is null (as in empty) the check will never be true and the following lines will not be executed. It will skip to the Else statement if there is an Else statement.
I do not have a xen server to test with but it should be possible to see that the client in on a xen server and executed whatever is needed for xen sessions.
If you start a xen session and check all environment variables from the command line there might be one or more that can be used to determine if it is a xen session or not. Another option can be to check if one or more specific xen server files exist or if the hostname is your xen server. Once this is done you can get the client name and connect the printers they need and do all other stuff that needs to be done for the people.
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.