From e9da0bc5afae832010e174688df20defc314d852 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Nov 2013 14:10:10 +0100 Subject: [vmchooser] Change path specs --- .../data/opt/openslx/etc/vmchooser/openslx.exe | Bin 12800 -> 0 bytes .../data/opt/openslx/etc/vmchooser/smb.conf | 25 --------------------- .../data/opt/openslx/etc/vmchooser/vmchooser.conf | 4 ---- .../themes/bwlehrpool/bwlehrpool-left.png | Bin 5361 -> 0 bytes .../themes/bwlehrpool/bwlehrpool-right.png | Bin 3390 -> 0 bytes .../vmchooser/themes/bwlehrpool/bwlehrpool.ini | 4 ---- .../vmchooser/themes/openslx/openslx-left.png | Bin 9187 -> 0 bytes .../vmchooser/themes/openslx/openslx-right.png | Bin 3390 -> 0 bytes .../usr/share/vmchooser/themes/openslx/openslx.ini | 4 ---- .../vmchooser/themes/planets/planets-left.png | Bin 11337 -> 0 bytes .../vmchooser/themes/planets/planets-right.png | Bin 3082 -> 0 bytes .../usr/share/vmchooser/themes/planets/planets.ini | 4 ---- .../data/opt/openslx/vmchooser/config/smb.conf | 25 +++++++++++++++++++++ .../opt/openslx/vmchooser/config/vmchooser.conf | 4 ++++ .../data/opt/openslx/vmchooser/data/openslx.exe | Bin 0 -> 12800 bytes .../themes/bwlehrpool/bwlehrpool-left.png | Bin 0 -> 5361 bytes .../themes/bwlehrpool/bwlehrpool-right.png | Bin 0 -> 3390 bytes .../vmchooser/themes/bwlehrpool/bwlehrpool.ini | 4 ++++ .../vmchooser/themes/openslx/openslx-left.png | Bin 0 -> 9187 bytes .../vmchooser/themes/openslx/openslx-right.png | Bin 0 -> 3390 bytes .../openslx/vmchooser/themes/openslx/openslx.ini | 4 ++++ .../vmchooser/themes/planets/planets-left.png | Bin 0 -> 11337 bytes .../vmchooser/themes/planets/planets-right.png | Bin 0 -> 3082 bytes .../openslx/vmchooser/themes/planets/planets.ini | 4 ++++ remote/modules/vmchooser/vmchooser.build | 4 ++-- .../opt/openslx/etc/vmchooser/vmchooser.conf | 4 ---- .../usr/share/vmchooser/themes/unifr/title_l.png | Bin 17458 -> 0 bytes .../usr/share/vmchooser/themes/unifr/title_r.png | Bin 4113 -> 0 bytes .../usr/share/vmchooser/themes/unifr/unifr.ini | 4 ---- .../opt/openslx/vmchooser/config/vmchooser.conf | 4 ++++ .../opt/openslx/vmchooser/themes/unifr/title_l.png | Bin 0 -> 17458 bytes .../opt/openslx/vmchooser/themes/unifr/title_r.png | Bin 0 -> 4113 bytes .../opt/openslx/vmchooser/themes/unifr/unifr.ini | 4 ++++ 33 files changed, 51 insertions(+), 51 deletions(-) delete mode 100755 remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe delete mode 100644 remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf delete mode 100644 remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png delete mode 100644 remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf create mode 100755 remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png create mode 100644 remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini delete mode 100644 server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf delete mode 100644 server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png delete mode 100644 server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png delete mode 100644 server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini create mode 100644 server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf create mode 100644 server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png create mode 100644 server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png create mode 100644 server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini diff --git a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe b/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe deleted file mode 100755 index e016f407..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf b/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf deleted file mode 100644 index ec757ce4..00000000 --- a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf +++ /dev/null @@ -1,25 +0,0 @@ -# basic samba configuration file for OpenSLX host-internal networking -[global] - workgroup = OPENSLX - netbios name = HOMESERVER - security = SHARE - server string = Home and Print Provider - bind interfaces only = Yes - interfaces = NWIF - pid directory = PIDDIR - -[userhome] - comment = Home Directory of USER - path = /home/USER - create mask = 0700 - guest ok = No - read only = No - -[scratch] - comment = Host System Temp Folder - path = /tmp - create mask = 0700 - guest ok = Yes - read only = No - browseable = Yes - diff --git a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf b/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf deleted file mode 100644 index 203f125b..00000000 --- a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf +++ /dev/null @@ -1,4 +0,0 @@ -pool=default -theme=bwlehrpool -pvs=0 -path=/mnt/vmstore diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png deleted file mode 100644 index c9d8ab0d..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png deleted file mode 100644 index 8ca9347b..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini deleted file mode 100644 index 90d00617..00000000 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini +++ /dev/null @@ -1,4 +0,0 @@ -background-color=#ffffff -image-right=bwlehrpool-right.png -image-left=bwlehrpool-left.png - diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png deleted file mode 100644 index 900dd867..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png deleted file mode 100644 index 8ca9347b..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini deleted file mode 100644 index 57a22821..00000000 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini +++ /dev/null @@ -1,4 +0,0 @@ -background-color=#ffffff -image-right=openslx-right.png -image-left=openslx-left.png - diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png deleted file mode 100644 index c8736b72..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png deleted file mode 100644 index e21f0d8b..00000000 Binary files a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png and /dev/null differ diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini b/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini deleted file mode 100644 index d9aa17f6..00000000 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini +++ /dev/null @@ -1,4 +0,0 @@ -background-color=#ffffff -image-right=planets-right.png -image-left=planets-left.png - diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf new file mode 100644 index 00000000..ec757ce4 --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf @@ -0,0 +1,25 @@ +# basic samba configuration file for OpenSLX host-internal networking +[global] + workgroup = OPENSLX + netbios name = HOMESERVER + security = SHARE + server string = Home and Print Provider + bind interfaces only = Yes + interfaces = NWIF + pid directory = PIDDIR + +[userhome] + comment = Home Directory of USER + path = /home/USER + create mask = 0700 + guest ok = No + read only = No + +[scratch] + comment = Host System Temp Folder + path = /tmp + create mask = 0700 + guest ok = Yes + read only = No + browseable = Yes + diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf new file mode 100644 index 00000000..203f125b --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf @@ -0,0 +1,4 @@ +pool=default +theme=bwlehrpool +pvs=0 +path=/mnt/vmstore diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe new file mode 100755 index 00000000..e016f407 Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png new file mode 100644 index 00000000..c9d8ab0d Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png new file mode 100644 index 00000000..8ca9347b Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini new file mode 100644 index 00000000..90d00617 --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini @@ -0,0 +1,4 @@ +background-color=#ffffff +image-right=bwlehrpool-right.png +image-left=bwlehrpool-left.png + diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png new file mode 100644 index 00000000..900dd867 Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png new file mode 100644 index 00000000..8ca9347b Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini new file mode 100644 index 00000000..57a22821 --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini @@ -0,0 +1,4 @@ +background-color=#ffffff +image-right=openslx-right.png +image-left=openslx-left.png + diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png new file mode 100644 index 00000000..c8736b72 Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png new file mode 100644 index 00000000..e21f0d8b Binary files /dev/null and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png differ diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini new file mode 100644 index 00000000..d9aa17f6 --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini @@ -0,0 +1,4 @@ +background-color=#ffffff +image-right=planets-right.png +image-left=planets-left.png + diff --git a/remote/modules/vmchooser/vmchooser.build b/remote/modules/vmchooser/vmchooser.build index 0e68eea1..58f5986e 100644 --- a/remote/modules/vmchooser/vmchooser.build +++ b/remote/modules/vmchooser/vmchooser.build @@ -13,9 +13,9 @@ build() { # patch globals.cpp and globals.h to use standardised paths /opt/openslx/... if ! grep -q VMCHOOSER_SCRIPTS_PATH "$SRCDIR/src/globals.h"; then sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"/g' "${SRCDIR}"/src/globals.h - sed -i 's/^#define VMCHOOSER_ETC_BASE_PATH.*/#define VMCHOOSER_ETC_BASE_PATH "\/opt\/openslx\/etc\/vmchooser"/g' "${SRCDIR}"/src/globals.h + sed -i 's/^#define VMCHOOSER_ETC_BASE_PATH.*/#define VMCHOOSER_ETC_BASE_PATH "\/opt\/openslx\/vmchooser\/config"/g' "${SRCDIR}"/src/globals.h sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"\n#define VMCHOOSER_SCRIPTS_PATH "\/opt\/openslx\/scripts"/g' "${SRCDIR}"/src/globals.h - sed -i 's/^#define VMCHOOSER_THEME_BASE.*/#define VMCHOOSER_THEME_BASE "\/opt\/openslx\/usr\/share\/vmchooser\/themes"/g' "${SRCDIR}"/src/globals.h + sed -i 's/^#define VMCHOOSER_THEME_BASE.*/#define VMCHOOSER_THEME_BASE "\/opt\/openslx\/vmchooser\/themes"/g' "${SRCDIR}"/src/globals.h sed -i 's/^QString binPath(VMCHOOSER_BIN_PATH);/QString binPath(VMCHOOSER_BIN_PATH);\nQString scriptsPath(VMCHOOSER_SCRIPTS_PATH);/g' "${SRCDIR}"/src/globals.cpp sed -i 's/^QString runVmScript(binPath + "\/run-virt.sh");/QString runVmScript(scriptsPath + "\/vmchooser-run_virt");/g' "${SRCDIR}"/src/globals.cpp diff --git a/server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf b/server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf deleted file mode 100644 index e436587e..00000000 --- a/server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf +++ /dev/null @@ -1,4 +0,0 @@ -pool=default -theme=unifr -pvs=0 -path=/mnt/vmstore diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png b/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png deleted file mode 100644 index e602ccd1..00000000 Binary files a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png and /dev/null differ diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png b/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png deleted file mode 100644 index 3edbcb0c..00000000 Binary files a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png and /dev/null differ diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini b/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini deleted file mode 100644 index dadcb4e1..00000000 --- a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini +++ /dev/null @@ -1,4 +0,0 @@ -background-color=#003592 -image-right=title_r.png -image-left=title_l.png - diff --git a/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf new file mode 100644 index 00000000..e436587e --- /dev/null +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf @@ -0,0 +1,4 @@ +pool=default +theme=unifr +pvs=0 +path=/mnt/vmstore diff --git a/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png new file mode 100644 index 00000000..e602ccd1 Binary files /dev/null and b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png differ diff --git a/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png new file mode 100644 index 00000000..3edbcb0c Binary files /dev/null and b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png differ diff --git a/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini new file mode 100644 index 00000000..dadcb4e1 --- /dev/null +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini @@ -0,0 +1,4 @@ +background-color=#003592 +image-right=title_r.png +image-left=title_l.png + -- cgit v1.2.3-55-g7522 From 97f5645a3a1a7cc54b02e07a536d63fc36d8454e Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 26 Nov 2013 14:11:02 +0100 Subject: [doc] setup_localization: First pass. Pleasepleaseplease add and comment! --- doc/setup_localization | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 doc/setup_localization diff --git a/doc/setup_localization b/doc/setup_localization new file mode 100644 index 00000000..519caf58 --- /dev/null +++ b/doc/setup_localization @@ -0,0 +1,84 @@ +Howto mltk localization system - config.tgz + + +1. General aspects + +The localization system is divided into config modules analogue to mltk build +modules. For differentiation these modules do not use the 'remote' directory +hierarchy but are to be found in the 'server' directory hierarchy at +.../tm-scripts/server/modules. + + +2. Naming convention + +Of course these modules, if being newly written, can be named at will, as +they will be included by links later on. Anyway we would recommend to follow +our established naming scheme to produce informative names. + +We recommend to use dual branched names connected by hyphens. First part of +the name should be the system part to be changed; the second part should +denominate the place/location the change applies to. + +For example a module changing PAM for the needs of the university of Freiburg +should be named pam-freiburg (as it is), or pam-uni_freiburg, or perhaps even +pam-uni_freiburg_rz. + + +3. Module activation + +mltk expects different configurations (localizations) in the directory tree +at .../tm-scripts/server/configs/. The name of a subdirectory there will be +used as parameter for mltk to pack a local configuration later on. + +So let's use the configuration 'freiburg' as an example. As mentioned the +configuration directory would be .../tm-scripts/server/configs/freiburg. The +modules for that configuration reside in .../tm-scripts/server/modules. These +modules needed are, then, activated by links: +branding-freiburg -> ../../modules/branding-freiburg/, +cups-freiburg -> ../../modules/cups-freiburg/, +pam-freiburg -> ../../modules/pam-freiburg/ +etc. + + +4. Module internals + +As said the modules have their place at server/modules/[module name]. It is +compulsive to mirror the system directory structure exactly. If, for example, +the module pam-freiburg of configuration freiburg includes a file ldap.conf, +this file must be placed at +.../tm-scripts/server/modules/freiburg/pam-freiburg/etc/ldap.conf. + + +5. About Packaging / Packing + +The directories linked as mentioned above will be archived directory by +directory using tar and gzip (.tgz). The single archives will be merged +using tar's append function. +It is important to note that, if a file occurs more than once or otherwise +conflicts, mltk will output a warning and then terminate. + + +6. Usage + +A given IP adress is used for determining the placing of an archive, as IP +adresses are reflected in directory structure (see doc/setup_howto for +examples). + +So executing +# ./mltk server [IP-Adress or 'local'] -k [config-name] +with config name as directory name at .../tm-scripts/server/configs/[dirname] +will yield a config.tgz placed in +.../tm-scripts/server/boot/[IP/local]/configs/[dirname]/config.tgz. + +This config.tgz file should be copied to or linked in the appropriate boot +web server directory. + + +7. Caveat + +Is it important to keep in mind that +- exactly the same paths as in the system are used in config module folders, + so no usage of data directories or the like is allowed, and, +- if a file appears in the system, e.g. in Stage 3.2, it will be overwritten + at boot time by a file having the same name and path file from config.tgz. + -- cgit v1.2.3-55-g7522 From 904f0303e04cd0a0356b069c42a24d42ccd31b92 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Nov 2013 15:04:02 +0100 Subject: More path changes... Might not be complete yet --- .../data/opt/openslx/scripts/systemd-vmchooser_env | 56 +- .../data/opt/openslx/scripts/vmchooser-run_virt | 23 +- .../data/opt/openslx/vmchooser/data/openslx.exe | Bin 12800 -> 12800 bytes .../modules/vmware/data/opt/openslx/bin/vmplayer | 10 +- remote/modules/vmware/data/opt/openslx/bin/vmware | 12 +- .../vmware/data/opt/openslx/etc/vmware/nvram | Bin 8664 -> 0 bytes .../data/opt/openslx/etc/vmware/run-virt.include | 644 --------------------- .../vmware/data/opt/openslx/etc/vmware/vmware.conf | 8 - .../data/opt/openslx/scripts/systemd-vmware_env | 77 +-- .../vmware/data/opt/openslx/vmchooser/vmware/nvram | Bin 0 -> 8664 bytes .../opt/openslx/vmchooser/vmware/run-virt.include | 644 +++++++++++++++++++++ .../data/opt/openslx/vmchooser/vmware/vmware.conf | 8 + 12 files changed, 723 insertions(+), 759 deletions(-) mode change 100755 => 120000 remote/modules/vmware/data/opt/openslx/bin/vmware delete mode 100644 remote/modules/vmware/data/opt/openslx/etc/vmware/nvram delete mode 100755 remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include delete mode 100644 remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf create mode 100644 remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram create mode 100644 remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include create mode 100644 remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env b/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env index 4119ad9c..167f1a96 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env @@ -11,23 +11,23 @@ hwinfo --cdrom | grep -i "Device File:" | awk {'print $3'} >/etc/openslx/hwinfo. hwinfo --floppy | grep -i "Device File:" | awk {'print $3'} >/etc/openslx/hwinfo.floppy #from plugins/vmchooser/XX_vmchooser.sh -VMCHOOSER_CONF_DIR=/opt/openslx/etc/vmchooser +VMCHOOSER_DIR="/opt/openslx/vmchooser" +VMCHOOSER_CONF_DIR="$VMCHOOSER_DIR/config" -mkdir -p ${VMCHOOSER_CONF_DIR}/loopimg -mkdir -p ${VMCHOOSER_CONF_DIR}/fd-loop -m 1777 +mkdir -p "${VMCHOOSER_DIR}/data/loopimg" +mkdir -p "${VMCHOOSER_DIR}/fd-loop" -m 1777 # mount a clean tempfs (bug in UnionFS prevents loopmount to work) grep -qE "unionfs |aufs " /proc/mounts && \ -mount -n -o size=1500k -t tmpfs vm-loopimg ${VMCHOOSER_CONF_DIR}/loopimg + mount -n -o size=1500k -t tmpfs vm-loopimg "${VMCHOOSER_DIR}/data/loopimg" # create an empty floppy image of 1.4MByte size -dd if=/dev/zero of=${VMCHOOSER_CONF_DIR}/loopimg/fd.img count=2880 bs=512 2>/dev/null -chmod 0777 ${VMCHOOSER_CONF_DIR}/loopimg/fd.img +dd "if=/dev/zero" "of=${VMCHOOSER_DIR}/data/loopimg/fd.img" count=2880 bs=512 2>/dev/null +chmod 0777 "${VMCHOOSER_DIR}/data/loopimg/fd.img" # use dos formatter copied into stage3 -mkdosfs ${VMCHOOSER_CONF_DIR}/loopimg/fd.img >/dev/null 2>&1 #|| error -mount -n -t msdos -o loop,umask=000 ${VMCHOOSER_CONF_DIR}/loopimg/fd.img \ - ${VMCHOOSER_CONF_DIR}/fd-loop +mkdosfs "${VMCHOOSER_DIR}/data/loopimg/fd.img" +mount -n -t msdos -o loop,umask=000 "${VMCHOOSER_DIR}/data/loopimg/fd.img" "${VMCHOOSER_DIR}/fd-loop" #pvs integration #if [ $vmchooser_pvs -ne 0 ]; then @@ -58,7 +58,7 @@ mkdir -p /var/log/samba #from plugins/vmchooser/80-after-plugins/virtualization.sh -# change free mem +# estimate free mem mem_free=$(grep -i "^memfree:" /proc/meminfo | awk '{print $2}') mem_cached=$(grep -i "^cached:" /proc/meminfo | awk '{print $2}') mem_swapcached=$(grep -i "^swapcached:" /proc/meminfo | awk '{print $2}') @@ -66,51 +66,51 @@ mem_swapcached=$(grep -i "^swapcached:" /proc/meminfo | awk '{print $2}') [ -z "$mem_cached" ] && mem_cached="0" [ -z "$mem_swapcached" ] && mem_swapcached="0" totalmem="$[ ( $mem_free + $mem_cached + $mem_swapcached ) / 1024 ]" -echo "totalmem=${totalmem}" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf +echo "totalmem=${totalmem}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" -# cpu cores +# determine number of cpu cores CPU_CORES=$(grep '^processor.*:' /proc/cpuinfo | wc -l) if [ "${CPU_CORES}" -gt "1" 2>/dev/null ]; then - echo "cpu_cores=${CPU_CORES}" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "cpu_cores=${CPU_CORES}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" else - echo 'cpu_cores=1' >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo 'cpu_cores=1' >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" fi # arch -echo "host_arch=$(uname -m)" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf +echo "host_arch=$(uname -m)" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" # VT enabled cpu? -if grep -q ^flags.*\\\ /proc/cpuinfo; then - echo "vtflag=1" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf - echo 'kvm_module="kvm_intel"' >> ${VMCHOOSER_CONF_DIR}/virtualization.conf - elif grep -q ^flags.*\\\ /proc/cpuinfo; then - echo "vtflag=1" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf - echo 'kvm_module="kvm_amd"' >> ${VMCHOOSER_CONF_DIR}/virtualization.conf +if grep -q '^flags.*\' "/proc/cpuinfo"; then + echo "vtflag=1" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" + echo 'kvm_module="kvm_intel"' >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" + elif grep -q '^flags.*\' "/proc/cpuinfo"; then + echo "vtflag=1" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" + echo 'kvm_module="kvm_amd"' >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" else - echo "vtflag=0" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "vtflag=0" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" fi # write mac if [ -n "$SLX_PXE_MAC" ]; then - echo "hostmacaddr=${SLX_PXE_MAC}" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "hostmacaddr=${SLX_PXE_MAC}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" else ## Fallback: - echo "hostmacaddr=$(ip a | grep ether | grep -o -E -i '([0-9a-f]{2}:){5}[0-9a-f]{2}' | head -n 1)" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "hostmacaddr=$(ip a | grep ether | grep -o -E -i '([0-9a-f]{2}:){5}[0-9a-f]{2}' | head -n 1)" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" fi # ip addr -echo "hostip=${SLX_PXE_CLIENT_IP}" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf +echo "hostip=${SLX_PXE_CLIENT_IP}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" # hostname -echo "hostname=${SLX_HOSTNAME}" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf +echo "hostname=${SLX_HOSTNAME}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" # get further hw information j=0 for i in $(cat /etc/openslx/hwinfo.cdrom); do - echo "cdrom_$j=$i" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "cdrom_$j=$i" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" j=$(expr $j + 1) done j=0 for i in $(cat /etc/openslx/hwinfo.floppy); do - echo "floppy_$j=$i" >> ${VMCHOOSER_CONF_DIR}/virtualization.conf + echo "floppy_$j=$i" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" j=$(expr $j + 1) done diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index a5bb735d..5c85dfcd 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -22,12 +22,15 @@ ### Define default dirs / get configs ################################################################################ +VMCHOOSER_DIR="/opt/openslx/vmchooser" +VMCHOOSER_CONF_DIR="$VMCHOOSER_DIR/config" + # include general configuration from vmchooser -[ -f /opt/openslx/etc/vmchooser/vmchooser.conf ] && . /opt/openslx/etc/vmchooser/vmchooser.conf +[ -f "$VMCHOOSER_CONF_DIR/vmchooser.conf" ] && . "$VMCHOOSER_CONF_DIR/vmchooser.conf" # load general virtualization information -[ -f /opt/openslx/etc/vmchooser/virtualization.conf ] && . /opt/openslx/etc/vmchooser/virtualization.conf +[ -f "$VMCHOOSER_CONF_DIR/virtualization.conf" ] && . "$VMCHOOSER_CONF_DIR/virtualization.conf" # Load general openslx config -[ -f /opt/openslx/config ] && . /opt/openslx/config +[ -f "/opt/openslx/config" ] && . "/opt/openslx/config" ################################################################################ ### Functions used throughout the script @@ -39,7 +42,7 @@ writelog () { # write to stdout echo -e "$1" # log into file - echo -e "$1" >> ${LOGFILE} + echo -e "$1" >> "${LOGFILE}" } # Clean exit will be called at the end of this script @@ -380,7 +383,7 @@ fdtest=${floppy_0:+"TRUE"} # if $fdtest not set floppy0="FALSE", else "TRUE" floppy0=${fdtest:-"FALSE"} floppy1="TRUE" -floppy1name="/opt/openslx/etc/vmchooser/loopimg/fd.img" +floppy1name="$VMCHOOSER_DIR/data/loopimg/fd.img" # if $cdrom_0 from run-virt.include set then cdtest="TRUE" cdtest= cdtest=${cdrom_0:+"TRUE"} @@ -455,11 +458,11 @@ PID_LPD="$!" # Copy guest configuration (with added information) config.xml to be accessed # via virtual floppy -cp "$xmlfile" "/opt/openslx/etc/vmchooser/fd-loop/config.xml" +cp "$xmlfile" "$VMCHOOSER_DIR/fd-loop/config.xml" # Add another file with resolution information -xrandr | grep -o -E 'current\s*[0-9]+\s*x\s*[0-9]+' | cut -c 8- | sed -r 's/(\s|\t|\n)//g' | head -n 1 > "/opt/openslx/etc/vmchooser/fd-loop/hostres.txt" +xrandr | grep -o -E 'current\s*[0-9]+\s*x\s*[0-9]+' | cut -c 8- | sed -r 's/(\s|\t|\n)//g' | head -n 1 > "$VMCHOOSER_DIR/fd-loop/hostres.txt" # Add our magic openslx binary that sets the correct guest resolution -cp "/opt/openslx/etc/vmchooser/openslx.exe" "/opt/openslx/etc/vmchooser/fd-loop/" +cp "$VMCHOOSER_DIR/data/openslx.exe" "$VMCHOOSER_DIR/fd-loop/" # Try to use dnbd3 to access the image unset vm_diskfile @@ -503,13 +506,13 @@ fi writelog "Used diskfile: $vm_diskfile" # Get all virtual machine specific stuff from the respective include file -if [ ! -e "/opt/openslx/etc/${xmlvirt}/run-virt.include" ] ; then +if [ ! -e "$VMCHOOSER_DIR/$xmlvirt/run-virt.include" ] ; then writelog "Failed because of missing ${xmlvirt} plugin." cleanexit 1 fi self="${xmlvirt}" -. "/opt/openslx/etc/${xmlvirt}/run-virt.include" || writelog "Erroneous run-virt.include for $xmlvirt" +. "$VMCHOOSER_DIR/$xmlvirt/run-virt.include" || writelog "Erroneous run-virt.include for $xmlvirt" # start a windowmanager for easier handling # (expect problems w/ windows opening in background w/ vmware without wm) for dm in openbox kwin xfwm4 metacity blackbox twm fvwm2 ; do diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe index e016f407..13092874 100755 Binary files a/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe and b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe differ diff --git a/remote/modules/vmware/data/opt/openslx/bin/vmplayer b/remote/modules/vmware/data/opt/openslx/bin/vmplayer index 147f514f..0f7d9232 100755 --- a/remote/modules/vmware/data/opt/openslx/bin/vmplayer +++ b/remote/modules/vmware/data/opt/openslx/bin/vmplayer @@ -5,10 +5,12 @@ PREFIX=/usr/lib/vmware # depends on the vmware location # HACK: Let the OpenGL driver report s3tc capability even if not present, so 3D will be enabled export force_s3tc_enable=true -exec "$PREFIX"'/lib/wrapper-gtk24.sh' \ - "$PREFIX"'/lib' \ - "$PREFIX"'/bin/vmplayer' \ - "$PREFIX"'/libconf' "$@" +PROG=$(basename $0) + +exec "$PREFIX/lib/wrapper-gtk24.sh" \ + "$PREFIX/lib" \ + "$PREFIX/bin/$PROG" \ + "$PREFIX/libconf" "$@" diff --git a/remote/modules/vmware/data/opt/openslx/bin/vmware b/remote/modules/vmware/data/opt/openslx/bin/vmware deleted file mode 100755 index 1fe9b11d..00000000 --- a/remote/modules/vmware/data/opt/openslx/bin/vmware +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# radically simplified version of the original script vmplayer by VMware Inc. -PREFIX=/usr/lib/vmware # depends on the vmware location -exec "$PREFIX"'/lib/wrapper-gtk24.sh' \ - "$PREFIX"'/lib' \ - "$PREFIX"'/bin/vmware' \ - "$PREFIX"'/libconf' "$@" - - - - diff --git a/remote/modules/vmware/data/opt/openslx/bin/vmware b/remote/modules/vmware/data/opt/openslx/bin/vmware new file mode 120000 index 00000000..aa0b74b1 --- /dev/null +++ b/remote/modules/vmware/data/opt/openslx/bin/vmware @@ -0,0 +1 @@ +vmplayer \ No newline at end of file diff --git a/remote/modules/vmware/data/opt/openslx/etc/vmware/nvram b/remote/modules/vmware/data/opt/openslx/etc/vmware/nvram deleted file mode 100644 index 85125f1e..00000000 Binary files a/remote/modules/vmware/data/opt/openslx/etc/vmware/nvram and /dev/null differ diff --git a/remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include deleted file mode 100755 index e60d5a5b..00000000 --- a/remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include +++ /dev/null @@ -1,644 +0,0 @@ -# run-virt.include -# ----------------------------------------------------------------------------- -# Copyright (c) 2009..2012 - RZ Uni Freiburg -# Copyright (c) 2009..2013 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# run-virt.include -# - component for vmware/player of the vmchooser plugin run-virt.sh -################################################################################ - -# configuration writer functions -################################################################################ - -function clean_string () -{ - if [ "$#" -ge 1 ]; then - echo "$@" | tr '[A-Z]' '[a-z]' | tr -d '\t _./' - else - cat - | tr '[A-Z]' '[a-z]' | tr -d '\t _./' - fi -} - -vmostype=$(clean_string "$vmostype") - -runvmwareconfheader () -{ - echo "# This configuration file was generated by $0" > "$conffile" - - # does this makes sense? Depends on the VMworkstation in use - MAXMEM="9999999" - MAXCORES="4" - - # check for the ostype - # 1) memory limits - case "$vmostype" in - win31*|windows31*) - MAXMEM="32" - vmostype="win31" - ;; - winnt*|windowsnt*) - MAXMEM="1000" - vmostype="winnt" - ;; - win95*|windows95*) - MAXMEM="96" - vmostype="win95" - ;; - win98*|windows98*) - MAXMEM="384" - vmostype="win98" - ;; - winme*|windowsme*) - MAXMEM="384" - vmostype="winme" - ;; - win2000|windows2000|win2000pro*) - MAXMEM="4000" - vmostype="win2000pro" - ;; - win2000srv*|windows2000srv*|win2000serv*|windows2000serv*) - MAXMEM="4000" - vmostype="win2000serv" - ;; - win2000adv*|windows2000adv*|win2000dat*|windows2000dat*) - MAXMEM="8000" - vmostype="win2000advserv" - ;; - winnet*64|win*2003*64|windowsnet*64) - MAXMEM="8000" - vmostype="winnetstandard-64" - ;; - winnet*|win*2003*|windowsnet*) - MAXMEM="4000" - vmostype="winnetstandard" - ;; - winxphome*|windowsxphome*) - MAXMEM="4000" - vmostype="winxphome" - ;; - winxp*64|windowsxp*64) - MAXMEM="8000" - vmostype="winxppro-64" - ;; - winxp*|windowsxp*) - MAXMEM="4000" - vmostype="winxppro" - ;; - winvista*64|windowsvista*64) - MAXMEM="16000" - vmostype="winvista-64" - ;; - winvista*|windowsvista*) - MAXMEM="8000" - vmostype="winvista" - ;; - win7*64|windows7*64) - MAXMEM="32000" - vmostype="windows7-64" - ;; - win7*|windows7*) - MAXMEM="8000" - vmostype="windows7" - ;; - win*64) - MAXMEM="16000" - ;; - win*) - MAXMEM="8000" - ;; - dos|msdos*|ms-dos*) - MAXMEM="128" - vmostype="dos" - ;; - *64) - MAXMEM="123456" - ;; - *) - MAXMEM="8000" - ;; - esac - - # 2) other hardware + capabilities - shfolders="FALSE" - case "$vmostype" in - win31) - MAXCORES="1" - sound="sb16" - ;; - winnt) - MAXCORES="2" - sound="sb16" - ;; - win95|win98|winme) - MAXCORES="1" - ;; - win2000pro) # Don't know if Win 2000 supports shared folders, disabled to be safe - MAXCORES="2" - ;; - win2000serv) - MAXCORES="4" - ;; - win2000advserv) - MAXCORES="8" - ;; - winxphome) - MAXCORES="1" - shfolders="TRUE" - ;; - winxp*|winvista*|windows7*) - MAXCORES="4" - shfolders="TRUE" - ;; - winnet*) - shfolders="TRUE" - ;; - linux*|ubuntu*|suse*|debian*) - shfolders="TRUE" - ;; - macos*64) - MAXCORES="2" - vmostype="freebsd-64" - ;; - macos*) - MAXCORES="1" - vmostype="freebsd" - ;; - beos*) - vmostype="other" - ;; - # Unknown guestOS setting in .xml - use conservative defaults - *64) - vmostype="other-64" - ;; - *) - vmostype="other" - ;; - esac - - svga_autodetect="TRUE" - - real_core_count="$cpu_cores" - [ "$cpu_cores" -gt "$MAXCORES" ] && cpu_cores="$MAXCORES" - # It currently makes no sense to set the virtual number of cores - # to a different value than the virtual number of cores per virtual CPU. - cores_per_socket="$cpu_cores" - - if [ "x$shfolders" != "xFALSE" ]; then - ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"' - else - ENABLE_SHARE='' - fi - - [ "$mem" -ge "$MAXMEM" ] && mem="$MAXMEM" - [ "$hwver" -lt "7" -a "$mem" -gt "3500" ] && mem="3500" - - cap3d="WHAT IS THIS VAR USED FOR?" # helper var for loging output - - cat >> "$conffile" </dev/null 2>&1 -} - -preferencesheader () -{ - cat > "$vmhome/preferences" <> "$vmhome/preferences" <> "$vmhome/preferences" </dev/null 2>&1 -mkdir -p "$confdir" >/dev/null 2>&1 -mkdir -p "$vmhome/dndlogs" >/dev/null 2>&1 -touch "$vmhome/dndlogs/dndlog.conf" >/dev/null 2>&1 - -# create preferences -preferencesheader - -# create VMware startup file -runvmwareconfheader - -# link to conffile if confdir != redodir -ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1 - -# sync is needed to ensure that data is really written to virtual disk -sync - -# own nvram. We need it for floppy drive b, default nvram has just drive a -# TODO: optimize, currently kinda inefficient, too much copys, but we -# don't know which one is installed... -cp "/opt/openslx/etc/vmware/nvram" "$confdir/nvram" 2>/dev/null - - -# logging and stdout -################################################################################ - -# log script information -writelog "# File created by $0 (VMversion ${vmversion})\n# on $(date)\n" -## Edited for persistent mode. -writelog "Starting with ${diskmode} mode ...\n" -## - -# write all results to logfile -# log disksetup -writelog "Directories:" -writelog "\tConfdir:\t${confdir}" -writelog "\tConffile:\t${conffile}" -writelog "\tRedodir:\t${redodir}" -writelog "\tVMhome:\t\t${vmhome}" -writelog "\t/tmp info: \ -$(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')" -# hw setup -writelog "Hardware:" -writelog "\tMAC:\t\t00:50:56:${VM_ID}:${machostpart}" -if [ -n "${network_card}" ]; then - writelog "\tNet Adaptor:\t${network_card}" -fi -writelog "\tMem:\t\t${mem} MB" -# echo nur wenn hostmem gesetzt -[ -n "${hostmem}" ] && writelog "\tHostmem:\t${hostmem} MB" -writelog "\tMax. res.:\t${xres}x${yres}" -writelog "\tCD-ROM1:\t${cdrom0}" -writelog "\tCD-ROM2:\t${cdrom1}" -writelog "\tFloppy_A:\t${floppy0}" -if [ "${serial}" = "TRUE" ]; then - writelog "\tSerial Port:\t${serialdev}" -fi -if [ "${parallel}" = "TRUE" ]; then - writelog "\tParallel Port:\t${paraldev}" -fi -# image -writelog "Diskimage:" -writelog "\tDiskfile:\t${diskfile}" -writelog "\tDisktype:\t${hddrv}" -writelog "\tHWVersion:\t${hwver}" -writelog "\tVMostype:\t${vmostype}" -# misc -writelog "Misc:" -writelog "\tDisplayname:\t${displayname}" -if [ "${cap3d}" = "TRUE" -a "${enable3d}" = "TRUE" ]; then - writelog "\t3D Graphics:\tenabled" -fi -# empty line at end -writelog "" - - -# finally set env for run-virt.sh -################################################################################ - -# configure and start samba service to provide user's home directory -#if [ -f /usr/sbin/smbd ] ; then -# sudo /opt/openslx/bin/sed -i /etc/vmware/smb.conf -e "s,USER,$USER," -# sudo /usr/sbin/nmbd -s /etc/vmware/smb.conf -# sudo /usr/sbin/smbd -s /etc/vmware/smb.conf -#fi - -# For debugging -cp "$conffile" "/tmp/vmware-last-config" - -# using the modified version of the wrapper script -VIRTCMD="/opt/openslx/bin/vmplayer" -VIRTCMDOPTS="${vmopt} ${conffile}" -RMDIRS="${redodir} ${conffile}" diff --git a/remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf b/remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf deleted file mode 100644 index 210b814f..00000000 --- a/remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf +++ /dev/null @@ -1,8 +0,0 @@ -#configuration file for vmware background services written in stage3 setup -vmnet0=true -vmnet1=192.168.101.1/24 -vmnet1nat=true -vmnet8=192.168.102.1/24 -#stage1 variables produced during plugin install -version="5.0" -buildversion="1031769" diff --git a/remote/modules/vmware/data/opt/openslx/scripts/systemd-vmware_env b/remote/modules/vmware/data/opt/openslx/scripts/systemd-vmware_env index bf7bfc5e..2112b2d7 100755 --- a/remote/modules/vmware/data/opt/openslx/scripts/systemd-vmware_env +++ b/remote/modules/vmware/data/opt/openslx/scripts/systemd-vmware_env @@ -10,18 +10,19 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -VMWARE_CONF_DIR=/opt/openslx/etc/vmware +VMWARE_CONF_DIR=/opt/openslx/vmchooser/vmware +VMCHOOSER_CONF_DIR=/opt/openslx/vmchooser/config for wait in 1 1 2 2 3 end; do - grep '^SLX_DNS' /opt/openslx/config > /dev/null && break + grep '^SLX_DNS' "/opt/openslx/config" > /dev/null && break [ "$wait" == "end" ] && echo "No DNS config found, using google dns" && break echo "Waiting for DNS config.." sleep "$wait" done #source config file -. /opt/openslx/config -. ${VMWARE_CONF_DIR}/vmware.conf +. "/opt/openslx/config" +. "${VMWARE_CONF_DIR}/vmware.conf" vm_dhcpd() { @@ -32,7 +33,7 @@ vm_dhcpd() { [ -n "${wpad}" ] && wpad_config="option wpad ${wpad}" # configuring dhcpd stub for virtual networks -cat > ${VMWARE_CONF_DIR}/udhcpd.conf << EOF +cat > "${VMWARE_CONF_DIR}/udhcpd.conf" << EOF # general udhcpd configuration file for virtual machines written by $0 # start and end of the IP lease block @@ -77,34 +78,32 @@ EOF setup_network() { #from plugins/vmware/XX_vmware.sh - mkdir -p /tmp/virt/vmware -m 1777 - mkdir -p /dev/shm/vmware -m 1777 - mkdir -p /var/run/vmware -m 1777 - mkdir -p /etc/vmware/udhcpd + mkdir -p "/tmp/virt/vmware" -m 1777 + mkdir -p "/dev/shm/vmware" -m 1777 + mkdir -p "/var/run/vmware" -m 1777 + mkdir -p "/etc/vmware/udhcpd" # variable might contain ",NAT" which is to be taken off if [ -n "$vmnet1" ] ; then - local vmip=${vmnet1%/*} # x.x.x.x/yy => 'x.x.x.x'"> + local vmip="${vmnet1%/*}" # x.x.x.x/yy => 'x.x.x.x'"> local vmsub=$(echo $vmip |sed 's,\(.*\)\..*,\1,') # x.x.x.x => x.x.x # setting up the udhcpd configuration sed -e "s,NWIF,vmnet1,;s,/misc/,/vmware/," \ - -e "s,CNETWORK,$vmsub,;s,PIDFILE,/var/run/vmware/udhcpd-vmnet1.pid," \ - -e "s,LEASEFILE,/var/run/vmware/udhcpd-vmnet1.leases," \ - ${VMWARE_CONF_DIR}/udhcpd.conf >/etc/vmware/udhcpd/udhcpd-vmnet1.conf + -e "s,CNETWORK,$vmsub,;s,PIDFILE,/var/run/vmware/udhcpd-vmnet1.pid," \ + -e "s,LEASEFILE,/var/run/vmware/udhcpd-vmnet1.leases," \ + "${VMWARE_CONF_DIR}/udhcpd.conf" > "/etc/vmware/udhcpd/udhcpd-vmnet1.conf" # setting the base samba configuration if available - if [ -f /etc/openslx/vmchooser/smb.conf \ - -a -f /usr/sbin/smbd ] ; then - sed -e "s#NWIF#vmnet1,vmnet8#;s,PIDDIR,/var/run/vmware," \ - ${VMCHOOSER_CONF_DIR}/smb.conf \ - >/etc/vmware/smb.conf + if [ -f "$VMCHOOSER_CONF_DIR/smb.conf" -a -f "/usr/sbin/smbd" ] ; then + sed -e "s#NWIF#vmnet1,vmnet8#;s,PIDDIR,/var/run/vmware," \ + "${VMCHOOSER_CONF_DIR}/smb.conf" > "/etc/vmware/smb.conf" fi fi # vmware nat interface configuration if [ -n "$vmnet8" ] ; then - local vmnet8ip=${vmnet8%/*} - local vmpx=${vmnet8#*/} - local vmsub=$(echo $vmnet8ip |sed 's,\(.*\)\..*,\1,') # x.x.x.x => x.x.x"> + local vmnet8ip="${vmnet8%/*}" + local vmpx="${vmnet8#*/}" + local vmsub=$(echo "$vmnet8ip" | sed 's,\(.*\)\..*,\1,') # x.x.x.x => x.x.x"> # vmip is user for vmnet8 device # vmnet is user for config files nat.conf/dhcp local vmip="${vmsub}.1" @@ -139,47 +138,19 @@ setup_network() { ############################################################################ # vmware stuff second part: setting up the environment # make udhcpd more silent - touch /var/run/vmware/udhcpd-vmnet1.leases \ - /var/run/vmware/udhcpd-vmnet8.leases + touch "/var/run/vmware/udhcpd-vmnet1.leases" \ + "/var/run/vmware/udhcpd-vmnet8.leases" # create the needed devices which effects all vmware options # they are not created automatically via module load for i in "/dev/vmnet0 c 119 0" "/dev/vmnet1 c 119 1" \ "/dev/vmnet8 c 119 8" "/dev/vmmon c 10 165"; do - mknod $i + mknod "$i" done chmod 0700 /dev/vmnet* } -adapt_tmpfs() { - # from plugins/vmware/init-hooks/80-after-plugins/adapt-tmpfs.sh - # Init hook to adapt the tmpfs size for VMware/Player - # (should be kept identical to the files of virtualbox plugin) - ############################################################################# - - # adapt tmpfs size (overbook) - case $(grep tmpfs /proc/mounts) in - */tmp*) - mount -o remount,size=175% /tmp - ;; - */uniontmp*) - mount -o remount,size=175% /uniontmp - ;; - esac -} - -#from /etc/init.d/vmware-env - -#functions: helper functions -tempdir () { - # Create a special tempfs directory - mkdir -m 1777 -p /tmp/vmware - # Don't mount special tempfs, when using local harddrive for /tmp - [ ! -n "$(cat /proc/mounts |grep ' /tmp '|grep '/dev/sd')" ] \ - && mount -t tmpfs -o size=180%,mode=1777 tmpfs /tmp/vmware -} - load_modules () { # VMplayer common stuff insmod /lib/modules/vmware/vmmon.ko @@ -242,11 +213,9 @@ case "$1" in #start: defines start function for initscript vm_dhcpd setup_network -# adapt_tmpfs # hack to access the first serial/parallel port chmod a+rw /dev/ttyS0 chmod a+rw /dev/parport0 - tempdir load_modules vmnetif vmblock diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram new file mode 100644 index 00000000..85125f1e Binary files /dev/null and b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram differ diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include new file mode 100644 index 00000000..2e7aeaf5 --- /dev/null +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include @@ -0,0 +1,644 @@ +# run-virt.include +# ----------------------------------------------------------------------------- +# Copyright (c) 2009..2012 - RZ Uni Freiburg +# Copyright (c) 2009..2013 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# run-virt.include +# - component for vmware/player of the vmchooser plugin run-virt.sh +################################################################################ + +# configuration writer functions +################################################################################ + +function clean_string () +{ + if [ "$#" -ge 1 ]; then + echo "$@" | tr '[A-Z]' '[a-z]' | tr -d '\t _./' + else + cat - | tr '[A-Z]' '[a-z]' | tr -d '\t _./' + fi +} + +vmostype=$(clean_string "$vmostype") + +runvmwareconfheader () +{ + echo "# This configuration file was generated by $0" > "$conffile" + + # does this makes sense? Depends on the VMworkstation in use + MAXMEM="9999999" + MAXCORES="4" + + # check for the ostype + # 1) memory limits + case "$vmostype" in + win31*|windows31*) + MAXMEM="32" + vmostype="win31" + ;; + winnt*|windowsnt*) + MAXMEM="1000" + vmostype="winnt" + ;; + win95*|windows95*) + MAXMEM="96" + vmostype="win95" + ;; + win98*|windows98*) + MAXMEM="384" + vmostype="win98" + ;; + winme*|windowsme*) + MAXMEM="384" + vmostype="winme" + ;; + win2000|windows2000|win2000pro*) + MAXMEM="4000" + vmostype="win2000pro" + ;; + win2000srv*|windows2000srv*|win2000serv*|windows2000serv*) + MAXMEM="4000" + vmostype="win2000serv" + ;; + win2000adv*|windows2000adv*|win2000dat*|windows2000dat*) + MAXMEM="8000" + vmostype="win2000advserv" + ;; + winnet*64|win*2003*64|windowsnet*64) + MAXMEM="8000" + vmostype="winnetstandard-64" + ;; + winnet*|win*2003*|windowsnet*) + MAXMEM="4000" + vmostype="winnetstandard" + ;; + winxphome*|windowsxphome*) + MAXMEM="4000" + vmostype="winxphome" + ;; + winxp*64|windowsxp*64) + MAXMEM="8000" + vmostype="winxppro-64" + ;; + winxp*|windowsxp*) + MAXMEM="4000" + vmostype="winxppro" + ;; + winvista*64|windowsvista*64) + MAXMEM="16000" + vmostype="winvista-64" + ;; + winvista*|windowsvista*) + MAXMEM="8000" + vmostype="winvista" + ;; + win7*64|windows7*64) + MAXMEM="32000" + vmostype="windows7-64" + ;; + win7*|windows7*) + MAXMEM="8000" + vmostype="windows7" + ;; + win*64) + MAXMEM="16000" + ;; + win*) + MAXMEM="8000" + ;; + dos|msdos*|ms-dos*) + MAXMEM="128" + vmostype="dos" + ;; + *64) + MAXMEM="123456" + ;; + *) + MAXMEM="8000" + ;; + esac + + # 2) other hardware + capabilities + shfolders="FALSE" + case "$vmostype" in + win31) + MAXCORES="1" + sound="sb16" + ;; + winnt) + MAXCORES="2" + sound="sb16" + ;; + win95|win98|winme) + MAXCORES="1" + ;; + win2000pro) # Don't know if Win 2000 supports shared folders, disabled to be safe + MAXCORES="2" + ;; + win2000serv) + MAXCORES="4" + ;; + win2000advserv) + MAXCORES="8" + ;; + winxphome) + MAXCORES="1" + shfolders="TRUE" + ;; + winxp*|winvista*|windows7*) + MAXCORES="4" + shfolders="TRUE" + ;; + winnet*) + shfolders="TRUE" + ;; + linux*|ubuntu*|suse*|debian*) + shfolders="TRUE" + ;; + macos*64) + MAXCORES="2" + vmostype="freebsd-64" + ;; + macos*) + MAXCORES="1" + vmostype="freebsd" + ;; + beos*) + vmostype="other" + ;; + # Unknown guestOS setting in .xml - use conservative defaults + *64) + vmostype="other-64" + ;; + *) + vmostype="other" + ;; + esac + + svga_autodetect="TRUE" + + real_core_count="$cpu_cores" + [ "$cpu_cores" -gt "$MAXCORES" ] && cpu_cores="$MAXCORES" + # It currently makes no sense to set the virtual number of cores + # to a different value than the virtual number of cores per virtual CPU. + cores_per_socket="$cpu_cores" + + if [ "x$shfolders" != "xFALSE" ]; then + ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"' + else + ENABLE_SHARE='' + fi + + [ "$mem" -ge "$MAXMEM" ] && mem="$MAXMEM" + [ "$hwver" -lt "7" -a "$mem" -gt "3500" ] && mem="3500" + + cap3d="WHAT IS THIS VAR USED FOR?" # helper var for loging output + + cat >> "$conffile" </dev/null 2>&1 +} + +preferencesheader () +{ + cat > "$vmhome/preferences" <> "$vmhome/preferences" <> "$vmhome/preferences" </dev/null 2>&1 +mkdir -p "$confdir" >/dev/null 2>&1 +mkdir -p "$vmhome/dndlogs" >/dev/null 2>&1 +touch "$vmhome/dndlogs/dndlog.conf" >/dev/null 2>&1 + +# create preferences +preferencesheader + +# create VMware startup file +runvmwareconfheader + +# link to conffile if confdir != redodir +ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1 + +# sync is needed to ensure that data is really written to virtual disk +sync + +# own nvram. We need it for floppy drive b, default nvram has just drive a +# TODO: optimize, currently kinda inefficient, too much copys, but we +# don't know which one is installed... +cp "/opt/openslx/vmchooser/vmware/nvram" "$confdir/nvram" 2>/dev/null + + +# logging and stdout +################################################################################ + +# log script information +writelog "# File created by $0 (VMversion ${vmversion})\n# on $(date)\n" +## Edited for persistent mode. +writelog "Starting with ${diskmode} mode ...\n" +## + +# write all results to logfile +# log disksetup +writelog "Directories:" +writelog "\tConfdir:\t${confdir}" +writelog "\tConffile:\t${conffile}" +writelog "\tRedodir:\t${redodir}" +writelog "\tVMhome:\t\t${vmhome}" +writelog "\t/tmp info: \ +$(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')" +# hw setup +writelog "Hardware:" +writelog "\tMAC:\t\t00:50:56:${VM_ID}:${machostpart}" +if [ -n "${network_card}" ]; then + writelog "\tNet Adaptor:\t${network_card}" +fi +writelog "\tMem:\t\t${mem} MB" +# echo nur wenn hostmem gesetzt +[ -n "${hostmem}" ] && writelog "\tHostmem:\t${hostmem} MB" +writelog "\tMax. res.:\t${xres}x${yres}" +writelog "\tCD-ROM1:\t${cdrom0}" +writelog "\tCD-ROM2:\t${cdrom1}" +writelog "\tFloppy_A:\t${floppy0}" +if [ "${serial}" = "TRUE" ]; then + writelog "\tSerial Port:\t${serialdev}" +fi +if [ "${parallel}" = "TRUE" ]; then + writelog "\tParallel Port:\t${paraldev}" +fi +# image +writelog "Diskimage:" +writelog "\tDiskfile:\t${diskfile}" +writelog "\tDisktype:\t${hddrv}" +writelog "\tHWVersion:\t${hwver}" +writelog "\tVMostype:\t${vmostype}" +# misc +writelog "Misc:" +writelog "\tDisplayname:\t${displayname}" +if [ "${cap3d}" = "TRUE" -a "${enable3d}" = "TRUE" ]; then + writelog "\t3D Graphics:\tenabled" +fi +# empty line at end +writelog "" + + +# finally set env for run-virt.sh +################################################################################ + +# configure and start samba service to provide user's home directory +#if [ -f /usr/sbin/smbd ] ; then +# sudo /opt/openslx/bin/sed -i /etc/vmware/smb.conf -e "s,USER,$USER," +# sudo /usr/sbin/nmbd -s /etc/vmware/smb.conf +# sudo /usr/sbin/smbd -s /etc/vmware/smb.conf +#fi + +# For debugging +cp "$conffile" "/tmp/vmware-last-config" + +# using the modified version of the wrapper script +VIRTCMD="/opt/openslx/bin/vmplayer" +VIRTCMDOPTS="${vmopt} ${conffile}" +RMDIRS="${redodir} ${conffile}" diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf new file mode 100644 index 00000000..210b814f --- /dev/null +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf @@ -0,0 +1,8 @@ +#configuration file for vmware background services written in stage3 setup +vmnet0=true +vmnet1=192.168.101.1/24 +vmnet1nat=true +vmnet8=192.168.102.1/24 +#stage1 variables produced during plugin install +version="5.0" +buildversion="1031769" -- cgit v1.2.3-55-g7522 From 37404eaf25ac90d4e4aa7a2b208ac735a08995d7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Nov 2013 15:04:45 +0100 Subject: do not exclude pulseaudio anymore, needed for most desktop envs --- server/blacklists/essential/pulseaudio | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 server/blacklists/essential/pulseaudio diff --git a/server/blacklists/essential/pulseaudio b/server/blacklists/essential/pulseaudio deleted file mode 100644 index 7c1c1337..00000000 --- a/server/blacklists/essential/pulseaudio +++ /dev/null @@ -1,5 +0,0 @@ -- *pulseaudio* -- libpulse* -- *sound**pulse* -- *alsa**pulse* - -- cgit v1.2.3-55-g7522