Skip to content

Commit

Permalink
Use sudo when asking on registration managers being present
Browse files Browse the repository at this point in the history
Fixes regression introduced by #59.
  • Loading branch information
strzibny committed Jan 29, 2016
1 parent b1771d0 commit 8b51656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/guests/redhat/cap/rhn_register.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def self.rhn_register_registered?(machine)

# Test that we have rhn installed
def self.rhn_register(machine)
machine.communicate.test('/usr/sbin/rhn_check --version') &&
machine.communicate.test('/usr/sbin/rhnreg_ks --version')
machine.communicate.test('/usr/sbin/rhn_check --version', sudo: true) &&
machine.communicate.test('/usr/sbin/rhnreg_ks --version', sudo: true)
end

# Register the machine using 'rhnreg_ks' command, config is (Open)Struct
Expand Down
2 changes: 1 addition & 1 deletion plugins/guests/redhat/cap/subscription_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def self.subscription_manager_registered?(machine)

# Test that we have subscription-manager installed
def self.subscription_manager(machine)
machine.communicate.test('/usr/sbin/subscription-manager')
machine.communicate.test('/usr/sbin/subscription-manager', sudo: true)
end

# Register the machine using 'register' option, config is (Open)Struct
Expand Down

0 comments on commit 8b51656

Please sign in to comment.