Sha256: a575e8eb5eb5a055650e081461c27b4425b93a4b353a4be45887435a519abde1

Contents?: true

Size: 1.6 KB

Versions: 1

Compression:

Stored size: 1.6 KB

Contents

#
# Copyright 2010 Red Hat, Inc.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of
# the License, or (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this software; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.

require 'boxgrinder-build/plugins/os/rhel/rhel-plugin'

module BoxGrinder
  class CentOSPlugin < RHELPlugin

    def after_init
      super
      register_supported_os('centos', ['5', '6'])
    end

    def execute(appliance_definition_file)
      repos = {}

     @plugin_info[:versions].each do |version|
      repos[version] = {
          "base" => {
              "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=os"
          },
          "updates" => {
              "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=updates"
          }
        }
      end

      build_rhel(appliance_definition_file, repos)
    end
  end
end

plugin :class => BoxGrinder::CentOSPlugin, :type => :os, :name => :centos, :full_name  => "CentOS", :versions   => ["5", "6"]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
boxgrinder-build-0.9.8 lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb