FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-16-2012, 12:16 AM
"Brian C. Lane"
 
Default handle inst.* cmdline args correctly

From: "Brian C. Lane" <bcl@redhat.com>

The options are stored without "inst." so when parsing boot arguments
we need to first strip the "inst." if present.
---
pyanaconda/anaconda_optparse.py | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/pyanaconda/anaconda_optparse.py b/pyanaconda/anaconda_optparse.py
index b22e39d..26ddde7 100644
--- a/pyanaconda/anaconda_optparse.py
+++ b/pyanaconda/anaconda_optparse.py
@@ -68,17 +68,16 @@ class AnacondaOptionParser(OptionParser):

def _get_bootarg_option(self, arg):
"""Find the correct Option for a given bootarg (if one exists)"""
+ if self.bootarg_prefix and arg.startswith(self.bootarg_prefix):
+ prefixed_option = True
+ arg = arg[len(self.bootarg_prefix):]
+ else:
+ prefixed_option = False
option = self._boot_arg.get(arg)
- prefixed_option = self._boot_arg.get(self.bootarg_prefix+arg)
- if not self.bootarg_prefix:
- return option
- if self.require_prefix:
- return prefixed_option
- # even if the prefix isn't required, we still prefer it
- if prefixed_option:
- return prefixed_option
- # deprecated option found? make a note of it.
- if option:
+
+ if self.require_prefix and not prefixed_option:
+ return None
+ if option and self.bootarg_prefix and not prefixed_option:
self.deprecated_bootargs.append(arg)
return option

--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org