diff options
author | Dennis Gilmore <dennis@ausil.us> | 2012-08-03 17:56:03 -0500 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2012-08-06 14:49:52 -0700 |
commit | 20441daffcf6585b521cd0bc66ed97e1d183a428 (patch) | |
tree | 50ac7a4e5a775846787e6d51570f94763e2313e8 | |
parent | b607be40867c929704b79b30c603f84cbceca4d3 (diff) | |
download | anaconda-20441daffcf6585b521cd0bc66ed97e1d183a428.tar.gz anaconda-20441daffcf6585b521cd0bc66ed97e1d183a428.tar.xz anaconda-20441daffcf6585b521cd0bc66ed97e1d183a428.zip |
add command line option to set the arm platform.
Use case is to create images using livemedia-creator where we wont be
running on the target platform.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
-rwxr-xr-x | anaconda | 4 | ||||
-rw-r--r-- | pyanaconda/flags.py | 1 | ||||
-rw-r--r-- | pyanaconda/iutil.py | 3 |
3 files changed, 8 insertions, 0 deletions
@@ -221,6 +221,7 @@ def parseOptions(argv=None, cmdline=None): op.add_option("--kickstart", dest="ksfile") op.add_option("--rescue", dest="rescue", action="store_true", default=False) op.add_option("--targetarch", "rpmarch", dest="targetArch", type="string") + op.add_option("--armplatform", dest="armPlatform", type="string") op.add_option("-m", "--method", dest="method", default=None) op.add_option("--repo", dest="method", default=None) @@ -803,6 +804,9 @@ if __name__ == "__main__": if opts.targetArch: flags.targetarch = opts.targetArch + if opts.armPlatform: + flags.armPlatform = opts.armPlatform + # set flags flags.dmraid = opts.dmraid flags.mpath = opts.mpath diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index f440c4b3b..e6d7a6747 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -58,6 +58,7 @@ class Flags(object): self.targetarch = None self.useIPv4 = True self.useIPv6 = True + self.armPlatform = None self.preexisting_x11 = False self.noverifyssl = False self.imageInstall = False diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py index 5f5f2a413..fd0b98565 100644 --- a/pyanaconda/iutil.py +++ b/pyanaconda/iutil.py @@ -646,6 +646,9 @@ def getARMMachine(): if not isARM(): return 0 + if flags.armPlatform: + return flags.armPlatform + armMachine = os.uname()[2].rpartition('.' )[2] if armMachine.startswith('arm'): |