On 03/03/2011 09:04 AM, Justin Clift wrote:
On 03/03/2011, at 7:55 AM, Mohammed Morsi wrote:
<snip>
> PORT="${PORT:-3002}"
> LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core }"
> LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}"
> +export
DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.2.0/lib/deltacloud/drivers/mock/data/
Is the "1.8" in the above string the Ruby version? If so, that's probably
not so good. ;> (make it a variable?)
Ah tru. We can make it a variable or instead simply use the 'Gem::dir'
defined by the rubygems library
$ ruby -rrubygems -e 'print Gem::dir'
> /usr/lib/ruby/gems/1.8
If this patch works I can replace the line added with:
export DELTACLOUD_MOCK_STORAGE=`ruby -rrubygems -e 'print
Gem::dir'`/gems/deltacloud-core-0.2.0/lib/deltacloud/drivers/mock/data/
We can also make the core version ('0.2.0' in this case) a variable as well.
-Mo