Skip to content

Commit

Permalink
[dist] fix rcobsworker vm detection so vm vars from /etc/sysconfig/ob…
Browse files Browse the repository at this point in the history
…s-worker get passed to vm again

Signed-off-by: Martin Mohring <martin.mohring@5eecosystems.com>
Tested-by: Martin Mohring <martin.mohring@5eecosystems.com>
  • Loading branch information
mmohring authored and adrianschroeter committed Apr 3, 2012
1 parent 48e1309 commit f449a0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dist/obsworker
Expand Up @@ -104,11 +104,13 @@ if [ -n "$OBS_VM_TYPE" -a "$OBS_VM_TYPE" != "auto" ] ; then
fi
elif [ -e /dev/kvm ] ; then
vmopt=--kvm
OBS_VM_TYPE="kvm"
elif [ -e /sys/hypervisor/type ] && grep -q xen /sys/hypervisor/type; then
vmopt=--xen
OBS_VM_TYPE="xen"
fi

if [ -n "$vmopt" -a "$OBS_VM_TYPE" = "xen" -o "$OBS_VM_TYPE" = "kvm" ]; then
if [ "$OBS_VM_TYPE" = "xen" -o "$OBS_VM_TYPE" = "kvm" ]; then
# we start up in VM mode, check for the worker disk options
if [ -n "$OBS_VM_DISK_AUTOSETUP_ROOT_FILESIZE" -a -n "$OBS_VM_DISK_AUTOSETUP_SWAP_FILESIZE" ]; then
VMDISK_ROOT_FILESIZE="--vmdisk-rootsize ${OBS_VM_DISK_AUTOSETUP_ROOT_FILESIZE}"
Expand Down

0 comments on commit f449a0b

Please sign in to comment.