Sha256: 29032900e9d439f73b763068a5b63ce23c3cb573f08b8de96db5163f4bb449f0

Contents?: true

Size: 652 Bytes

Versions: 63

Compression:

Stored size: 652 Bytes

Contents

module SpecInfra
  module Command
    class SuSE < Linux
      def check_enabled(service, level=3)
        "chkconfig --list #{escape(service)} | grep #{level}:on"
      end

      def check_installed(package,version=nil)
        cmd = "rpm -q #{escape(package)}"
        if version
          cmd = "#{cmd} | grep -w -- #{escape(version)}"
        end
        cmd
      end

      alias :check_installed_by_rpm :check_installed

      def install(package)
        cmd = "zypper -n install #{package}"
      end

      def get_package_version(package, opts=nil)
        "rpm -qi #{package} | grep Version | awk '{print $3}'"
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
specinfra-1.9.0 lib/specinfra/command/suse.rb
specinfra-1.8.0 lib/specinfra/command/suse.rb
specinfra-1.7.0 lib/specinfra/command/suse.rb
specinfra-1.6.0 lib/specinfra/command/suse.rb
specinfra-1.5.1 lib/specinfra/command/suse.rb
specinfra-1.5.0 lib/specinfra/command/suse.rb
specinfra-1.4.0 lib/specinfra/command/suse.rb
specinfra-1.3.0 lib/specinfra/command/suse.rb
specinfra-1.2.1 lib/specinfra/command/suse.rb
specinfra-1.2.0 lib/specinfra/command/suse.rb
specinfra-1.1.1 lib/specinfra/command/suse.rb
specinfra-1.1.0 lib/specinfra/command/suse.rb
specinfra-1.0.5 lib/specinfra/command/suse.rb
specinfra-1.0.4 lib/specinfra/command/suse.rb
specinfra-1.0.3 lib/specinfra/command/suse.rb
specinfra-1.0.2 lib/specinfra/command/suse.rb
specinfra-1.0.1 lib/specinfra/command/suse.rb
specinfra-1.0.0 lib/specinfra/command/suse.rb
specinfra-0.8.0 lib/specinfra/command/suse.rb
specinfra-0.7.3 lib/specinfra/command/suse.rb