Sha256: c5b2169865aa989b0757a483ffaff527921c7fbd0bacc014050a2159e9c9c7bb

Contents?: true

Size: 601 Bytes

Versions: 96

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

96 entries across 96 versions & 1 rubygems

Version Path
specinfra-0.7.2 lib/specinfra/command/plamo.rb
specinfra-0.7.1 lib/specinfra/command/plamo.rb
specinfra-0.7.0 lib/specinfra/command/plamo.rb
specinfra-0.6.1 lib/specinfra/command/plamo.rb
specinfra-0.6.0 lib/specinfra/command/plamo.rb
specinfra-0.5.9 lib/specinfra/command/plamo.rb
specinfra-0.5.8 lib/specinfra/command/plamo.rb
specinfra-0.5.7 lib/specinfra/command/plamo.rb
specinfra-0.5.6 lib/specinfra/command/plamo.rb
specinfra-0.5.5 lib/specinfra/command/plamo.rb
specinfra-0.5.4 lib/specinfra/command/plamo.rb
specinfra-0.5.3 lib/specinfra/command/plamo.rb
specinfra-0.5.2 lib/specinfra/command/plamo.rb
specinfra-0.5.1 lib/specinfra/command/plamo.rb
specinfra-0.5.0 lib/specinfra/command/plamo.rb
specinfra-0.4.1 lib/specinfra/command/plamo.rb
specinfra-0.4.0 lib/specinfra/command/plamo.rb
specinfra-0.3.2 lib/specinfra/command/plamo.rb
specinfra-0.3.1 lib/specinfra/command/plamo.rb
specinfra-0.3.0 lib/specinfra/command/plamo.rb