Sha256: 1c6045df5bd9723d48fc9587621eed9165c2a79f0aed5d586965cf1c181b14c2

Contents?: true

Size: 601 Bytes

Versions: 5

Compression:

Stored size: 601 Bytes

Contents

module Specinfra
  module Command
    class Plamo < Linux

      def check_enabled(service, level=3)
        # This check is not necessarily detected whether service is enabled or not
        # TODO: check rc.inet2 $SERV variable
        "test -x /etc/rc.d/init.d/#{escape(service)}"
      end

      def check_installed(package, version=nil)
        cmd = "ls /var/log/packages/#{escape(package)}"
        if version
          cmd = "#{cmd} && grep -E \"PACKAGE NAME:.+#{escape(package)}-#{escape(version)}\" /var/log/packages/#{escape(package)}"
        end
        cmd
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta6 lib/specinfra/command/plamo.rb
specinfra-2.0.0.beta5 lib/specinfra/command/plamo.rb
specinfra-2.0.0.beta4 lib/specinfra/command/plamo.rb
specinfra-2.0.0.beta3 lib/specinfra/command/plamo.rb
specinfra-2.0.0.beta2 lib/specinfra/command/plamo.rb