diff options
-rw-r--r-- | doc/setup_localization | 84 | ||||
-rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env | 56 | ||||
-rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 23 | ||||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf (renamed from remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf) | 0 | ||||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf (renamed from remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf) | 0 | ||||
-rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe (renamed from remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe) | bin | 12800 -> 12800 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png) | bin | 5361 -> 5361 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png) | bin | 3390 -> 3390 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini) | 0 | ||||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png) | bin | 9187 -> 9187 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png) | bin | 3390 -> 3390 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini) | 0 | ||||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png) | bin | 11337 -> 11337 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png) | bin | 3082 -> 3082 bytes | |||
-rw-r--r-- | remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini (renamed from remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini) | 0 | ||||
-rw-r--r-- | remote/modules/vmchooser/vmchooser.build | 4 | ||||
-rwxr-xr-x | remote/modules/vmware/data/opt/openslx/bin/vmplayer | 10 | ||||
l---------[-rwxr-xr-x] | remote/modules/vmware/data/opt/openslx/bin/vmware | 12 | ||||
-rwxr-xr-x | remote/modules/vmware/data/opt/openslx/scripts/systemd-vmware_env | 77 | ||||
-rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram (renamed from remote/modules/vmware/data/opt/openslx/etc/vmware/nvram) | bin | 8664 -> 8664 bytes | |||
-rw-r--r--[-rwxr-xr-x] | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include (renamed from remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include) | 6 | ||||
-rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf (renamed from remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf) | 0 | ||||
-rw-r--r-- | server/blacklists/essential/pulseaudio | 5 | ||||
-rw-r--r-- | server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf (renamed from server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf) | 0 | ||||
-rw-r--r-- | server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png (renamed from server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png) | bin | 17458 -> 17458 bytes | |||
-rw-r--r-- | server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png (renamed from server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png) | bin | 4113 -> 4113 bytes | |||
-rw-r--r-- | server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini (renamed from server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini) | 0 |
27 files changed, 160 insertions, 117 deletions
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. + 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.*\\\<vmx\\\> /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.*\\\<svm\\\> /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.*\<vmx\>' "/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.*\<svm\>' "/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/etc/vmchooser/smb.conf b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf index ec757ce4..ec757ce4 100644 --- a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/smb.conf +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/smb.conf diff --git a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf index 203f125b..203f125b 100644 --- a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/vmchooser.conf +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/config/vmchooser.conf diff --git a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe Binary files differindex e016f407..13092874 100755 --- a/remote/modules/vmchooser/data/opt/openslx/etc/vmchooser/openslx.exe +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/data/openslx.exe diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png Binary files differindex c9d8ab0d..c9d8ab0d 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-left.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-left.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png Binary files differindex 8ca9347b..8ca9347b 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool-right.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool-right.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini index 90d00617..90d00617 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/bwlehrpool/bwlehrpool.ini +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/bwlehrpool/bwlehrpool.ini diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png Binary files differindex 900dd867..900dd867 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-left.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-left.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png Binary files differindex 8ca9347b..8ca9347b 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx-right.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx-right.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini index 57a22821..57a22821 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/openslx/openslx.ini +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/openslx/openslx.ini diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png Binary files differindex c8736b72..c8736b72 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-left.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-left.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png Binary files differindex e21f0d8b..e21f0d8b 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets-right.png +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets-right.png diff --git a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini index d9aa17f6..d9aa17f6 100644 --- a/remote/modules/vmchooser/data/opt/openslx/usr/share/vmchooser/themes/planets/planets.ini +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/themes/planets/planets.ini 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/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 index 1fe9b11d..aa0b74b1 100755..120000 --- a/remote/modules/vmware/data/opt/openslx/bin/vmware +++ b/remote/modules/vmware/data/opt/openslx/bin/vmware @@ -1,11 +1 @@ -#!/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' "$@" - - - - +vmplayer
\ No newline at end of file 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/etc/vmware/nvram b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram Binary files differindex 85125f1e..85125f1e 100644 --- a/remote/modules/vmware/data/opt/openslx/etc/vmware/nvram +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/nvram diff --git a/remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include index e60d5a5b..2e7aeaf5 100755..100644 --- a/remote/modules/vmware/data/opt/openslx/etc/vmware/run-virt.include +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include @@ -329,7 +329,7 @@ $paraldev HEREEND # set the appropriate permissions for the vmware config file - chmod u+rwx ${conffile} >/dev/null 2>&1 + chmod u+rwx "${conffile}" >/dev/null 2>&1 } preferencesheader () @@ -431,7 +431,7 @@ diskfile="${vmpath}" vmhome="${HOME}/.vmware" # get several version infos for vmware/player -. /opt/openslx/etc/vmware/vmware.conf +. /opt/openslx/vmchooser/vmware/vmware.conf vmbuild=$buildversion vmversion=$version @@ -569,7 +569,7 @@ 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 +cp "/opt/openslx/vmchooser/vmware/nvram" "$confdir/nvram" 2>/dev/null # logging and stdout diff --git a/remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf index 210b814f..210b814f 100644 --- a/remote/modules/vmware/data/opt/openslx/etc/vmware/vmware.conf +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/vmware.conf 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* - diff --git a/server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf index e436587e..e436587e 100644 --- a/server/modules/vmchooser-freiburg/opt/openslx/etc/vmchooser/vmchooser.conf +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/config/vmchooser.conf diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png Binary files differindex e602ccd1..e602ccd1 100644 --- a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_l.png +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_l.png diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png Binary files differindex 3edbcb0c..3edbcb0c 100644 --- a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/title_r.png +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/title_r.png diff --git a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini index dadcb4e1..dadcb4e1 100644 --- a/server/modules/vmchooser-freiburg/opt/openslx/usr/share/vmchooser/themes/unifr/unifr.ini +++ b/server/modules/vmchooser-freiburg/opt/openslx/vmchooser/themes/unifr/unifr.ini |