189 |
query) |
query) |
190 |
[[ -n ${PNABROWSE_EXECUTABLE} ]] || eecho "\$PNABROWSE_EXECUTABLE not defined" |
[[ -n ${PNABROWSE_EXECUTABLE} ]] || eecho "\$PNABROWSE_EXECUTABLE not defined" |
191 |
[[ -n ${PNABROWSE_CITRIX_BROWSER} ]] || eecho "\$PNABROWSE_CITRIX_BROWSER not defined" |
[[ -n ${PNABROWSE_CITRIX_BROWSER} ]] || eecho "\$PNABROWSE_CITRIX_BROWSER not defined" |
192 |
if [ -x ${MROOT}/opt/ica-client/util/pnabrowse ] |
if [ -x ${MROOT}/${PNABROWSE_EXECUTABLE} ] |
193 |
then |
then |
194 |
if [[ -n ${PNABROWSE_SESSION_EXCLUDE} ]] |
if [[ -n ${PNABROWSE_SESSION_EXCLUDE} ]] |
195 |
then |
then |
245 |
;; |
;; |
246 |
|
|
247 |
auto) |
auto) |
248 |
if [ -x ${MROOT}/opt/ica-client/util/pnabrowse ] |
[[ -n ${PNABROWSE_EXECUTABLE} ]] || eecho "\$PNABROWSE_EXECUTABLE not defined" |
249 |
|
[[ -n ${PNABROWSE_CITRIX_BROWSER} ]] || eecho "\$PNABROWSE_CITRIX_BROWSER not defined" |
250 |
|
if [ -x ${MROOT}/${PNABROWSE_EXECUTABLE} ] |
251 |
then |
then |
252 |
if [[ -n ${PNABROWSE_SERVER_EXCLUDE} ]] |
if [[ -n ${PNABROWSE_SERVER_EXCLUDE} ]] |
253 |
then |
then |
254 |
exclude="| grep -v '${PNABROWSE_SERVER_EXCLUDE}'" |
exclude="| grep -v '${PNABROWSE_SERVER_EXCLUDE}'" |
255 |
fi |
fi |
256 |
serverlist=( $(${MROOT}/opt/ica-client/util/pnabrowse -S ica ${exclude}) ) |
serverlist=( $(${MROOT}/${PNABROWSE_EXECUTABLE} -S ${PNABROWSE_CITRIX_BROWSER} ${exclude}) ) |
257 |
servercount="${#serverlist[*]}" |
servercount="${#serverlist[*]}" |
258 |
for (( i=0; i<servercount; i++)) |
for (( i=0; i<servercount; i++)) |
259 |
do |
do |
263 |
addconfig "${server}" |
addconfig "${server}" |
264 |
done |
done |
265 |
else |
else |
266 |
eecho "'${MROOT}/opt/ica-client/util/pnabrowse' executable not found." |
eecho "'${MROOT}/${PNABROWSE_SERVER_EXCLUDE}' executable not found." |
267 |
fi |
fi |
268 |
;; |
;; |
269 |
|
|
275 |
{ |
{ |
276 |
local action="$1" |
local action="$1" |
277 |
local server="$2" |
local server="$2" |
278 |
local serverlist+ *) help_citrix_session && return 1 ;; |
local serverlist |
279 |
local servercount |
local servercount |
280 |
local i |
local i |
281 |
local exclude |
local exclude |
284 |
|
|
285 |
case "${action}" in |
case "${action}" in |
286 |
print) |
print) |
287 |
list_files_in_directory ${MROOT}/${MCORE_CONFIG_PATH}/citrix/serverlist ;; |
list_files_in_directory ${MROOT}/${MCORE_CONFIG_PATH}/citrix/serverlist ;; |
288 |
query) |
query) |
289 |
[[ -n ${PNABROWSE_EXECUTABLE} ]] || eecho "\$PNABROWSE_EXECUTABLE not defined" |
[[ -n ${PNABROWSE_EXECUTABLE} ]] || eecho "\$PNABROWSE_EXECUTABLE not defined" |
290 |
[[ -n ${PNABROWSE_CITRIX_BROWSER} ]] || eecho "\$PNABROWSE_CITRIX_BROWSER not defined" |
[[ -n ${PNABROWSE_CITRIX_BROWSER} ]] || eecho "\$PNABROWSE_CITRIX_BROWSER not defined" |
291 |
if [ -x ${MROOT}/${PNABROWSE_EXECUTABLE} ] |
if [ -x ${MROOT}/${PNABROWSE_EXECUTABLE} ] |
292 |
then |
then |
293 |
serverlist=( $(${MROOT}/${PNABROWSE_EXECUTABLE} -S ${PNABROWSE_CITRIX_BROWSER}) ) |
if [[ -n ${PNABROWSE_SERVER_EXCLUDE} ]] |
294 |
|
then |
295 |
|
exclude="| grep -v '${PNABROWSE_SERVER_EXCLUDE}'" |
296 |
|
fi |
297 |
|
serverlist=( $(${MROOT}/${PNABROWSE_EXECUTABLE} -S ${PNABROWSE_CITRIX_BROWSER} ${exclude}) ) |
298 |
servercount="${#serverlist[*]}" |
servercount="${#serverlist[*]}" |
299 |
for (( i=0; i<servercount; i++)) |
for (( i=0; i<servercount; i++)) |
300 |
do |
do |