Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/citrix/storefront.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2479 by niro, Thu Sep 10 08:48:45 2015 UTC revision 2593 by niro, Fri Sep 18 12:24:18 2015 UTC
# Line 39  help_storefront_session() Line 39  help_storefront_session()
39   mecho "                if no [name] given, all sessions will be deleted"   mecho "                if no [name] given, all sessions will be deleted"
40   mecho   mecho
41   mecho "   session    - name of the Citrix session"   mecho "   session    - name of the Citrix session"
42     mecho "   store_uri  - storefront store uri"
43   mecho "   user       - user inside the session - optional"   mecho "   user       - user inside the session - optional"
44   mecho "   domain     - logon domain of the user - optional"   mecho "   domain     - logon domain of the user - optional"
45   mecho "   password   - password of the user - optional"   mecho "   password   - password of the user - optional"
# Line 49  set_storefront_session() Line 50  set_storefront_session()
50   local action="${CLASS_ARGV[0]}"   local action="${CLASS_ARGV[0]}"
51   local name="${CLASS_ARGV[1]}"   local name="${CLASS_ARGV[1]}"
52   local session="${CLASS_ARGV[2]}"   local session="${CLASS_ARGV[2]}"
53   local user="${CLASS_ARGV[3]}"   local store_uri="${CLASS_ARGV[3]}"
54   local domain="${CLASS_ARGV[4]}"   local user="${CLASS_ARGV[4]}"
55   local password="${CLASS_ARGV[5]}"   local domain="${CLASS_ARGV[5]}"
56     local password="${CLASS_ARGV[6]}"
57   local i   local i
58    
59   [[ -z ${action} ]] && help_storefront_session && return 1   [[ -z ${action} ]] && help_storefront_session && return 1
# Line 62  set_storefront_session() Line 64  set_storefront_session()
64   [[ -z ${name} ]] && help_storefront_session && return 1   [[ -z ${name} ]] && help_storefront_session && return 1
65   # and session   # and session
66   [[ -z ${session} ]] && help_storefront_session && return 1   [[ -z ${session} ]] && help_storefront_session && return 1
67     # and storefront uri
68     [[ -z ${store_uri} ]] && help_storefront_session && return 1
69    
70   # create storefront session starter   # create storefront session starter
71   ${MCORE_LIBDIR}/storefront-session \   ${MCORE_LIBDIR}/storefront-session \
72   --add \   --add \
73   --name "${name}" \   --name "${name}" \
74   --session "${session}" \   --session "${session}" \
75     --store_uri "${store_uri}" \
76   --user "${user}" \   --user "${user}" \
77   --domain "${domain}" \   --domain "${domain}" \
78   --password "${password}"   --password "${password}"
# Line 114  get_storefront_session() Line 119  get_storefront_session()
119   esac   esac
120  }  }
121    
122    #set_storefront_store()
123    #{
124     #local action="${CLASS_ARGV[0]}"
125     #local store="${CLASS_ARGV[1]}"
126     #local i
127    
128     #[[ -z ${action} ]] && help_storefront_store && return 1
129    
130     #case "${action}" in
131     #add) x11runas "${MCORE_LIBDIR}/storefront-resolver --addstore --store '${store}'" ;;
132     #del)
133     #if [[ -n ${store} ]]
134     #then
135     #x11runas "${MCORE_LIBDIR}/storefront-resolver --delstore --store '${store}'"
136     #else
137     ## delete all items
138     #for i in $(x11runas "NOCOLORS=1 ${MCORE_LIBDIR}/storefront-resolver --liststore")
139     #do
140     #x11runas "${MCORE_LIBDIR}/storefront-resolver --delstore --store '${i}'"
141     #done
142     #fi
143     #;;
144     #*) help_storefront_store && return 1 ;;
145     #esac
146    #}
147    
148    #get_storefront_store()
149    #{
150     #x11runas "${MCORE_LIBDIR}/storefront-resolver --liststore"
151    #}
152    
153  set_storefront_store()  set_storefront_store()
154  {  {
155   local action="${CLASS_ARGV[0]}"   local action="${CLASS_ARGV[0]}"
# Line 123  set_storefront_store() Line 159  set_storefront_store()
159   [[ -z ${action} ]] && help_storefront_store && return 1   [[ -z ${action} ]] && help_storefront_store && return 1
160    
161   case "${action}" in   case "${action}" in
162   add) x11runas "${MCORE_LIBDIR}/storefront-resolver --addstore --store '${store}'" ;;   add)
163     [[ -z ${store} ]] && help_storefront_store && return 1
164     ${MCORE_LIBDIR}/storefront-store --add --store "${store}"
165     ;;
166    
167   del)   del)
168   if [[ -n ${store} ]]   if [[ -n ${store} ]]
169   then   then
170   x11runas "${MCORE_LIBDIR}/storefront-resolver --delstore --store '${store}'"   ${MCORE_LIBDIR}/storefront-store --del --store "${store}"
171   else   else
172   # delete all items   # delete all items
173   for i in $(x11runas "NOCOLORS=1 ${MCORE_LIBDIR}/storefront-resolver --liststore")   ${MCORE_LIBDIR}/storefront-store --del
  do  
  x11runas "${MCORE_LIBDIR}/storefront-resolver --delstore --store '${i}'"  
  done  
174   fi   fi
175   ;;   ;;
176    
177   *) help_storefront_store && return 1 ;;   *) help_storefront_store && return 1 ;;
178   esac   esac
179  }  }
180    
181  get_storefront_store()  get_storefront_store()
182  {  {
183   x11runas "${MCORE_LIBDIR}/storefront-resolver --liststore"   ${MCORE_LIBDIR}/storefront-store --print
184  }  }

Legend:
Removed from v.2479  
changed lines
  Added in v.2593