summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-10-28 12:48:45 +0100
committerJoel Andres Granados <jgranado@redhat.com>2008-10-28 12:48:45 +0100
commit6832bb37603698412993f166ff8a3317c87beadd (patch)
tree727df2485974c695e35d7f3a9844843a488d8707 /plugins
parent6db0f50a080f56369f93f7a1604ff754d838be73 (diff)
downloadfirstaidkit-6832bb37603698412993f166ff8a3317c87beadd.tar.gz
firstaidkit-6832bb37603698412993f166ff8a3317c87beadd.tar.xz
firstaidkit-6832bb37603698412993f166ff8a3317c87beadd.zip
Grub Plugin:
1. Fix a repeated line and some lines that were over 80 chars. 2. Inform the user how to execute grub in order to install the bootloader into one of the drives.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/grub/grub.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/grub/grub.py b/plugins/grub/grub.py
index 63df699..c215729 100644
--- a/plugins/grub/grub.py
+++ b/plugins/grub/grub.py
@@ -182,6 +182,9 @@ class Grub(Plugin):
# leave everything alone:)
self.install_grub_parts = []
self.install_grub_devs = []
+ self._reporting.info("Grub will modify any drive. " \
+ "If you want grub to take action you must specify: " \
+ "--install-to, --install-all or --install-auto."
self._result = ReturnSuccess
except Exception, e:
@@ -237,7 +240,6 @@ class Grub(Plugin):
"all storage devices in the system.", origin = self)
firstblockdict = {}
for device in self.install_grub_devs:
- #for (device, partitions) in self.devices.iteritems():
fd = os.open(device.path(), os.O_RDONLY)
first446btemp = os.read(fd, 446)
os.close(fd)
@@ -252,8 +254,6 @@ class Grub(Plugin):
origin = self)
self.issue_grub_image.set(fixed = False, \
reporting = self._reporting, origin = self)
- self.issue_grub_image.set(fixed = False, \
- reporting = self._reporting, origin = self)
self._result = ReturnFailure
return
@@ -267,7 +267,6 @@ class Grub(Plugin):
# Install the grub in all devs pointing at the special root part.
for drive in self.install_grub_devs:
- #for (drive, partitions) in self.devices.iteritems():
self._reporting.info("Trying to install grub on drive %s, " \
"pointing to grub directory in %s."%(drive.name(), \
grubroot.path()), origin = self)
@@ -299,16 +298,17 @@ class Grub(Plugin):
os.write(fd, first446bytes)
os.close(fd)
except IOError, ie:
- self._reporting.debug("There was an error writing to %s, It is very " \
- "probable that this device is in an invalid state." \
- "Error: %s" % (devpath, ie), origin = self)
+ self._reporting.debug("There was an error writing to %s, It " \
+ " is very probable that this device is in an invalid " \
+ "state. Error: %s" % (devpath, ie), origin = self)
continue
except Exception, e:
self._reporting.debug("There was an unexpected error: %s" % e, \
origin = self)
continue
- self._reporting.info("Successfully restored changes to device %s." % devpath, \
+ self._reporting.info("Successfully restored changes to device " \
+ "%s." % devpath, \
origin = self)
self._result = ReturnSuccess