1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

bug #290: Fixed dd option, and more generic binaries search.

This commit is contained in:
Carlos Martín 2010-07-23 11:47:51 +02:00 committed by Ruben S. Montero
parent 3c12f15607
commit 62bf916c7b

View File

@ -180,8 +180,8 @@ module OpenNebula
# Constants and Class Methods # Constants and Class Methods
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
FS_UTILS = { FS_UTILS = {
:dd => "/bin/dd", :dd => "env dd",
:mkfs => "/bin/mkfs" :mkfs => "env mkfs"
} }
def copy(path, source) def copy(path, source)
@ -221,7 +221,7 @@ module OpenNebula
command = "" command = ""
command << FS_UTILS[:dd] command << FS_UTILS[:dd]
command << " if=/dev/zero of=#{source} ibs=1 count=1" command << " if=/dev/zero of=#{source} ibs=1 count=1"
command << " obs=1048576 oseek=#{size}" command << " obs=1048576 seek=#{size}"
local_command=LocalCommand.run(command) local_command=LocalCommand.run(command)