[anaconda:master] Make rescue_mode part of flags, hence more publicly available (#1090009)
mulhern
amulhern at redhat.com
Tue Jun 24 14:23:24 UTC 2014
Related: rhbz#1090009
In particular, blivet can make use of it when updating from anaconda
flags.
Signed-off-by: mulhern <amulhern at redhat.com>
---
anaconda | 8 ++++----
pyanaconda/anaconda.py | 1 -
pyanaconda/flags.py | 1 +
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/anaconda b/anaconda
index cbbedd6..3782395 100755
--- a/anaconda
+++ b/anaconda
@@ -523,7 +523,7 @@ def setupDisplay(anaconda, options, addons=None):
anaconda.xdriver = options.xdriver
anaconda.writeXdriver(root="/")
- if anaconda.rescue:
+ if flags.rescue_mode:
return
if anaconda.ksdata.vnc.enabled:
@@ -957,7 +957,7 @@ if __name__ == "__main__":
if ksdata.bootloader.extlinux:
flags.extlinux = True
if ksdata.rescue.rescue:
- anaconda.rescue = True
+ flags.rescue_mode = True
# Some kickstart commands must be executed immediately, as they affect
# how anaconda operates.
@@ -1103,7 +1103,7 @@ if __name__ == "__main__":
else:
anaconda.ksdata.displaymode.displayMode = DISPLAY_MODE_TEXT
- if anaconda.rescue:
+ if flags.rescue_mode:
from pyanaconda import rescue
anaconda.intf = rescue.RescueInterface()
@@ -1142,7 +1142,7 @@ if __name__ == "__main__":
from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread
from pyanaconda.timezone import time_initialize
- if anaconda.rescue:
+ if flags.rescue_mode:
rescue.doRescue(anaconda.intf, anaconda.rescue_mount, ksdata)
else:
cleanPStore()
diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
index 0e42aec..210f20a 100644
--- a/pyanaconda/anaconda.py
+++ b/pyanaconda/anaconda.py
@@ -63,7 +63,6 @@ class Anaconda(object):
self.proxyUsername = None
self.proxyPassword = None
self.reIPLMessage = None
- self.rescue = False
self.rescue_mount = True
self.rootParts = None
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 20e3255..b7cda14 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -68,6 +68,7 @@ class Flags(object):
self.mpathFriendlyNames = True
# ksprompt is whether or not to prompt for missing ksdata
self.ksprompt = True
+ self.rescue_mode = True
# parse the boot commandline
self.cmdline = BootArgs()
# Lock it down: no more creating new flags!
--
1.9.3
More information about the anaconda-patches
mailing list