diff options
| -rw-r--r-- | remote/modules/hwinfo/TODO | 1 | ||||
| -rw-r--r-- | remote/modules/hwinfo/hwinfo.build | 39 | ||||
| -rw-r--r-- | remote/modules/hwinfo/hwinfo.conf | 3 | ||||
| -rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env | 38 | ||||
| -rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 8 |
5 files changed, 29 insertions, 60 deletions
diff --git a/remote/modules/hwinfo/TODO b/remote/modules/hwinfo/TODO deleted file mode 100644 index 6203c18f..00000000 --- a/remote/modules/hwinfo/TODO +++ /dev/null @@ -1 +0,0 @@ -update to new config scheme diff --git a/remote/modules/hwinfo/hwinfo.build b/remote/modules/hwinfo/hwinfo.build deleted file mode 100644 index 9cf7eb1e..00000000 --- a/remote/modules/hwinfo/hwinfo.build +++ /dev/null @@ -1,39 +0,0 @@ -BIN_PATH=$(which hwinfo) - -fetch_source() { - if [ -z ${BIN_PATH} ]; then - [ ! -d "${MODULE_DIR}/src" ] && mkdir -p "${MODULE_DIR}/src" - cd "${MODULE_DIR}/src" - git clone git://gitorious.org/opensuse/hwinfo.git - git clone git://gitorious.org/x86emu/libx86emu.git - cd - &> /dev/null - else - pinfo "Copying hwinfo from system." - fi -} - -build() { - - if [ ! -z ${BIN_PATH} -a -e ${BIN_PATH} ]; then - tarcopy "$(get_link_chain ${BIN_PATH})" "${MODULE_BUILD_DIR}" - else - pdebug "Installing libx86emu in ${MODULE_BUILD_DIR}..." - cd "${MODULE_DIR}/src/libx86emu" - make || perror "libx86emu: make failed." - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "libx86emu: make install failed." - cd - &> /dev/null - - pdebug "Installing hwinfo in ${MODULE_BUILD_DIR}..." - cd "${MODULE_DIR}/src/hwinfo" - # find libx86emu path - LIBX86EMU_DIR=$(dirname $(find ${MODULE_BUILD_DIR} -name libx86emu.so)) - EXTRA_FLAGS="-I${MODULE_BUILD_DIR}/usr/include" LIBRARY_PATH="${LIBX86EMU_DIR}" LD_LIBRARY_PATH="${LIBX86EMU_DIR}" make || pwarning "hwinfo: make failed." - DESTDIR="${MODULE_BUILD_DIR}" make install || pwarning "hwinfo: make install failed." - cd - &> /dev/null - fi - -} - -post_copy() { - : -} diff --git a/remote/modules/hwinfo/hwinfo.conf b/remote/modules/hwinfo/hwinfo.conf deleted file mode 100644 index c254fc71..00000000 --- a/remote/modules/hwinfo/hwinfo.conf +++ /dev/null @@ -1,3 +0,0 @@ -REQUIRED_BINARIES=" hwinfo" -REQUIRED_INSTALLED_PACKAGES=" flex - hwinfo" 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 18f5db16..b429bb55 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/systemd-vmchooser_env @@ -1,16 +1,28 @@ #!/bin/bash +# Full bash required +# ----------------------------------------------------------------------------- +# Copyright (c) 2007..2013 - RZ Uni FR +# Copyright (c) 2007..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/ +# ----------------------------------------------------------------------------- +# systemd-vmchooser_env +# - This is the preparation script for the configuration of the virtuali- +# zation tools used later on. +################################################################################ export PATH=$PATH:/opt/openslx/bin:/opt/openslx/sbin:/opt/openslx/usr/bin:/opt/openslx/usr/sbin -#source config file with vars (e.g. ipaddr, macaddr, hostname) +# source config file with vars (e.g. ipaddr, macaddr, hostname) . /opt/openslx/config -#from plugins/vmchooser/40-started-hw-config/run-virt.sh -#TODO: extra systemd-service for hwinfo -hwinfo --cdrom | grep -i "Device File:" | awk {'print $3'} >/etc/openslx/hwinfo.cdrom -hwinfo --floppy | grep -i "Device File:" | awk {'print $3'} >/etc/openslx/hwinfo.floppy - -#from plugins/vmchooser/XX_vmchooser.sh +# from plugins/vmchooser/XX_vmchooser.sh VMCHOOSER_DIR="/opt/openslx/vmchooser" VMCHOOSER_CONF_DIR="$VMCHOOSER_DIR/config" @@ -99,18 +111,18 @@ fi # ip addr echo "hostip=${SLX_PXE_CLIENT_IP}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" # hostname -echo "hostname=${SLX_HOSTNAME}" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" +echo "hostname=$(hostname -s)" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" -# get further hw information +# get further hw information and check for traces of available optical and floppy drives j=0 -for i in $(cat /etc/openslx/hwinfo.cdrom); do - echo "cdrom_$j=$i" >> "${VMCHOOSER_CONF_DIR}/virtualization.conf" +for cdrom in $(dmesg|grep -i "Attached scsi CD-ROM sr" | sed "s,.*Attached scsi CD-ROM ,,"); do + echo "cdrom_$j=/dev/${cdrom}" >> "${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" +for floppy in $(dmesg|grep -i "Floppy drive"|sed "s,.*(s): ,,;s, is .*,,"); do + echo "floppy_$j=/dev/${floppy}" >> "${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 6b9c4f0f..2a6a3272 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -2,7 +2,7 @@ # Full bash required # ----------------------------------------------------------------------------- # Copyright (c) 2007..2010 - RZ Uni FR -# Copyright (c) 2007..2011 - OpenSLX GmbH +# Copyright (c) 2007..2013 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -379,17 +379,17 @@ if ! echo "$macaddrsuffix" | grep -q -E '^[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}$'; fi # Virtual fd/cd/dvd and drive devices, floppy b: for configuration -# if $floppy_0 from run-virt.include set then fdtest="TRUE" +# if $floppy_0 from virtualization.conf set then fdtest="TRUE" fdtest=${floppy_0:+"TRUE"} # if $fdtest not set floppy0="FALSE", else "TRUE" floppy0=${fdtest:-"FALSE"} floppy1="TRUE" floppy1name="$VMCHOOSER_DIR/data/loopimg/fd.img" -# if $cdrom_0 from run-virt.include set then cdtest="TRUE" +# if $cdrom_0 from virtualization.conf set then cdtest="TRUE" cdtest=${cdrom_0:+"TRUE"} # if $cdtest not set cdrom0="FALSE", else "TRUE" cdrom0=${cdtest:-"FALSE"} -# if $cdrom_1 from run-virt.include set then cdtest="TRUE" +# if $cdrom_1 from virtualization.conf set then cdtest="TRUE" cdtest=${cdrom_1:+"TRUE"} # if $cdtest not set cdrom1="FALSE", else "TRUE" cdrom1=${cdtest:-"FALSE"} |
