Skip to content

Commit 0bcb47b

Browse files
josepselgarsmontero
authored andcommitted
F #6912: Fix LVM Thin script requirements (#3752)
Signed-off-by: josepselga <[email protected]> (cherry picked from commit 29a294d)
1 parent 06a0969 commit 0bcb47b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/tm_mad/lib/backup_lvmthin.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,25 @@
1515
# See the License for the specific language governing permissions and #
1616
# limitations under the License. #
1717
#--------------------------------------------------------------------------- #
18+
19+
ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION)
20+
21+
if !ONE_LOCATION
22+
LIB_LOCATION ||= '/usr/lib/one'
23+
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
24+
GEMS_LOCATION ||= '/usr/share/one/gems'
25+
else
26+
LIB_LOCATION ||= ONE_LOCATION + '/lib'
27+
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
28+
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
29+
end
30+
31+
# %%RUBYGEMS_SETUP_BEGIN%%
32+
require 'load_opennebula_paths'
33+
# %%RUBYGEMS_SETUP_END%%
34+
35+
$LOAD_PATH << RUBY_LIB_LOCATION
36+
1837
$LOAD_PATH.unshift('/var/tmp/one')
1938

2039
require 'fileutils'

0 commit comments

Comments
 (0)