diff options
author | Volker Uhrig | 2008-05-15 19:11:57 +0200 |
---|---|---|
committer | Volker Uhrig | 2008-05-15 19:11:57 +0200 |
commit | 2e9afefac0cb6c6134e12d6921ea9d4acae49e9f (patch) | |
tree | 1c82509aa42bdac69f0ef8b34bbdd700de1abb9d /os-plugins | |
parent | * Added usage of stage1 attributes (diff) | |
download | core-2e9afefac0cb6c6134e12d6921ea9d4acae49e9f.tar.gz core-2e9afefac0cb6c6134e12d6921ea9d4acae49e9f.tar.xz core-2e9afefac0cb6c6134e12d6921ea9d4acae49e9f.zip |
* get needed data from xml file when vmchooser got changed
not tested yet
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1770 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/vmware/files/runvmware-player-v1 | 44 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/runvmware-player-v2 | 44 |
2 files changed, 58 insertions, 30 deletions
diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v1 b/os-plugins/plugins/vmware/files/runvmware-player-v1 index eaa35b0e..a3330bf5 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v1 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v1 @@ -2,6 +2,8 @@ # # Description: Script for preparing VMware environment Diskless # X Stations and interactive session chooser (v4) +# Gets a xml file, reads needed information from it and +# orwards it into B drive of vmplayer # # Author(s): see project authors file # letzte Ă„nderung Volker, 17 .Feb 2008 @@ -11,6 +13,32 @@ # ################################################################################ +################################################################################ +## +## Read needed variables from XML file +## +################################################################################ +$xml = $1 + +# file name of the image +imagename=$(grep -i "<image_name param=\"" ${xml} | awk -F "\"" '{ print $2 }') + +# define name for VMware window. no utf8, perhaps we don't need it any +# more. else change the next two lines +#iconv -c -f utf-8 -t utf-8 < ${xml} > ${xml}.utf +short_description=$(grep "short_description param=\"" ${xml} + sed -e "s%&.*;%; %g" | awk -F "\"" '{print $2}') +# if ${short_description} not defined use ${image} +short_description=${short_description:-"${image}"} +displayname=${short_description} + +# Definition of the client system +vmostype=$(grep -i "<os param=\"" ${xml} | awk -F "\"" '{ print $2 }') + +# Definition of the client system +network_kind=$(grep -i "<network param=\"" ${xml} | awk -F "\"" '{ print $2 }') + + ################################################################################ ## @@ -117,8 +145,6 @@ filecheck= ## Image depending variables. This values will be changed by the script # vmware image file -#imagename="CHANGEIT" -imagename="$1" diskfile="${vmdir}/${imagename}" #TODO: check for a faster way, perhaps we should put this into XML @@ -141,18 +167,6 @@ diskfile="${vmdir}/${imagename}" # scsi="TRUE" #fi -# define name for VMware window -#displayname="CHANGEIT" -displayname="$2" - -# Definition of the client system -#vmostype="CHANGEIT" -vmostype="$3" - -# Definition of the client system -#network="CHANGEIT" -network="$4" - # command line variables # start with this this default commmand line options + extra @@ -281,7 +295,7 @@ runvmwareconfheader () ###### nics ################################################################## ethernet0.present = \"TRUE\" ethernet0.addressType = \"static\" - ethernet0.connectionType = \"${network}\" + ethernet0.connectionType = \"${network_kind}\" ethernet0.address = \"00:50:56:0D:${mac}\" ###### sound ################################################################# diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v2 b/os-plugins/plugins/vmware/files/runvmware-player-v2 index eaa35b0e..a3330bf5 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v2 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v2 @@ -2,6 +2,8 @@ # # Description: Script for preparing VMware environment Diskless # X Stations and interactive session chooser (v4) +# Gets a xml file, reads needed information from it and +# orwards it into B drive of vmplayer # # Author(s): see project authors file # letzte Ă„nderung Volker, 17 .Feb 2008 @@ -11,6 +13,32 @@ # ################################################################################ +################################################################################ +## +## Read needed variables from XML file +## +################################################################################ +$xml = $1 + +# file name of the image +imagename=$(grep -i "<image_name param=\"" ${xml} | awk -F "\"" '{ print $2 }') + +# define name for VMware window. no utf8, perhaps we don't need it any +# more. else change the next two lines +#iconv -c -f utf-8 -t utf-8 < ${xml} > ${xml}.utf +short_description=$(grep "short_description param=\"" ${xml} + sed -e "s%&.*;%; %g" | awk -F "\"" '{print $2}') +# if ${short_description} not defined use ${image} +short_description=${short_description:-"${image}"} +displayname=${short_description} + +# Definition of the client system +vmostype=$(grep -i "<os param=\"" ${xml} | awk -F "\"" '{ print $2 }') + +# Definition of the client system +network_kind=$(grep -i "<network param=\"" ${xml} | awk -F "\"" '{ print $2 }') + + ################################################################################ ## @@ -117,8 +145,6 @@ filecheck= ## Image depending variables. This values will be changed by the script # vmware image file -#imagename="CHANGEIT" -imagename="$1" diskfile="${vmdir}/${imagename}" #TODO: check for a faster way, perhaps we should put this into XML @@ -141,18 +167,6 @@ diskfile="${vmdir}/${imagename}" # scsi="TRUE" #fi -# define name for VMware window -#displayname="CHANGEIT" -displayname="$2" - -# Definition of the client system -#vmostype="CHANGEIT" -vmostype="$3" - -# Definition of the client system -#network="CHANGEIT" -network="$4" - # command line variables # start with this this default commmand line options + extra @@ -281,7 +295,7 @@ runvmwareconfheader () ###### nics ################################################################## ethernet0.present = \"TRUE\" ethernet0.addressType = \"static\" - ethernet0.connectionType = \"${network}\" + ethernet0.connectionType = \"${network_kind}\" ethernet0.address = \"00:50:56:0D:${mac}\" ###### sound ################################################################# |