[Uludag-commits] r15588 - in trunk/yali/yali: data gui
uludag-commits at pardus.org.tr
uludag-commits at pardus.org.tr
2 Eki 2007 Sal 12:15:43 EEST
Author: gokmen.goksel
Date: Tue Oct 2 12:15:43 2007
New Revision: 15588
Modified:
trunk/yali/yali/data/exampleKickstart.xml
trunk/yali/yali/gui/ScrBootloader.py
trunk/yali/yali/gui/ScrKickerCheck.py
trunk/yali/yali/gui/ScrWelcome.py
trunk/yali/yali/gui/context.py
Log:
KickStart or Kicker is almost ready =)
Modified: trunk/yali/yali/data/exampleKickstart.xml
=================================================================
--- trunk/yali/yali/data/exampleKickstart.xml (original)
+++ trunk/yali/yali/data/exampleKickstart.xml Tue Oct 2 12:15:43 2007
@@ -5,7 +5,7 @@
<root_password>pardusman</root_password>
<hostname>pardus-kickstart</hostname>
<users>
- <user autologin="yes">
+ <user>
<username>gokmen</username>
<realname>gokmen goksel</realname>
<password>1231111</password>
@@ -26,7 +26,7 @@
</user>
-->
</users>
- <partitioning partitioning_type="auto">disk1</partitioning>
+ <partitioning partitioning_type="auto">disk0</partitioning>
</yali>
Modified: trunk/yali/yali/gui/ScrBootloader.py
=================================================================
--- trunk/yali/yali/gui/ScrBootloader.py (original)
+++ trunk/yali/yali/gui/ScrBootloader.py Tue Oct 2 12:15:43 2007
@@ -97,6 +97,8 @@
def shown(self):
from os.path import basename
ctx.debugger.log("%s loaded" % basename(__file__))
+ if ctx.autoInstall:
+ ctx.screens.next()
def backCheck(self):
# we need to go partition auto screen, not manual ;)
@@ -171,11 +173,12 @@
and easy way to install Pardus.</p>
</b>
'''))
- self.dialog = WarningDialog(w, self)
- if not self.dialog.exec_loop():
- # disabled by weaver
- ctx.screens.enablePrev()
- return False
+ if not ctx.autoInstall:
+ self.dialog = WarningDialog(w, self)
+ if not self.dialog.exec_loop():
+ # disabled by weaver
+ ctx.screens.enablePrev()
+ return False
info_window = InformationWindow(self, _("Please wait while formatting!"))
ctx.screens.processEvents()
Modified: trunk/yali/yali/gui/ScrKickerCheck.py
=================================================================
--- trunk/yali/yali/gui/ScrKickerCheck.py (original)
+++ trunk/yali/yali/gui/ScrKickerCheck.py Tue Oct 2 12:15:43 2007
@@ -22,6 +22,7 @@
import yali.gui.context as ctx
from yali.gui.YaliDialog import Dialog
from yali.kickstart import yaliKickStart
+import yali.storage
def loadFile(path):
"""Read contents of a file"""
@@ -62,10 +63,12 @@
ctx.screens.goToScreen(num)
def shown(self):
+ ctx.kickerReady = False
if not kickstartExists():
ctx.debugger.log("There is no kickstart jumps to the next screen.")
self.jumpToNext()
+ ctx.autoInstall = True
yaliKick = yaliKickStart()
print "...",ctx.options.kickStartFile
@@ -73,7 +76,7 @@
if kickStartOpt:
ctx.debugger.log("KICKSTART-PARAMS:: %s" % kickStartOpt)
- kickStartFile = kickStartOpt.splir(',')[1]
+ kickStartFile = kickStartOpt.split(',')[1]
else:
kickStartFile = ctx.options.kickStartFile
@@ -82,8 +85,39 @@
yaliKick.readData(kickStartFile)
if yaliKick.checkFileValidity()==True:
ctx.debugger.log("File is ok")
+
+ # find usable storage devices
+ # initialize all storage devices
+ if not yali.storage.init_devices():
+ raise GUIException, _("Can't find a storage device!")
+
+ devices = []
+ for dev in yali.storage.devices:
+ if dev.getTotalMB() >= ctx.consts.min_root_size:
+ devices.append(dev)
+
correctData = yaliKick.getValues()
- ctx.debugger.log("Root Pass is : %s" % correctData.rootPassword)
+ ctx.debugger.log("Given KickStart Values :")
+
+ # single types
+ ctx.installData.keyData = correctData.keyData
+ ctx.installData.rootPassword = correctData.rootPassword
+ ctx.installData.hostName = correctData.hostname
+ ctx.installData.autoLoginUser = correctData.autoLoginUser
+ ctx.installData.autoPartDev = devices[int(correctData.partitioning[0].disk[-1])]
+
+ ctx.debugger.log("HOSTNAME : %s " % ctx.installData.hostName)
+ ctx.debugger.log("KEYDATA : %s " % ctx.installData.keyData.X)
+
+ # multi types
+ for user in correctData.users:
+ ctx.installData.users.append(user)
+ yali.users.pending_users.append(user)
+ ctx.debugger.log("USER : %s " % user.username)
+
+ ctx.screens.processEvents()
+ ctx.kickerReady = True
+ ctx.screens.next()
else:
ctx.debugger.log("This kickstart file is not correct !!")
wrongData = yaliKick.getValues()
Modified: trunk/yali/yali/gui/ScrWelcome.py
=================================================================
--- trunk/yali/yali/gui/ScrWelcome.py (original)
+++ trunk/yali/yali/gui/ScrWelcome.py Tue Oct 2 12:15:43 2007
@@ -98,6 +98,9 @@
yali.sysutils.fastreboot()
def shown(self):
+ if ctx.kickerReady and ctx.autoInstall:
+ ctx.screens.goToScreen(9)
+
ctx.screens.disablePrev()
if self.accept.isChecked():
ctx.screens.enableNext()
Modified: trunk/yali/yali/gui/context.py
=================================================================
--- trunk/yali/yali/gui/context.py (original)
+++ trunk/yali/yali/gui/context.py Tue Oct 2 12:15:43 2007
@@ -50,5 +50,8 @@
# auto partitioning
use_autopart = False
+# auto installation
+autoInstall = False
+
# keydata
keydata = None
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi