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: |
61 |
|
|
62 |
def setSteps(self, dispatch): |
def setSteps(self, dispatch): |
63 |
dispatch.setStepList( |
dispatch.setStepList( |
64 |
|
"betanag", |
65 |
"language", |
"language", |
66 |
"keyboard", |
"keyboard", |
67 |
"findrootparts", |
"findrootparts", |
89 |
"complete" |
"complete" |
90 |
) |
) |
91 |
|
|
92 |
def postAction(self, rootPath, serial): |
if iutil.getPPCMachine() == "iSeries": |
93 |
|
dispatch.skipStep("bootloadersetup", skip = 0) |
94 |
|
|
95 |
|
if iutil.getArch() != "i386" and iutil.getArch() != "x86_64": |
96 |
|
dispatch.skipStep("bootloader") |
97 |
|
dispatch.skipStep("bootloaderadvanced") |
98 |
|
|
99 |
|
if iutil.getArch() != "i386" and iutil.getArch() != "x86_64": |
100 |
|
dispatch.skipStep("upgbootloader") |
101 |
|
|
102 |
|
def postAction(self, rootPath, serial, intf): |
103 |
|
win = intf.waitWindow(_("Post Upgrade Script"), |
104 |
|
_("The post upgrade script is running...")) |
105 |
|
|
106 |
script = ( "/sbin/syslogd &\n" |
script = ( "/sbin/syslogd &\n" |
107 |
"sleep 2\n" |
"sleep 2\n" |
108 |
"/sbin/e-smith/signal-event post-upgrade\n" ) |
"/sbin/e-smith/signal-event post-upgrade\n" ) |
109 |
s = Script(script, interp="/bin/sh", inChroot=1) |
s = Script(script, interp="/bin/sh", inChroot=1) |
110 |
log("%s", s) |
log("%s", s) |
111 |
s.run(rootPath, serial) |
s.run(rootPath, serial) |
112 |
|
win.pop() |
113 |
|
|
114 |
def setInstallData(self, id): |
def setInstallData(self, id): |
115 |
BaseInstallClass.setInstallData(self, id) |
BaseInstallClass.setInstallData(self, id) |