[node-patches] Change in ovirt-node[master]: Disable the TUI in rescue mode

rbarry at redhat.com rbarry at redhat.com
Thu Aug 15 18:09:35 UTC 2013


Ryan Barry has uploaded a new change for review.

Change subject: Disable the TUI in rescue mode
......................................................................

Disable the TUI in rescue mode

Don't let the TUI run when in rescue mode.

Change-Id: Ie1f9d6fbd944cd9c86b7ae85e031477d7184f868
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=989811
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
A cmdline
M src/ovirt/node/app.py
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/93/18193/1

diff --git a/cmdline b/cmdline
new file mode 100644
index 0000000..0f1249f
--- /dev/null
+++ b/cmdline
@@ -0,0 +1 @@
+BOOT_IMAGE=/vmlinuz-3.9.8-300.fc19.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 rd.luks=0 vconsole.keymap=us rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8 rescue
diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index 9e061c7..02b672c 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -297,6 +297,11 @@
         self.ui.footer = "Press esc to quit."
 
         try:
+            if "rescue" in open("/proc/cmdline").read().split():
+                import sys
+                print "The TUI cannot be used in rescue mode. Please "\
+                      "reboot without rescue to configure/install."
+                sys.exit(0)
             self.ui.run()
         except Exception as e:
             if self.args.debug:


-- 
To view, visit http://gerrit.ovirt.org/18193
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1f9d6fbd944cd9c86b7ae85e031477d7184f868
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list