Class: Serverspec::Commands::SmartOS
- Defined in:
- lib/serverspec/commands/smartos.rb
Instance Method Summary collapse
Methods inherited from Solaris
#check_access_by_user, #check_belonging_group, #check_cron_entry, #check_enabled, #check_file_contain_within, #check_gid, #check_home_directory, #check_ipfilter_rule, #check_ipnat_rule, #check_listening, #check_login_shell, #check_reachable, #check_running, #check_svcprop, #check_svcprops, #check_zfs
Methods inherited from Base
#check_access_by_user, #check_authorized_key, #check_belonging_group, #check_cron_entry, #check_directory, #check_enabled, #check_file, #check_file_contain, #check_file_contain_within, #check_file_md5checksum, #check_gid, #check_group, #check_grouped, #check_home_directory, #check_installed_by_gem, #check_installed_by_npm, #check_installed_by_pecl, #check_ipfilter_rule, #check_ipnat_rule, #check_iptables_rule, #check_kernel_module_loaded, #check_link, #check_listening, #check_login_shell, #check_mode, #check_monitored_by_monit, #check_mounted, #check_owner, #check_process, #check_reachable, #check_resolvable, #check_routing_table, #check_running, #check_running_under_supervisor, #check_running_under_upstart, #check_selinux, #check_socket, #check_svcprop, #check_svcprops, #check_uid, #check_user, #check_yumrepo, #check_yumrepo_enabled, #check_zfs, #escape, #get_mode
Instance Method Details
#check_installed(package, version = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/serverspec/commands/smartos.rb', line 4 def check_installed(package, version=nil) cmd = "/opt/local/bin/pkgin list 2> /dev/null | grep -qw ^#{escape(package)}" if version cmd = "#{cmd}-#{escape(version)}" end cmd end |