summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmltk5
-rwxr-xr-xopenslx2
-rw-r--r--remote/includes/packagemanager.inc26
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt1
-rw-r--r--remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include43
-rw-r--r--remote/modules/xorg/xorg.conf.debian1
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/bin/activate_sysconfig2
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init2
-rw-r--r--remote/rootfs/rootfs-stage32/data/etc/systemd/system/mount-stage4.service10
l---------[-rw-r--r--]remote/rootfs/rootfs-stage32/data/etc/systemd/system/nfs-mount.service11
-rw-r--r--remote/rootfs/rootfs-stage32/data/etc/systemd/system/stage4.target3
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_stage4 (renamed from remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export)4
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf.opensuse3
l---------server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/mount-stage4.service1
l---------server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/nfs-mount.service1
15 files changed, 75 insertions, 40 deletions
diff --git a/mltk b/mltk
index ca736592..95b924d5 100755
--- a/mltk
+++ b/mltk
@@ -1,7 +1,7 @@
#!/bin/bash
# -----------------------------------------------------------------------------
#
-# Copyright (c) 2011 - OpenSLX GmbH
+# Copyright (c) 2014 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -183,6 +183,9 @@ read_params() {
if [[ "$1" != -* ]]; then
TARGET="$1"
shift
+ elif [[ "$1" == "-h" || "$1" == "--help" ]]; then
+ print_usage
+ exit 1
elif [[ "$1" != "-n" ]]; then
perror "A target is required. None given."
fi
diff --git a/openslx b/openslx
index ca79800a..e5026bab 100755
--- a/openslx
+++ b/openslx
@@ -1,7 +1,7 @@
#!/bin/bash
# -----------------------------------------------------------------------------
#
-# Copyright (c) 2011 - OpenSLX GmbH
+# Copyright (c) 2014 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
diff --git a/remote/includes/packagemanager.inc b/remote/includes/packagemanager.inc
index 6f0d86dd..edd3949e 100644
--- a/remote/includes/packagemanager.inc
+++ b/remote/includes/packagemanager.inc
@@ -60,7 +60,9 @@ install_packages() {
local INSTALLED_PACKAGES=""
for PKG in ${PACKAGE_LIST}; do
- # check if installed
+ # check if installed:
+ # this is done mainly for performance reasons, even though
+ # reinstalling all packages is a valid possibility too...
if [ "x$PACKET_HANDLER" == "xdpkg" ]; then
dpkg -l ${PKG} > /dev/null 2>&1
elif [ "x$PACKET_HANDLER" == "xrpm" ]; then
@@ -71,15 +73,19 @@ install_packages() {
local LRET=$?
if [ "x$LRET" == "x0" ]; then
- # check if it is completly installed,
- # not just leftover configuration files
- local INSTALL_STATUS=$(dpkg -l $PKG | grep $PKG | cut -c1-2)
- if [[ $INSTALL_STATUS != "ii" ]]; then
- pinfo "$PKG not installed!"
+ # check if it is completly installed, not just leftover configuration files
+ if [ "x$PACKET_HANDLER" == "xdpkg" ]; then
+ local INSTALL_STATUS=$(dpkg -l $PKG | grep $PKG | cut -c1-2)
+ if [[ $INSTALL_STATUS != "ii" ]]; then
+ pinfo "$PKG is either missing or a meta-package! Installing it to be sure..."
+ install_package $PKG
+ else
+ # package installed
+ pdebug "$PKG installed!"
+ fi
+ elif [ "x$PACKET_HANDLER" == "xrpm" ]; then
+ # TODO: blindly install again for now
install_package $PKG
- else
- # package installed
- pdebug "$PKG installed!"
fi
else
# package not installed
@@ -87,7 +93,7 @@ install_packages() {
install_package $PKG
fi
done
- [ ! -z "$INSTALLED_PACKAGES" ] && pinfo "Packages installed: ${INSTALLED_PACKAGES}"
+ [ ! -z "$INSTALLED_PACKAGES" ] && pinfo "New packages installed: ${INSTALLED_PACKAGES}"
}
#
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 bef43dd1..8e4e57a8 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -316,6 +316,7 @@ vmostype=$(grep -io '<os param=.*"' "${xmlfile}" | awk -F '"' '{ print $2 }' | t
# Definition of the networking the client system is connected to
network_kind=$(grep -io '<network param=.*"' "${xmlfile}" | awk -F '"' '{ print $2 }' | tr "[A-Z]" "[a-z]")
network_card=$(grep -io '<netcard param=.*"' "${xmlfile}" | awk -F '"' '{ print $2 }'| tr "[A-Z]" "[a-z]")
+override_hddtype=$(grep -io '<hddtype param=.*"' "${xmlfile}" | awk -F '"' '{ print $2 }'| tr "[A-Z]" "[a-z]")
# Set redirects to 0, see vmgrid if you want to define some
redirects=0
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
index 3f24e9d5..ef29f495 100644
--- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
+++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
@@ -534,21 +534,36 @@ checkpoint.vmState = \"$stateFilePath\""
POSTRUN="stateFilePath=\"\$(readlink -f \"${confdir}/\"*.vmss)\" && memoryFilePath=\"\$(readlink -f \"${confdir}/\"*.vmem)\" && [ -f \"\$stateFilePath\" ] && echo \"Saving state and memory file \\\"\$stateFilePath\\\" and \\\"\$memoryFilePath\\\".\" && mv -f \"\$stateFilePath\" \"$(dirname "$diskfile")/\" && mv -f \"\$memoryFilePath\" \"$(dirname "$diskfile")/\""
fi
##
-hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" | awk -F '"' '{print $2}')
hwver=$(echo "${imghead}" | grep -m1 -ia "ddb.virtualHWVersion" | awk -F '"' '{print $2}')
-case "${hddrv}" in
- ide)
- ide="TRUE"
- scsi="FALSE"
- ;;
- lsilogic|buslogic)
- ide="FALSE"
- scsi="TRUE"
- ;;
- *)
- slxlog "virt-vmware-hdd" "vmware: Unknown HDD adapter type $hddrv"
- ;;
-esac
+
+if [ "x$override_hddtype" = "xide" ]; then
+ ide="TRUE"
+ scsi="FALSE"
+ hddrv="ide"
+elif [ "x$override_hddtype" = "xscsi" ]; then
+ ide="FALSE"
+ scsi="TRUE"
+ hddrv="lsilogic"
+else
+ unset override_hddtype
+fi
+
+if [ -z "$override_hddtype" ]; then
+ hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" | awk -F '"' '{print $2}')
+ case "${hddrv}" in
+ ide)
+ ide="TRUE"
+ scsi="FALSE"
+ ;;
+ lsilogic|buslogic)
+ ide="FALSE"
+ scsi="TRUE"
+ ;;
+ *)
+ slxlog "virt-vmware-hdd" "vmware: Unknown HDD adapter type $hddrv"
+ ;;
+ esac
+fi
# write configuration files
################################################################################
diff --git a/remote/modules/xorg/xorg.conf.debian b/remote/modules/xorg/xorg.conf.debian
index 1ce74939..2cc9d6f1 100644
--- a/remote/modules/xorg/xorg.conf.debian
+++ b/remote/modules/xorg/xorg.conf.debian
@@ -1,5 +1,4 @@
REQUIRED_INSTALLED_PACKAGES="
- xprintidle
"
REQUIRED_CONTENT_PACKAGES="
xserver-xorg$UBUNTU_XORG_PKG_SUFFIX
diff --git a/remote/rootfs/rootfs-stage31/data/bin/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/bin/activate_sysconfig
index 3f8029a7..580b23ed 100755
--- a/remote/rootfs/rootfs-stage31/data/bin/activate_sysconfig
+++ b/remote/rootfs/rootfs-stage31/data/bin/activate_sysconfig
@@ -64,7 +64,7 @@ HEREEND
local TEMP_EXTRACT_DIR="/tmp/config.tgz.tmp"
mkdir -p "${TEMP_EXTRACT_DIR}"
tar xf "${CONFIG}.tgz" -C "${TEMP_EXTRACT_DIR}" || { echo "Could not untar ${CONFIG}.tgz to ${TEMP_EXTRACT_DIR}"; return 1; }
- chown -R 0:0 "${TEMP_EXTRACT_DIR}"
+ chown -R 0:0 "${TEMP_EXTRACT_DIR}" 2>/dev/null
cd "${TEMP_EXTRACT_DIR}"
tar -cp * | tar -xp -C "${FUTURE_ROOT}"
}
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index b5759491..ae65d9da 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -26,7 +26,7 @@ busybox mount -n -t tmpfs -o 'mode=755' run "/run"
# preparations for mounting stage3.2
FUTURE_ROOT="/dev/shm/uniontmp"
mkdir -p "$FUTURE_ROOT" /rorootfs
-busybox mount -n -t tmpfs none "$FUTURE_ROOT"
+busybox mount -n -t tmpfs -o 'mode=755' none "$FUTURE_ROOT"
mkdir -p "$FUTURE_ROOT/opt/openslx"
# let kernel know that mdev is to be used for hotplug
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/mount-stage4.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/mount-stage4.service
new file mode 100644
index 00000000..15725f8f
--- /dev/null
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/mount-stage4.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Mount Openslx Stage 4
+DefaultDependencies=no
+Wants=setup-dnbd3.service
+After=setup-dnbd3.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/opt/openslx/scripts/systemd-mount_stage4
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/nfs-mount.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/nfs-mount.service
index 3deb3def..c1792e42 100644..120000
--- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/nfs-mount.service
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/nfs-mount.service
@@ -1,10 +1 @@
-[Unit]
-Description=Mount NFS Share [TEST]
-DefaultDependencies=no
-Wants=setup-dnbd3.service
-After=setup-dnbd3.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/opt/openslx/scripts/systemd-mount_export
+mount-stage4.service \ No newline at end of file
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/stage4.target b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/stage4.target
new file mode 100644
index 00000000..465a324c
--- /dev/null
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/stage4.target
@@ -0,0 +1,3 @@
+[Unit]
+
+Description=OpenSLX Stage 4
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_stage4
index 4c8597a9..abc28f73 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_stage4
@@ -58,3 +58,7 @@ fi
# dbus reload needed eg. for gnome etc. and perhaps other service files which stage4 needs:
systemctl reload dbus.service
+# tell systemd that stage4 was reached.
+systemctl start stage4.target &
+
+exit 0
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.opensuse b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.opensuse
index b5630284..4b11529b 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.opensuse
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.opensuse
@@ -17,3 +17,6 @@ REQUIRED_DIRECTORIES="
REQUIRED_FILES+="
/usr/share/X11/app-defaults/Xvidtune
"
+REQUIRED_KERNEL_MODULES+="
+ kernel/drivers/cdrom
+"
diff --git a/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/mount-stage4.service b/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/mount-stage4.service
new file mode 120000
index 00000000..80390894
--- /dev/null
+++ b/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/mount-stage4.service
@@ -0,0 +1 @@
+../mount-stage4.service \ No newline at end of file
diff --git a/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/nfs-mount.service b/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/nfs-mount.service
deleted file mode 120000
index 1936daef..00000000
--- a/server/modules/stage4-at-boot/etc/systemd/system/basic.target.wants/nfs-mount.service
+++ /dev/null
@@ -1 +0,0 @@
-../nfs-mount.service \ No newline at end of file