summaryrefslogtreecommitdiffstats
path: root/plugins/grub/grub.py
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-10-24 14:42:49 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-10-24 15:02:50 +0200
commita95b29a2b7483ece441409f606e892c8d3712037 (patch)
tree8b8f34d9cac2d7fbff1ca16281bd590aed1a156b /plugins/grub/grub.py
parente0abf47477f0f3681c6cf0b28f66fb1833d32a17 (diff)
downloadfirstaidkit-a95b29a2b7483ece441409f606e892c8d3712037.tar.gz
firstaidkit-a95b29a2b7483ece441409f606e892c8d3712037.tar.xz
firstaidkit-a95b29a2b7483ece441409f606e892c8d3712037.zip
Grub plugin:
Make the default behavior of grub more sane. The right thing to do when no arguments are passed is to do nothing.
Diffstat (limited to 'plugins/grub/grub.py')
-rw-r--r--plugins/grub/grub.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/grub/grub.py b/plugins/grub/grub.py
index ab200a0..63df699 100644
--- a/plugins/grub/grub.py
+++ b/plugins/grub/grub.py
@@ -158,7 +158,7 @@ class Grub(Plugin):
for part in parts:
self.install_grub_parts.append(Dname(part))
- else:
+ elif self.args.install_auto:
# Skip devices with other bootloader (default).
for (dev, parts) in self.devices.iteritems():
@@ -177,6 +177,11 @@ class Grub(Plugin):
"in %s partition." % Dname.asPath(part), \
origin = self)
self.install_grub_parts.append(Dname(part))
+ else:
+ # If not arguments where specified the right thing to do is to
+ # leave everything alone:)
+ self.install_grub_parts = []
+ self.install_grub_devs = []
self._result = ReturnSuccess
except Exception, e: