From 3630d72f0af52cc730612ddd0a5d1511ebab0e4f Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 17 Aug 2013 15:00:25 +0000 Subject: [PATCH] Use absolute paths everywhere --- plugins/opennebula/tasks.py | 2 +- plugins/user_packages/user_packages.py | 2 +- providers/ec2/tasks/boot.py | 2 +- providers/kvm/tasks/boot.py | 2 +- providers/virtualbox/tasks/boot.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/opennebula/tasks.py b/plugins/opennebula/tasks.py index d45cbd6..ad4f8b4 100644 --- a/plugins/opennebula/tasks.py +++ b/plugins/opennebula/tasks.py @@ -23,7 +23,7 @@ class OpenNebulaContext(Task): os.chmod(script_dst, rwxr_xr_x) from common.tools import log_check_call - log_check_call(['/usr/sbin/chroot', info.root, 'dpkg', '-i', '/tmp/one-context_3.8.1.deb']) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/bin/dpkg', '-i', '/tmp/one-context_3.8.1.deb']) # Fix start from common.tools import sed_i vmcontext_def = os.path.join(info.root, 'etc/init.d/vmcontext') diff --git a/plugins/user_packages/user_packages.py b/plugins/user_packages/user_packages.py index 3ad8c1b..ceef601 100644 --- a/plugins/user_packages/user_packages.py +++ b/plugins/user_packages/user_packages.py @@ -42,4 +42,4 @@ class AddLocalUserPackages(Task): copy(script_src, script_dst) os.chmod(script_dst, rwxr_xr_x) - log_check_call(['/usr/sbin/chroot', info.root, 'dpkg', '-i', '/tmp/'+os.path.basename(script_src)]) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/bin/dpkg', '-i', '/tmp/'+os.path.basename(script_src)]) diff --git a/providers/ec2/tasks/boot.py b/providers/ec2/tasks/boot.py index 375cf1d..229c88d 100644 --- a/providers/ec2/tasks/boot.py +++ b/providers/ec2/tasks/boot.py @@ -31,4 +31,4 @@ class ConfigureGrub(Task): from common.tools import log_check_call log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) - log_check_call(['/usr/sbin/chroot', info.root, 'ln', '-s', '/boot/grub/grub.cfg', '/boot/grub/menu.lst']) + log_check_call(['/usr/sbin/chroot', info.root, '/bin/ln', '-s', '/boot/grub/grub.cfg', '/boot/grub/menu.lst']) diff --git a/providers/kvm/tasks/boot.py b/providers/kvm/tasks/boot.py index e7ef3a0..73a6ea0 100644 --- a/providers/kvm/tasks/boot.py +++ b/providers/kvm/tasks/boot.py @@ -36,7 +36,7 @@ class ConfigureGrub(Task): with open(modules_path, 'a') as modules: modules.write("\nvirtio_pci\nvirtio_blk\n") - log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u']) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-initramfs', '-u']) # Install grub in mbr log_check_call(['/usr/sbin/grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']]) diff --git a/providers/virtualbox/tasks/boot.py b/providers/virtualbox/tasks/boot.py index 02943b6..b55e4fe 100644 --- a/providers/virtualbox/tasks/boot.py +++ b/providers/virtualbox/tasks/boot.py @@ -28,7 +28,7 @@ class ConfigureGrub(Task): script_dst = os.path.join(info.root, 'etc/grub.d/00_header') copy(script_src, script_dst) os.chmod(script_dst, rwxr_xr_x) - log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u']) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-initramfs', '-u']) # Install grub in mbr log_check_call(['/usr/sbin/grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']])