Tell users what is about to be installed via sudo

Rather than just giving users the sudo password prompt immediately,
actually tell them what is about to be installed, so they know
whether it is reasonable to be entering their password.

Change-Id: Ic0c1de812be119384753895531a008075b13494e
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2012-01-05 13:15:15 +00:00
parent 8b79dae67c
commit d97b64b6e6
2 changed files with 3 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ Cor Cornelisse <cor@hyves.nl>
Cory Wright <corywright@gmail.com>
Dan Prince <dan.prince@rackspace.com>
Dan Wendlandt <dan@nicira.com>
Daniel P. Berrange <berrange@redhat.com>
Dave Walker <DaveWalker@ubuntu.com>
David Pravec <David.Pravec@danix.org>
David Subiros <david.perez5@hp.com>

View File

@@ -106,6 +106,7 @@ class UbuntuOneiric(Distro):
"""
The pip installed version of m2crypto has problems on oneiric
"""
print "Attempting to install 'python-m2crypto' via apt-get"
run_command(['sudo', 'apt-get', 'install', '-y',
"python-m2crypto"])
@@ -120,6 +121,7 @@ class Fedora(Distro):
check_exit_code=False)[1] == 0
def yum_install(self, pkg, **kwargs):
print "Attempting to install '%s' via yum" % pkg
run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
def apply_patch(self, originalfile, patchfile):