/[smeserver]/cdrom.image/updates/smeupgradeclass.py
ViewVC logotype

Diff of /cdrom.image/updates/smeupgradeclass.py

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.4 by slords, Fri Aug 19 04:34:57 2005 UTC Revision 1.10.2.2 by slords, Sat Mar 15 14:55:47 2008 UTC
# Line 1  Line 1 
1  from installclass import BaseInstallClass  from installclass import getBaseInstallClass
2  from rhpl.translate import N_, _  from rhpl.translate import N_, _
3  from rhpl.log import log  
4    import logging
5    log = logging.getLogger("anaconda")
6    
7  from constants import *  from constants import *
8    
9  import os  import os
 import string  
10  import iutil  import iutil
11  import security  import string
12    import rhpl
13    
14    baseclass = getBaseInstallClass()
15    
16    
17  class Script:  class Script:
18      def __repr__(self):      def __repr__(self):
# Line 45  class Script: Line 51  class Script:
51                                      root = scriptRoot)                                      root = scriptRoot)
52    
53          if rc != 0:          if rc != 0:
54              log("WARNING - Error code %s encountered running a sme script", rc)              log.info("WARNING - Error code %s encountered running a sme script", rc)
55    
56          os.unlink(path)          os.unlink(path)
57    
58  class InstallClass(BaseInstallClass):  class InstallClass(baseclass):
59      name = N_("Upgrade Existing System")      name = N_("Upgrade Existing System")
60      pixmap = "upgrade.png"      pixmap = "upgrade.png"
61      sortPriority = 999999      sortPriority = 999999
# Line 71  class InstallClass(BaseInstallClass): Line 77  class InstallClass(BaseInstallClass):
77                      "upgrademigfind",                      "upgrademigfind",
78                      "upgrademigratefs",                      "upgrademigratefs",
79                      "upgradecontinue",                      "upgradecontinue",
80                      "bootloadersetup",                      "reposetup",
81                      "readcomps",                      "upgbootloader",
                     "findpackages",  
82                      "checkdeps",                      "checkdeps",
83                      "dependencies",                      "dependencies",
84                        "postselection",
85                      "install",                      "install",
86                      "migratefilesystems",                      "migratefilesystems",
87                      "preinstallconfig",                      "preinstallconfig",
# Line 88  class InstallClass(BaseInstallClass): Line 94  class InstallClass(BaseInstallClass):
94                      "complete"                      "complete"
95                  )                  )
96    
97      def postAction(self, rootPath, serial):          if iutil.getPPCMachine() == "iSeries":
98          script = ( "/sbin/syslogd &\n"              dispatch.skipStep("bootloadersetup", skip = 0)
99                     "sleep 2\n"  
100                     "/sbin/e-smith/signal-event post-upgrade\n" )          if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64":
101          s = Script(script, interp="/bin/sh", inChroot=1)              dispatch.skipStep("bootloader")
102          log("%s", s)              dispatch.skipStep("bootloaderadvanced")
103          s.run(rootPath, serial)  
104            if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64":
105                dispatch.skipStep("upgbootloader")            
106    
107      def setInstallData(self, id):      def postAction(self, anaconda, serial):
108          BaseInstallClass.setInstallData(self, id)          win = anaconda.intf.waitWindow(_("Post Upgrade Script"),
109          id.upgrade.set(1)             _("The post upgrade script is running..."))
110    
111            script = ( "#! /bin/sh\n/sbin/syslogd ; sleep 2; /sbin/e-smith/signal-event post-upgrade\n" )
112            s = Script(script, interp="/bin/sh", inChroot=1)
113            log.info("%s", s)
114            s.run(anaconda.rootPath, serial)
115            win.pop()
116    
117        def setInstallData(self, anaconda):
118            baseclass.setInstallData(self, anaconda)
119            anaconda.id.setUpgrade(True)
120            
121      def __init__(self, expert):      def __init__(self, expert):
122          BaseInstallClass.__init__(self, expert)          baseclass.__init__(self, expert)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed