/[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.8 by slords, Wed Apr 5 21:11:51 2006 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
10  import iutil  import iutil
11  import string  import string
12  import security  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 91  class InstallClass(BaseInstallClass): Line 97  class InstallClass(BaseInstallClass):
97          if iutil.getPPCMachine() == "iSeries":          if iutil.getPPCMachine() == "iSeries":
98              dispatch.skipStep("bootloadersetup", skip = 0)              dispatch.skipStep("bootloadersetup", skip = 0)
99    
100          if iutil.getArch() != "i386" and iutil.getArch() != "x86_64":          if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64":
101              dispatch.skipStep("bootloader")              dispatch.skipStep("bootloader")
102              dispatch.skipStep("bootloaderadvanced")              dispatch.skipStep("bootloaderadvanced")
103    
104          if iutil.getArch() != "i386" and iutil.getArch() != "x86_64":          if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64":
105              dispatch.skipStep("upgbootloader")                          dispatch.skipStep("upgbootloader")            
106    
107      def postAction(self, rootPath, serial, intf):      def postAction(self, anaconda, serial):
108          win = intf.waitWindow(_("Post Upgrade Script"),          win = anaconda.intf.waitWindow(_("Post Upgrade Script"),
109             _("The post upgrade script is running..."))             _("The post upgrade script is running..."))
110    
111          script = ( "/sbin/syslogd &\n"          script = ( "#! /bin/sh\n/sbin/syslogd ; sleep 2; /sbin/e-smith/signal-event post-upgrade\n" )
                    "sleep 2\n"  
                    "/sbin/e-smith/signal-event post-upgrade\n" )  
112          s = Script(script, interp="/bin/sh", inChroot=1)          s = Script(script, interp="/bin/sh", inChroot=1)
113          log("%s", s)          log.info("%s", s)
114          s.run(rootPath, serial)          s.run(anaconda.rootPath, serial)
115          win.pop()          win.pop()
116    
117      def setInstallData(self, id):      def setInstallData(self, anaconda):
118          BaseInstallClass.setInstallData(self, id)          baseclass.setInstallData(self, anaconda)
119          id.upgrade.set(1)          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