4 |
from constants import * |
from constants import * |
5 |
|
|
6 |
import os |
import os |
|
import string |
|
7 |
import iutil |
import iutil |
8 |
|
import string |
9 |
import security |
import security |
10 |
|
|
11 |
class Script: |
class Script: |
63 |
dispatch.setStepList( |
dispatch.setStepList( |
64 |
"language", |
"language", |
65 |
"keyboard", |
"keyboard", |
66 |
|
"installtype", |
67 |
"findrootparts", |
"findrootparts", |
68 |
"findinstall", |
"findinstall", |
|
"installtype", |
|
69 |
"partitionobjinit", |
"partitionobjinit", |
70 |
"upgrademount", |
"upgrademount", |
71 |
"upgrademigfind", |
"upgrademigfind", |
72 |
"upgrademigratefs", |
"upgrademigratefs", |
73 |
"upgradecontinue", |
"upgradecontinue", |
|
"bootloadersetup", |
|
74 |
"readcomps", |
"readcomps", |
75 |
"findpackages", |
"findpackages", |
76 |
"checkdeps", |
"checkdeps", |
87 |
"complete" |
"complete" |
88 |
) |
) |
89 |
|
|
90 |
def postAction(self, rootPath, serial): |
if iutil.getPPCMachine() == "iSeries": |
91 |
# Hack to disable SELinux on upgrade |
dispatch.skipStep("bootloadersetup", skip = 0) |
|
sec = security.Security() |
|
|
sec.setSELinux(0) |
|
|
sec.write(rootPath) |
|
92 |
|
|
93 |
script = "/sbin/syslogd &\nsleep 2\n/sbin/e-smith/signal-event post-upgrade\n" |
if iutil.getArch() != "i386" and iutil.getArch() != "x86_64": |
94 |
|
dispatch.skipStep("bootloader") |
95 |
|
dispatch.skipStep("bootloaderadvanced") |
96 |
|
|
97 |
|
if iutil.getArch() != "i386" and iutil.getArch() != "x86_64": |
98 |
|
dispatch.skipStep("upgbootloader") |
99 |
|
|
100 |
|
def postAction(self, rootPath, serial, intf): |
101 |
|
win = intf.waitWindow(_("Post Upgrade Script"), |
102 |
|
_("The post upgrade script is running...")) |
103 |
|
|
104 |
|
script = ( "/sbin/syslogd &\n" |
105 |
|
"sleep 2\n" |
106 |
|
"/sbin/e-smith/signal-event post-upgrade\n" ) |
107 |
s = Script(script, interp="/bin/sh", inChroot=1) |
s = Script(script, interp="/bin/sh", inChroot=1) |
108 |
log("%s", s) |
log("%s", s) |
109 |
s.run(rootPath, serial) |
s.run(rootPath, serial) |
110 |
|
win.pop() |
111 |
|
|
112 |
def setInstallData(self, id): |
def setInstallData(self, id): |
113 |
BaseInstallClass.setInstallData(self, id) |
BaseInstallClass.setInstallData(self, id) |