From d50ca9e27cfb7fd8aba92ec557eb07944f3a33ad Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Mon, 22 Mar 2010 23:50:43 +0100 Subject: qemukvm weiter, sollte laufen (ungetestet), noch anpassungen an scripten notwendig (XX_qemu.., ifup), sudoers, /dev/fb0 für jedermann zugreifbar --- .../plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm | 38 +++++++------ os-plugins/plugins/qemukvm/XX_qemukvm.sh | 30 ++++++----- os-plugins/plugins/qemukvm/files/ifdown | 31 +++++++++++ os-plugins/plugins/qemukvm/files/ifup | 62 +++++++++++++++++++++ os-plugins/plugins/qemukvm/files/qemu-ifdown | 31 ----------- os-plugins/plugins/qemukvm/files/qemu-ifup | 63 ---------------------- os-plugins/plugins/qemukvm/files/run-virt.include | 50 +++++++++-------- .../init-hooks/60-have-servconfig/vm-dhcpd.sh | 11 ++-- .../virtualbox/OpenSLX/OSPlugin/virtualbox.pm | 9 ++-- .../plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm | 2 +- os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 2 +- os-plugins/plugins/vmgrid/files/vmgrid | 2 +- 12 files changed, 177 insertions(+), 154 deletions(-) create mode 100644 os-plugins/plugins/qemukvm/files/ifdown create mode 100644 os-plugins/plugins/qemukvm/files/ifup delete mode 100644 os-plugins/plugins/qemukvm/files/qemu-ifdown delete mode 100644 os-plugins/plugins/qemukvm/files/qemu-ifup (limited to 'os-plugins') diff --git a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm index 52255116..c9388210 100644 --- a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm +++ b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm @@ -103,7 +103,7 @@ sub installationPhase { my $self = shift; my $info = shift; - + $self->{pluginRepositoryPath} = $info->{'plugin-repo-path'}; $self->{pluginTempPath} = $info->{'plugin-temp-path'}; $self->{openslxBasePath} = $info->{'openslx-base-path'}; @@ -111,8 +111,9 @@ sub installationPhase $self->{attrs} = $info->{'plugin-attrs'}; my $engine = $self->{'os-plugin-engine'}; - my $pluginRepoPath = "$self->{pluginRepositoryPath}"; - + my $pluginRepoPath = $info->{'plugin-repo-path'}; + my $openslxBasePath = $info->{'openslx-base-path'}; + # Different names of the tool (should be unified somehow!?) if (!isInPath('qemu-kvm') || !isInPath('kvm')) { $engine->installPackages( @@ -123,19 +124,26 @@ sub installationPhase if (!isInPath('sudo')) { $engine->installPackages($self->{distro}->getPackageName('sudo')); } - # Copy run-virt.include to the appropriate place for inclusion in stage4 - copyFile("$self->{openslxBasePath}/lib/plugins/qemukvm/files/run-virt.include", - "$self->{pluginRepositoryPath}/"); - # Copy the later /etc/qemu-ifup,down - copyFile("$self->{openslxBasePath}/lib/plugins/qemukvm/files/qemu-if*", - "$self->{pluginRepositoryPath}/"); - chmod 0755, "$self->{pluginRepositoryPath}/qemu-ifup"; - chmod 0755, "$self->{pluginRepositoryPath}/qemu-ifdown"; + + # Copy run-virt.include and template files to the appropriate place for + # inclusion in stage4 + my $pluginName = $self->{'name'}; + my $pluginBasePath = "$openslxBasePath/lib/plugins/$pluginName/files"; + foreach my $file ( qw( run-virt.include ifup ifdown ) ) { + copyFile("$pluginBasePath/$file", "$pluginRepoPath/"); + } + chmod 0755, "$pluginRepoPath/if*"; +# # Create kvm link +# my $kvmPath = pathOf('qemu-kvm') || pathOf('kvm') || pathOf('qemu'); +# if (defined $kvmPath) { +# linkFile($kvmPath, "$pluginRepoPath/qemukvm") +# } my $initFile = newInitFile(); $initFile->setName("qemukvm"); $initFile->setDesc("Setup environment for QEMU/KVM"); + # TODO: default dirs als globale funktion anbieten $initFile-> addToBlock('head','. /etc/opt/openslx/plugins/qemukvm/network.conf'); my $do_start = unshiftHereDoc(<<' End-of-Here'); @@ -157,23 +165,23 @@ sub installationPhase echo "0" >/proc/sys/net/ipv4/conf/br0/forwarding echo "0" >/proc/sys/net/ipv4/conf/tap0/forwarding End-of-Here - + # add helper functions to initfile # first parameter name of the function # second parameter content of the function $initFile->addFunction('do_start', $do_start); $initFile->addFunction('do_stop', $do_stop); $initFile->addFunction('do_restart', " : # do nothing here"); - + # place a call of the helper function in the stop block of the init file # first parameter name of the function # second parameter name of the block $initFile->addFunctionCall('do_start', 'start'); $initFile->addFunctionCall('do_stop', 'stop'); $initFile->addFunctionCall('do_restart', 'restart'); - + my $distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0]; - + # write qemukvm initfile to plugin path spitFile( "$pluginRepoPath/qemukvm", diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh index b595aab0..d6c712ac 100644 --- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh +++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh @@ -91,22 +91,24 @@ ${qemukvm_imagesrc}." nonfatal # copy the /etc/qemu-ifup script and enable extended rights for running # the emulator and certain network commands via sudo - ln -sf ${PLUGINDIR}/qemu-ifup /mnt/etc/qemu-ifup - ln -sf ${PLUGINDIR}/qemu-ifdown /mnt/etc/qemu-ifdown - ln -sf ${PLUGINDIR}/qemu-ifup /mnt/etc/kvm-ifup - ln -sf ${PLUGINDIR}/qemu-ifdown /mnt/etc/kvm-ifdown + ln -sf ${PLUGINDIR}/ifup ${PLUGINCONFDIR}/ifup + ln -sf ${PLUGINDIR}/ifdown ${PLUGINCONFDIR}/ifdown - for qemubin in qemu kvm ; do - qemu="$(binfinder ${qemubin})" - [ -n "${qemu}" ] && \ - echo "ALL ALL=NOPASSWD: ${qemu}" >>/mnt/etc/sudoers + for qemubin in qemu-kvm kvm qemu ; do + qemu=$(binfinder ${qemubin}) + [ -n "${qemu}" ] && echo "ALL ALL=NOPASSWD: ${qemu}" >>/mnt/etc/sudoers done - echo -e "#ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/sbin/tunctl -t tap*\n\ -#ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/sbin/ip addr add * dev tap*\n\ -#ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tap*\n\ -ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/udhcpd -S /tmp/qemu*\n\ -# TODO: killall nur mit fullpath!!! -ALL ALL=NOPASSWD: /usr/bin/killall udhcpd" >>/mnt/etc/sudoers + killall=$(binfinder killall) + # TODO: notwendig, oder reicht ifup/down + # TODO: /dev/fb0 mit jedermann + cat <>/mnt/etc/sudoers fi else [ $DEBUGLEVEL -gt 0 ] && echo " * Configuration of 'qemukvm' plugin failed" diff --git a/os-plugins/plugins/qemukvm/files/ifdown b/os-plugins/plugins/qemukvm/files/ifdown new file mode 100644 index 00000000..8c52d76f --- /dev/null +++ b/os-plugins/plugins/qemukvm/files/ifdown @@ -0,0 +1,31 @@ +#!/bin/sh +# Copyright (c) 2009 - 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/ +# ----------------------------------------------------------------------------- +# qemu-ifup +# - Script used for network cleanup of qemukvm in stage4 +# ----------------------------------------------------------------------------- + +# Clean up script + +case "$1" in + tap1) + # Bringing down the dhcp server + killall udhcpd 2>/dev/null + #iptables -t nat -D POSTROUTING -o br0 -j MASQUERADE 2>/dev/null + ;; + tap2) + # Bringing down the dhcp server + killall udhcpd 2>/dev/null + ;; +esac + +# Produce a clean exit status +exit 0 diff --git a/os-plugins/plugins/qemukvm/files/ifup b/os-plugins/plugins/qemukvm/files/ifup new file mode 100644 index 00000000..ed4a277d --- /dev/null +++ b/os-plugins/plugins/qemukvm/files/ifup @@ -0,0 +1,62 @@ +#!/bin/sh +# Copyright (c) 2009..2010 - 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/ +# ----------------------------------------------------------------------------- +# ifup +# - Script used for network setup of qemukvm in stage4 +# ----------------------------------------------------------------------------- + +. /etc/opt/openslx/openslx.conf + +PLUGINCONFDIR=${OPENSLX_DEFAULT_CONFDIR}/plugins/qemukvm +QKTMPDIR=/tmp/qemukvm/$USER/$$ + +# Use the udhcpcd as DHCP server and brctl as provided by default in OpenSLX +# environments via uclibc-wrapper. +. ${PLUGINCONFDIR}/network.conf + +# Just decide by the virtual network device used which kind of connection +# should be set up (passed in $1): tap0 = bridge, tap1 = nat, tap2 = hostonly. +case "$1" in + tap0) + # Adding the tap0 interface to the existing bridge configured in stage3 + # brctl addif br0 tap0 + ;; + tap1) + # Configuring DHCP on host tap1 interface and enable IP masquerading + [ -d ${QKTMPDIR} ] || mkdir -p ${QKTMPDIR} + # cut the last .NNN/MM from nataddress + sed -e "s,NWIF,tap1,;s,/misc/,/qemu/," \ + -e "s,CNETWORK,${nataddress%.*},;s,PIDFILE,${QKTMPDIR}/udhcpd.pid," \ + -e "s,LEASEFILE,${QKTMPDIR}/udhcpd.leases," \ + ${OPENSLX_DEFAULT_CONFDIR}/udhcpd.conf \ + >${QKTMPDIR}/udhcpd.conf + touch ${QKTMPDIR}/udhcpd.leases + # ip link set tap1 up + # ip addr add 192.168.101.254/24 dev tap1 + sudo /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \ + -S ${QKTMPDIR}/udhcpd.conf + # iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE + ;; + tap2) + # Configuring DHCP on host tap2 interface + [ -d ${QKTMPDIR} ] || mkdir -p /tmp/qemu-$USER + sed "s,NWIF,tap2,;s,/misc/,/qemu/,;s,USER,$USER,;s,CNETWORK,$hoaddress," \ + ${OPENSLX_DEFAULT_CONFDIR}/udhcpd.conf >${QKTMPDIR}/udhcpd.conf + touch ${QKTMPDIR}/udhcpd.leases + # ip link set tap2 up + # ip addr add 192.168.101.254/24 dev tap2 + sudo /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \ + -S ${QKTMPDIR}/udhcpd.conf + ;; +esac + +# Produce a clean exit status +exit 0 diff --git a/os-plugins/plugins/qemukvm/files/qemu-ifdown b/os-plugins/plugins/qemukvm/files/qemu-ifdown deleted file mode 100644 index 8c52d76f..00000000 --- a/os-plugins/plugins/qemukvm/files/qemu-ifdown +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Copyright (c) 2009 - 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/ -# ----------------------------------------------------------------------------- -# qemu-ifup -# - Script used for network cleanup of qemukvm in stage4 -# ----------------------------------------------------------------------------- - -# Clean up script - -case "$1" in - tap1) - # Bringing down the dhcp server - killall udhcpd 2>/dev/null - #iptables -t nat -D POSTROUTING -o br0 -j MASQUERADE 2>/dev/null - ;; - tap2) - # Bringing down the dhcp server - killall udhcpd 2>/dev/null - ;; -esac - -# Produce a clean exit status -exit 0 diff --git a/os-plugins/plugins/qemukvm/files/qemu-ifup b/os-plugins/plugins/qemukvm/files/qemu-ifup deleted file mode 100644 index 1f1e0cc6..00000000 --- a/os-plugins/plugins/qemukvm/files/qemu-ifup +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# Copyright (c) 2009..2010 - 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/ -# ----------------------------------------------------------------------------- -# qemu-ifup -# - Script used for network setup of qemukvm in stage4 -# ----------------------------------------------------------------------------- - -. /etc/opt/openslx/openslx.conf - -PLUGINCONFDIR=${OPENSLX_DEFAULT_CONFDIR}/plugins/qemukvm -PLUGINDIR=${OPENSLX_DEFAULT_PLUGINDIRDIR}/qemukvm - -# Use the udhcpcd as DHCP server and brctl as provided by default in OpenSLX -# environments via uclibc-wrapper. -. ${PLUGINCONFDIR}/network.conf - -# Just decide by the virtual network device used which kind of connection -# should be set up (passed in $1): tap0 = bridge, tap1 = nat, tap2 = hostonly. -case "$1" in - tap0) - # Adding the tap0 interface to the existing bridge configured in stage3 - # brctl addif br0 tap0 - ;; - tap1) - # Configuring DHCP on host tap1 interface and enable IP masquerading - [ -d /tmp/qemu-$USER ] || mkdir -p /tmp/qemu-$USER - # cut the last .NNN/MM from nataddress - sed -e "s,NWIF,tap1,;s,/misc/,/qemu/," \ - -e "s,CNETWORK,${nataddress%.*},;s,PIDFILE,/tmp/qemu-$USER/udhcpd.pid," \ - -e "s,LEASEFILE,/tmp/qemu-$USER/udhcpd.leases," \ - ${PLUGINDIR}/udhcpd.conf \ - >/tmp/qemu-$USER/udhcpd.conf - touch /tmp/qemu-$USER/udhcpd.leases - # ip link set tap1 up - # ip addr add 192.168.101.254/24 dev tap1 - sudo /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \ - -S /tmp/qemu-$USER/udhcpd.conf - # iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE - ;; - tap2) - # Configuring DHCP on host tap2 interface - [ -d /tmp/qemu-$USER ] || mkdir -p /tmp/qemu-$USER - sed "s,NWIF,tap2,;s,/misc/,/qemu/,;s,USER,$USER,;s,CNETWORK,$hoaddress," \ - /etc/opt/openslx/udhcpd.conf >/tmp/qemu-$USER/udhcpd.conf - touch /tmp/qemu-$USER/udhcpd.leases - # ip link set tap2 up - # ip addr add 192.168.101.254/24 dev tap2 - sudo /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \ - -S /tmp/qemu-$USER/udhcpd.conf - ;; -esac - -# Produce a clean exit status -exit 0 - diff --git a/os-plugins/plugins/qemukvm/files/run-virt.include b/os-plugins/plugins/qemukvm/files/run-virt.include index 0cec83da..bdf9666f 100644 --- a/os-plugins/plugins/qemukvm/files/run-virt.include +++ b/os-plugins/plugins/qemukvm/files/run-virt.include @@ -31,7 +31,8 @@ fi ### Declaration of default variables ################################################################################ -PLUGINCONFVIRTUALBOX="${PLUGINCONFROOT}/${self}" +PLUGINCONFQK="${PLUGINCONFROOT}/${self}" +PLUGINDIRQK=${OPENSLX_DEFAULT_DIR}/plugin-repo/${self} # create TMPDIR for all users mkdir -m 1777 /tmp/${self} 2>/dev/null # TMPDIR @@ -51,11 +52,12 @@ else exit 1 fi -# display name +# display name, remove blanks because of cmdline problems +displayname=$(echo ${displayname} | sed -e "s, ,-,g") VIRTCMDOPTS="${VIRTCMDOPTS} -name ${displayname}" writelog "Directories:" -writelog "\tTMPDIR:\t\t$QKTMPDIR" +writelog "\tTMPDIR:\t\t\t$QKTMPDIR" writelog "Diskimage:" writelog "\tDisk type:\t\t$imgtype" writelog "\tDisk file:\t\t$diskfile" @@ -112,16 +114,21 @@ VIRTCMDOPTS="${VIRTCMDOPTS} -m ${mem}" network_card=${network_card:=pcnet} VIRTCMDOPTS="${VIRTCMDOPTS} -net nic,model=${network_card}" +# define net kind and apply script +qemu_ifscripts="script=${PLUGINDIRQK}/ifup,downscript=${PLUGINDIRQK}/ifdown" case "${network_kind}" in bridge*) - VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap0" + VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap0,${qemu_ifscripts}" + ;; + NAT|nat) + VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap1,${qemu_ifscripts}" ;; hostonly|host-only) - VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap2" + VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap2,${qemu_ifscripts}" ;; *) - network_kind="NAT" - VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tap1" + network_kind="user" + VIRTCMDOPTS="${VIRTCMDOPTS} -net user" ;; esac @@ -226,40 +233,39 @@ writelog "\tNetwork kind:\t\t${network_kind}" #-show-cursor show cursor # check for kvm modules -# TODO: check for /dev/kvm if [ -n "${kvm}" ]; then - if lsmod |Êgrep ${kvm}; then + if [ -e /dev/kvm ]; then for tool in kvm qemu-kvm; do VIRTCMD=$(which ${tool} 2>/dev/null) [ -n "$VIRTCMD" ] && break done else - writelog "KVM available but no modules loaded, maybe compiled into kernel?" VIRTCMD=$(which qemu 2>/dev/null) + writelog "KVM available but /dev/kvm not found!" + writelog "Trying fallback to QEMU emulation." fi fi -# set the variables appropriately -#for tool in kvm qemu-kvm qemu; do -# VIRTCMD=$(which ${tool} 2>/dev/null) -# [ -n "$VIRTCMD" ] && break -#done - if [ -z "${VIRTCMD}" ]; then - writelog "No QEMU/KVM found." + writelog "No QEMU/KVM found, exiting!" rm -rf ${RMDIRS} exit 1 -elif [ "${VIRTCMD}" = "qemu" ]; then - writelog "No KVM fouund. Starting slow QEMU emulation" - VIRTCMD="qemu" +elif [ "${VIRTCMD##*/}" = "qemu" ]; then + writelog "No user space KVM found. Using slow QEMU emulation" + writelog "User space emulation:\t\t${VIRTCMD}" else + writelog "User space virtualization:\t${VIRTCMD}" VIRTCMD="sudo $VIRTCMD" fi +# TODO: boot als var, -boot n, tftp... +VIRTCMDOPTS="${VIRTCMDOPTS} -boot c" + # set headless mode +# define first, you do not want VIRTCMDOPTS from graphical start VIRTCMDHL="$VIRTCMD" -VIRTCMDOPTSHL="${VIRTCMDOPTS} -boot c -alt-grab -nographic" +VIRTCMDOPTSHL="${VIRTCMDOPTS} -alt-grab -nographic -snapshot ${diskfile}" # graphical start VIRTCMD="$VIRTCMD" -VIRTCMDOPTS="${VIRTCMDOPTS} -boot c -alt-grab -full-screen ${diskfile}" +VIRTCMDOPTS="${VIRTCMDOPTS} -alt-grab -full-screen -snapshot ${diskfile}" diff --git a/os-plugins/plugins/qemukvm/init-hooks/60-have-servconfig/vm-dhcpd.sh b/os-plugins/plugins/qemukvm/init-hooks/60-have-servconfig/vm-dhcpd.sh index 153cac68..ed67bddb 100755 --- a/os-plugins/plugins/qemukvm/init-hooks/60-have-servconfig/vm-dhcpd.sh +++ b/os-plugins/plugins/qemukvm/init-hooks/60-have-servconfig/vm-dhcpd.sh @@ -13,9 +13,13 @@ # (should be kept identical to the files of virtualbox and vmware plugins) ############################################################################# +. /etc/openslx.conf + +CONFDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR} +testmkd ${CONFDIR} + # configuring dhcpd stub for virtual networks -testmkd /mnt/etc/opt/openslx -echo " +cat </mnt/etc/opt/openslx/udhcpd.conf +EOF \ + >${CONFDIR}/udhcpd.conf diff --git a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm index 8e04fdd6..26a2d926 100644 --- a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm +++ b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm @@ -118,8 +118,10 @@ sub installationPhase $self->{distro}->installVbox(); } if (!isInPath('VirtualBox')) { - print "VirtualBox is not installed. VirtualBox Plugin won't be installed!\n"; -# exit + print + "VirtualBox is not installed. VirtualBox Plugin won't be installed!\n" + ; + #exit } $self->_writeRunlevelScript(); @@ -127,7 +129,8 @@ sub installationPhase # Copy run-virt.include and template files to the appropriate place for # inclusion in stage4 my $pluginName = $self->{'name'}; - my $pluginBasePath = "$self->{openslxBasePath}/lib/plugins/$pluginName/files"; + my $pluginBasePath = + "$self->{openslxBasePath}/lib/plugins/$pluginName/files"; foreach my $file ( qw( run-virt.include virtualbox.include machine.include empty-diff*.vdi.gz ) ) { copyFile("$pluginBasePath/$file", "$self->{pluginRepositoryPath}/"); diff --git a/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm b/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm index a4f08bc1..c3186251 100644 --- a/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm +++ b/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm @@ -217,7 +217,7 @@ sub installationPhase { my $self = shift; my $info = shift; - + my $pluginRepoPath = $info->{'plugin-repo-path'}; my $openslxBasePath = $info->{'openslx-base-path'}; diff --git a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh index 18e62ea0..8d199ccf 100644 --- a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh +++ b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh @@ -38,7 +38,7 @@ RWSHARE=/var/opt/openslx/plugins/vmgrid/share ################################################################################ # function to write to stdout and logfile -mkdir -p ${RWSHARE}/var/log/openslx 2>/dev/null +mkdir -m 1777 -p ${RWSHARE}/var/log/openslx 2>/dev/null writelog () { # write to stdout echo -e "$1" diff --git a/os-plugins/plugins/vmgrid/files/vmgrid b/os-plugins/plugins/vmgrid/files/vmgrid index 7257226e..b8806ab3 100644 --- a/os-plugins/plugins/vmgrid/files/vmgrid +++ b/os-plugins/plugins/vmgrid/files/vmgrid @@ -51,7 +51,7 @@ RWSHARE=/var/opt/openslx/plugins/vmgrid/share ################################################################################ # function to write to stdout and logfile -mkdir -p ${RWSHARE}/var/log/openslx 2>/dev/null +mkdir -m 1777 -p ${RWSHARE}/var/log/openslx 2>/dev/null writelog () { # write to stdout echo -e "$1" -- cgit v1.2.3-55-g7522