From e4aedfabe7d586a5633a8be2dcb253b4ac7afca8 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Jan 2011 12:10:15 +0100 Subject: commit of quickfixes on 4.2 --- .../plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm | 5 ++--- src/os-plugins/plugins/kiosk/XX_kiosk.sh | 2 +- .../plugins/kiosk/files/profiles/plain/.bash_profile | 4 ++++ .../plugins/qemukvm/files/run-virt.include | 20 ++++++++++---------- .../plugins/virtualbox/files/run-virt.include | 9 ++++++--- src/os-plugins/plugins/vmchooser/files/run-virt.sh | 14 +++++++------- src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 12 ++++++------ 7 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 src/os-plugins/plugins/kiosk/files/profiles/plain/.bash_profile (limited to 'src') diff --git a/src/os-plugins/plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm b/src/os-plugins/plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm index bfeeae0a..ca0b87f2 100644 --- a/src/os-plugins/plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm +++ b/src/os-plugins/plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm @@ -35,8 +35,6 @@ sub new name => 'kiosk', }; - mkpath("$openslxConfig{'config-path'}/plugins/kiosk/profiles"); - return bless $self, $class; } @@ -98,7 +96,8 @@ sub installationPhase copyFile("$filesDir/kgetty","$pluginRepoPath"); - system(qq{cp -r $filesDir/profiles/* $openslxConfig{'config-path'}/plugins/kiosk/profiles/}); + system("mkdir -p /etc/openslx/kiosk/profiles/"); + system(qq{cp -r $filesDir/profiles/* /etc/openslx/kiosk/profiles/}); my $scriptpath = "$pluginRepoPath/setup.kgetty"; my $script = $self->{distro}->getKgettySetupScript(); diff --git a/src/os-plugins/plugins/kiosk/XX_kiosk.sh b/src/os-plugins/plugins/kiosk/XX_kiosk.sh index c7e275ad..55421785 100644 --- a/src/os-plugins/plugins/kiosk/XX_kiosk.sh +++ b/src/os-plugins/plugins/kiosk/XX_kiosk.sh @@ -23,7 +23,7 @@ if [ -e /initramfs/plugin-conf/kiosk.conf ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'kiosk' os-plugin ..."; - profile_path="/etc/opt/openslx/plugins/kiosk/profiles/" + profile_path="/etc/openslx/kiosk/profiles/" # avoid ldap conflicts - part I # hide nsswitch.conf diff --git a/src/os-plugins/plugins/kiosk/files/profiles/plain/.bash_profile b/src/os-plugins/plugins/kiosk/files/profiles/plain/.bash_profile new file mode 100644 index 00000000..28694f85 --- /dev/null +++ b/src/os-plugins/plugins/kiosk/files/profiles/plain/.bash_profile @@ -0,0 +1,4 @@ +if [ "x$(tty)" == "x/dev/tty1" ]; then + startx + exit +fi diff --git a/src/os-plugins/plugins/qemukvm/files/run-virt.include b/src/os-plugins/plugins/qemukvm/files/run-virt.include index c8b2a82b..a762ec18 100644 --- a/src/os-plugins/plugins/qemukvm/files/run-virt.include +++ b/src/os-plugins/plugins/qemukvm/files/run-virt.include @@ -46,7 +46,7 @@ diskfile=${vmpath} # check the file type if echo ${imgname} | grep -iE "img|qcow|vmdk" >/dev/null 2>&1; then - imgtype=$(echo ${imgname##*.} | tr [a-z] [A-Z]) + imgtype=$(echo ${imgname##*.} | tr "[a-z]" "[A-Z]") else writelog "${imgname} is not a valid image type (img|qcow*|vmdk), exiting!" exit 1 @@ -122,24 +122,24 @@ qemu_ifscr="script=${PLUGINCONFQK}/ifup,downscript=${PLUGINCONFQK}/ifdown" case "${network_kind}" in bridge*) VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tapbridge${VM_ID},${qemu_ifscr}" - sudo /opt/openslx/rootfs/sbin/tunctl -t tapbridge${VM_ID} -u ${USER} \ + sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapbridge${VM_ID} -u ${USER} \ >/dev/null 2>&1 - sudo /opt/openslx/rootfs/usr/sbin/brctl addif br0 tapbridge${VM_ID} - POSTRUN="/opt/openslx/rootfs/sbin/tunctl -d tapbridge${VM_ID}" + sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapbridge${VM_ID} + POSTRUN="/opt/openslx/uclib-rootfs/sbin/tunctl -d tapbridge${VM_ID}" ;; nat) VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tapnat${VM_ID},${qemu_ifscr}" - sudo /opt/openslx/rootfs/sbin/tunctl -t tapnat${VM_ID} -u ${USER} \ + sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapnat${VM_ID} -u ${USER} \ >/dev/null 2>&1 - sudo /opt/openslx/rootfs/usr/sbin/brctl addif br0 tapnat${VM_ID} - POSTRUN="/opt/openslx/rootfs/sbin/tunctl -d tapnat${VM_ID}" + sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapnat${VM_ID} + POSTRUN="/opt/openslx/uclib-rootfs/sbin/tunctl -d tapnat${VM_ID}" ;; host*) VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=taphost${VM_ID},${qemu_ifscr}" - sudo /opt/openslx/rootfs/sbin/tunctl -t taphost${VM_ID} -u ${USER} \ + sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t taphost${VM_ID} -u ${USER} \ >/dev/null 2>&1 - sudo /opt/openslx/rootfs/usr/sbin/brctl addif br0 taphost${VM_ID} - POSTRUN="/opt/openslx/rootfs/sbin/tunctl -d taphost${VM_ID}" + sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 taphost${VM_ID} + POSTRUN="/opt/openslx/uclib-rootfs/sbin/tunctl -d taphost${VM_ID}" ;; *) network_kind="user" diff --git a/src/os-plugins/plugins/virtualbox/files/run-virt.include b/src/os-plugins/plugins/virtualbox/files/run-virt.include index 53120f2c..d05913ad 100644 --- a/src/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/src/os-plugins/plugins/virtualbox/files/run-virt.include @@ -67,7 +67,7 @@ diskfile="${diskfolder}/${imgname}" # check the file type if echo ${imgname} | grep -qiE "vdi|vmdk|vhd" && [ ${diskless} -eq 0 ]; then - imgfmt=$(echo ${imgname##*.} | tr [a-z] [A-Z]) + imgfmt=$(echo ${imgname##*.} | tr "[a-z]" "[A-Z]") elif [ ${diskless} -eq 0 ]; then writelog "${imgname} is not a valid image format (vdi|vmdk|vhd), exiting!" cleanexit 1 @@ -120,14 +120,14 @@ macaddr=$(echo ${macaddr} | sed 's/://g') # machine UUID, MAC addr part of it machineuuid="00000000-0000-0000-0000-${macaddr}" # cosmetical, since UUID in lower case -machineuuid=$(echo ${machineuuid} | tr [A-Z] [a-z]) +machineuuid=$(echo ${machineuuid} | tr "[A-Z]" "[a-z]") # get UUID of VBox image, if not diskless [ ${diskless} -eq 0 ] && diskuuid=$(VBoxManage -q showvdiinfo ${diskfile} \ | grep UUID | awk '{print $2}') # make disk immutable imgtype="Immutable" # snapshot UUID is static -snapshotuuid="88bc8b6d-f248-468a-95fe-318084904f8b" +snapshotuuid="34f617be-192a-46b3-a8ae-bce1029e093f" # imageuuid in machine.include, dafault snapshotuuid imageuuid=${snapshotuuid} @@ -157,6 +157,9 @@ elif [ ${diskless} -eq 0 ]; then # use temp disk as snapshot cat ${PLUGINDIRVIRTUALBOX}/empty-diff.vdi.gz \ | gunzip > "${snapshotdir}/{${snapshotuuid}}.vdi" + # patch the disk file uuid into the snapshot vdi file + dd if=${diskfile} of="${snapshotdir}/{${snapshotuuid}}.vdi" seek=424 \ + skip=392 bs=1 count=16 conv=notrunc fi # TODO: MEM muss noch angepasst werden. Maschine crasht wenn nehr als 50% MEM diff --git a/src/os-plugins/plugins/vmchooser/files/run-virt.sh b/src/os-plugins/plugins/vmchooser/files/run-virt.sh index aff0294c..4ba95db3 100644 --- a/src/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/src/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -217,7 +217,7 @@ xmlvirt=$(grep -o 'virtualmachine param=.*"' ${xmlfile} \ if [ -z "${xmlvirt}" ] && [ -n "${additional_config}" ]; then writelog "No virtual machine parameter defined in ${xmlfile}" writelog "Trying to guess VM...\c" - case "$(cat ${additional_config} | tr [A-Z] [a-z])" in + case "$(cat ${additional_config} | tr \"[A-Z]\" \"[a-z]\")" in *config.version*|*virtualhw.version*|*independent-nonpersistent*|*vmdk*) xmlvirt="vmware" ;; @@ -232,7 +232,7 @@ if [ -z "${xmlvirt}" ] && [ -n "${additional_config}" ]; then ;; esac elif [ -z "${xmlvirt}" ]; then - case "$(echo ${imgname##*.} | tr [A-Z] [a-z])" in + case "$(echo ${imgname##*.} | tr \"[A-Z]\" \"[a-z]\")" in vmdk) xmlvirt="vmware" ;; @@ -251,13 +251,13 @@ fi # definition of the client system vmostype=$(grep -io '/dev/null 2>&1 & + /usr/local/bin/pvsgui -p 2 -b >/dev/null 2>&1 & fi ${VIRTCMD} ${VIRTCMDOPTS} writelog "Bye." diff --git a/src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh b/src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh index 51cb5dbc..c4a680b3 100644 --- a/src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh +++ b/src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh @@ -267,7 +267,7 @@ xmlvirt=$(grep -o 'virtualmachine param=.*"' ${xmlfile} \ if [ -z "${xmlvirt}" ] && [ -n "${additional_config}" ]; then writelog "No virtual machine parameter defined in ${xmlfile}" writelog "Trying to guess VM...\c" - case "$(cat ${additional_config} | tr [A-Z] [a-z])" in + case "$(cat ${additional_config} | tr \"[A-Z]\" \"[a-z]\")" in *config.version*|*virtualhw.version*|*independent-nonpersistent*|*vmdk*) xmlvirt="vmware" ;; @@ -282,7 +282,7 @@ if [ -z "${xmlvirt}" ] && [ -n "${additional_config}" ]; then ;; esac elif [ -z "${xmlvirt}" ]; then - case "$(echo ${imgname##*.} | tr [A-Z] [a-z])" in + case "$(echo ${imgname##*.} | tr \"[A-Z]\" \"[a-z]\")" in vmdk) xmlvirt="vmware" ;; @@ -308,13 +308,13 @@ fi # definition of the client system vmostype=$(grep -io '