diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-10-24 14:42:49 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-10-24 15:02:50 +0200 |
commit | a95b29a2b7483ece441409f606e892c8d3712037 (patch) | |
tree | 8b8f34d9cac2d7fbff1ca16281bd590aed1a156b /plugins/grub/grubUtils.py | |
parent | e0abf47477f0f3681c6cf0b28f66fb1833d32a17 (diff) | |
download | firstaidkit-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/grubUtils.py')
-rw-r--r-- | plugins/grub/grubUtils.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/grub/grubUtils.py b/plugins/grub/grubUtils.py index bbc68b3..61be4c5 100644 --- a/plugins/grub/grubUtils.py +++ b/plugins/grub/grubUtils.py @@ -355,6 +355,8 @@ def get_grub_opts(args): this option, we will prefer the list described in install-to. + --install-auto : This will try to avoid overwriting other bootloaders. + We will return a object with all de relative information. """ @@ -362,6 +364,7 @@ def get_grub_opts(args): class grub_args: install_all = False install_to = [] + install_auto = False retval = grub_args() # Parse the args string @@ -379,11 +382,21 @@ def get_grub_opts(args): for (opt, val) in opts: if opt == "--install-all" and len(retval.install_to) == 0: - retval.install_all = True + if len(retval.install_to) == 0 + retval.install_all = True + retval.install_auto = False if opt == "--install-to": - retval.install_all = False retval.install_to = val.split(',') + retval.install_all = False + retval.install_auto = False + + + if opt == "--install-auto": + if len(retval.args.install_to) == 0 and \ + not retval.args.install_all: + retval.args.install_auto = True + return retval |