summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kbd.py13
-rw-r--r--text.py25
-rw-r--r--todo.py2
-rwxr-xr-xupd-instroot18
4 files changed, 55 insertions, 3 deletions
diff --git a/kbd.py b/kbd.py
index 7c8ceb672..36056f181 100644
--- a/kbd.py
+++ b/kbd.py
@@ -66,7 +66,9 @@ class Keyboard (SimpleConfigFile):
kudzu.PROBE_ONE)
if list:
(device, module, desc) = list[0]
- if desc[:8] == 'Sun Type':
+ if desc[:14] == 'Serial console':
+ self.type = "Serial"
+ elif desc[:8] == 'Sun Type':
self.type = "Sun"
if desc[8:1] == '4':
self.model = 'type4'
@@ -92,6 +94,10 @@ class Keyboard (SimpleConfigFile):
self.layout = 'us'
else:
self.layout = xx[0]
+ if self.type == "Sun":
+ self.info["KEYBOARDTYPE"] = "sun"
+ elif self.type != "Serial":
+ self.info["KEYBOARDTYPE"] = "pc"
def available (self):
if self.type == "Sun":
@@ -111,6 +117,8 @@ class Keyboard (SimpleConfigFile):
"sunt5-uk",
"sunt5-us-cz",
]
+ if self.type == "Serial":
+ return [ "us" ]
return [
"azerty",
"be-latin1",
@@ -195,7 +203,8 @@ class Keyboard (SimpleConfigFile):
]
def set (self, keytable):
- self.info["KEYTABLE"] = keytable
+ if self.type != "Serial":
+ self.info["KEYTABLE"] = keytable
def get (self):
if self.info.has_key ("KEYTABLE"):
diff --git a/text.py b/text.py
index 26b49deb9..ece418ca8 100644
--- a/text.py
+++ b/text.py
@@ -95,6 +95,8 @@ class MouseDeviceWindow:
class MouseWindow:
def __call__(self, screen, todo):
+ if todo.serial:
+ return INSTALL_NOOP
mice = todo.mouse.available ().keys ()
mice.sort ()
(default, emulate) = todo.mouse.get ()
@@ -146,6 +148,8 @@ class MouseWindow:
class KeyboardWindow:
def __call__(self, screen, todo):
+ if todo.serial:
+ return INSTALL_NOOP
keyboards = todo.keyboard.available ()
keyboards.sort ()
default = keyboards.index (todo.keyboard.get ())
@@ -496,6 +500,11 @@ class XConfigWindow:
todo._cardindex = -1
return INSTALL_OK
+ if todo.serial:
+ # if doing serial installation and no card was probed,
+ # assume no card is present (typical case).
+ return INSTALL_NOOP
+
# if we didn't find a server, we need the user to choose...
carddb = todo.x.cards()
cards = carddb.keys ()
@@ -554,6 +563,11 @@ class XconfiguratorWindow:
def __call__ (self, screen, todo):
if not todo.x.server: return INSTALL_NOOP
+ # if serial install, we can't run it.
+ if todo.serial:
+ todo.x.skip = 1
+ return INSTALL_NOOP
+
# if Xconfigurator isn't installed, we can't run it.
if not os.access (todo.instPath + '/usr/X11R6/bin/Xconfigurator',
os.X_OK): return INSTALL_NOOP
@@ -776,7 +790,7 @@ class WaitWindow:
class TimezoneWindow:
def getTimezoneList(self, test):
- if test:
+ if test and not os.access("/usr/lib/timezones.gz", os.R_OK):
cmd = "./gettzlist"
stdin = None
else:
@@ -905,6 +919,8 @@ class InstallInterface:
self.screen.finish()
def run(self, todo, test = 0):
+ if todo.serial:
+ self.screen.suspendCallback(spawnShell, self.screen)
self.commonSteps = [
[_("Language Selection"), LanguageWindow,
(self.screen, todo), "language" ],
@@ -1038,3 +1054,10 @@ def debugSelf(screen):
import pdb
pdb.set_trace()
screen.resume ()
+
+def spawnShell(screen):
+ screen.suspend ()
+ print "\n\nType <exit> to return to the install program.\n"
+ iutil.execWithRedirect ("/bin/sh", ["-/bin/sh"])
+ time.sleep(5)
+ screen.resume ()
diff --git a/todo.py b/todo.py
index 32432cf4f..908b08640 100644
--- a/todo.py
+++ b/todo.py
@@ -644,12 +644,14 @@ class ToDo:
f.close()
def writeMouse(self):
+ if self.serial: return
f = open(self.instPath + "/etc/sysconfig/mouse", "w")
f.write(str (self.mouse))
f.close()
self.mouse.makeLink(self.instPath)
def writeKeyboard(self):
+ if self.serial: return
f = open(self.instPath + "/etc/sysconfig/keyboard", "w")
f.write(str (self.keyboard))
f.close()
diff --git a/upd-instroot b/upd-instroot
index 7c1e1f141..700e26dda 100755
--- a/upd-instroot
+++ b/upd-instroot
@@ -296,6 +296,24 @@ patch -p0 <<EOF
EOF
+# fix xkb/rules/sun if needed
+( cd $DESTGR/usr/X11R6/lib/X11/xkb/rules
+patch -p0 <<EOF
+--- ./sun.jj Thu Sep 30 21:59:40 1999
++++ ./sun Mon Oct 4 12:13:33 1999
+@@ -4,7 +4,7 @@
+ type4 = sun(type4) sun(type4)
+ type5 = sun(type5) sun
+ type5_euro = sun(type5_euro) sun(type5euro)
+- type5_unix = sun(type5_unix) sun(type5unix)
++ type5_unix = sun(type5) sun(type5unix)
+
+ ! model layout = symbols
+ type4 us = sun/us(sun4)
+EOF
+rm -rf sun.orig sun.rej
+)
+
pythondeps $DEST
for p in $DEST $DESTGR; do