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): |
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 |
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", |
94 |
"complete" |
"complete" |
95 |
) |
) |
96 |
|
|
97 |
def postAction(self, rootPath, serial): |
if iutil.getPPCMachine() == "iSeries": |
98 |
|
dispatch.skipStep("bootloadersetup", skip = 0) |
99 |
|
|
100 |
|
if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64": |
101 |
|
dispatch.skipStep("bootloader") |
102 |
|
dispatch.skipStep("bootloaderadvanced") |
103 |
|
|
104 |
|
if rhpl.getArch() != "i386" and rhpl.getArch() != "x86_64": |
105 |
|
dispatch.skipStep("upgbootloader") |
106 |
|
|
107 |
|
def postAction(self, anaconda, serial): |
108 |
|
win = anaconda.intf.waitWindow(_("Post Upgrade Script"), |
109 |
|
_("The post upgrade script is running...")) |
110 |
|
|
111 |
script = ( "/sbin/syslogd &\n" |
script = ( "/sbin/syslogd &\n" |
112 |
"sleep 2\n" |
"sleep 2\n" |
113 |
"/sbin/e-smith/signal-event post-upgrade\n" ) |
"/sbin/e-smith/signal-event post-upgrade\n" ) |
114 |
s = Script(script, interp="/bin/sh", inChroot=1) |
s = Script(script, interp="/bin/sh", inChroot=1) |
115 |
log("%s", s) |
log.info("%s", s) |
116 |
s.run(rootPath, serial) |
s.run(anaconda.rootPath, serial) |
117 |
|
win.pop() |
118 |
def setInstallData(self, id): |
|
119 |
BaseInstallClass.setInstallData(self, id) |
def setInstallData(self, anaconda): |
120 |
id.upgrade.set(1) |
baseclass.setInstallData(self, anaconda) |
121 |
|
anaconda.id.setUpgrade(True) |
122 |
|
|
123 |
def __init__(self, expert): |
def __init__(self, expert): |
124 |
BaseInstallClass.__init__(self, expert) |
baseclass.__init__(self, expert) |