Commit 2df2ad5a authored by Christopher Huhn's avatar Christopher Huhn 🥚
Browse files

Keep the previous behaviour and package naming

parent 3f0b737a
......@@ -25,10 +25,22 @@
#
# Install from source if a specific version is defined
unless node[:cvmfs][:version].empty?
unless node['cvmfs']['version'].empty?
include_recipe 'cernvm-fs::install'
else
package 'cvmfs'
# Otherwise it is assumed a package can be installed
case node['platform_version'].to_i
when 7
if node['cvmfs']['server']['repos'].empty?
package 'cvmfs-client'
else
package 'cvmfs'
end
when 8,9
package 'cvmfs-client'
else
package 'cvmfs'
end
end
# Deploy files to the /etc/cvmfs/keys directory
......@@ -36,14 +48,14 @@ directory '/etc/cvmfs/keys' do
recursive true
end
node[:cvmfs][:keys].each do |name,key|
node['cvmfs']['keys'].each do |name, key|
file "/etc/cvmfs/keys/#{name}" do
mode "0644"
content key.gsub(/^ */,'')
end
end
if node[:cvmfs][:server][:repos].empty?
if node['cvmfs']['server']['repos'].empty?
include_recipe 'cernvm-fs::client'
else
include_recipe 'cernvm-fs::server'
......
#
# Cookbook Name:: cernvm-fs
#
# Copyright 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Christopher Huhn <C.Huhn@gsi.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'spec_helper'
describe package('cvmfs') do
@package_name = case os[:release]
when /^[7-9]\./
'cvmfs-client'
else
'cvmfs'
end
describe package(@package_name) do
it { should be_installed }
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment