summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-07-16 23:43:30 +0000
committerMatt Wilson <msw@redhat.com>2001-07-16 23:43:30 +0000
commitb359ed47aa6ee7562ccd77ca7f4aef492ec4859b (patch)
tree133d6f075dd73313f285f3ee6685c98d39365067
parent5416b2a0a73ddc2ea0845b96325268aedea673b9 (diff)
downloadanaconda-b359ed47aa6ee7562ccd77ca7f4aef492ec4859b.tar.gz
anaconda-b359ed47aa6ee7562ccd77ca7f4aef492ec4859b.tar.xz
anaconda-b359ed47aa6ee7562ccd77ca7f4aef492ec4859b.zip
autostep hack
-rwxr-xr-xanaconda5
-rw-r--r--flags.py2
-rwxr-xr-xgui.py12
-rw-r--r--kickstart.py7
4 files changed, 21 insertions, 5 deletions
diff --git a/anaconda b/anaconda
index 6a297666f..bcc8099eb 100755
--- a/anaconda
+++ b/anaconda
@@ -82,7 +82,8 @@ try:
'method=', 'rootpath=', 'pcic=', "overhead=",
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'lang=', 'keymap=', 'module=', 'class=',
- 'expert', 'serial', 'lowres', 'nofb', 'rescue', 'nomount'])
+ 'expert', 'serial', 'lowres', 'nofb', 'rescue', 'nomount',
+ 'autostep'])
except TypeError, msg:
sys.stderr.write("Error %s\n:" % msg)
sys.exit(-1)
@@ -187,6 +188,8 @@ for n in args:
customClass = 'reconfig'
elif (str == '--rescue'):
progmode = 'rescue'
+ elif (str == "--autostep"):
+ flags.autostep = 1
elif (str == '-r' or str == '--rootpath'):
rootPath = arg
flags.setupFilesystems = 0
diff --git a/flags.py b/flags.py
index 64ada844c..bd368b103 100644
--- a/flags.py
+++ b/flags.py
@@ -33,7 +33,7 @@ class Flags:
self.__dict__['flags']['serial'] = 0
self.__dict__['flags']['reconfig'] = 0
self.__dict__['flags']['setupFilesystems'] = 1
-
+ self.__dict__['flags']['autostep'] = 0
global flags
flags = Flags()
diff --git a/gui.py b/gui.py
index 007759d5b..a468322b7 100755
--- a/gui.py
+++ b/gui.py
@@ -242,6 +242,10 @@ class MessageWindow:
return self.rc
def __init__ (self, title, text, type="ok"):
+ if flags.autostep:
+ print title, text, type
+ self.rc = 1
+ return
self.rc = None
if type == "ok":
self.window = GnomeOkDialog (_(text))
@@ -486,7 +490,10 @@ class InstallControlWindow:
def handleRenderCallback(self):
self.currentWindow.renderCallback()
- idle_remove(self.handle)
+ if flags.autostep:
+ self.nextClicked()
+ else:
+ idle_remove(self.handle)
def setScreen (self):
(step, args) = self.dispatch.currentStep()
@@ -703,7 +710,8 @@ class InstallControlWindow:
self.buildStockButtons()
group = GtkAccelGroup()
- self.nextButtonStock.add_accelerator ("clicked", group, GDK.F12, GDK.RELEASE_MASK, 0);
+ self.nextButtonStock.add_accelerator ("clicked", group, GDK.F12,
+ GDK.RELEASE_MASK, 0);
self.window.add_accel_group (group)
self.window.connect ("key-release-event", self.keyRelease)
diff --git a/kickstart.py b/kickstart.py
index e1310af39..b41f2494e 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -5,6 +5,7 @@ from installclass import BaseInstallClass
from partitioning import *
from autopart import *
from fsset import *
+from flags import flags
import sys
import string
@@ -457,6 +458,9 @@ class KickstartBase(BaseInstallClass):
def doInteractive(self, id, args):
self.interactive = 1
+ def doAutoStep(self, id, args):
+ flags.autostep = 1
+
def readKickstart(self, id, file):
handlers = {
"auth" : self.doAuthconfig ,
@@ -492,6 +496,7 @@ class KickstartBase(BaseInstallClass):
"xdisplay" : None ,
"zerombr" : self.doZeroMbr ,
"interactive" : self.doInteractive ,
+ "autostep" : self.doAutoStep ,
}
where = "commands"
@@ -784,7 +789,7 @@ class KickstartBase(BaseInstallClass):
def setSteps(self, dispatch):
BaseInstallClass.setSteps(self, dispatch)
- if self.interactive:
+ if self.interactive or flags.autostep:
dispatch.skipStep("installtype")
dispatch.skipStep("partitionmethod")
dispatch.skipStep("partitionmethodsetup")