summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
committerJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
commitc540e134193f9759873ced09b0156c6219983101 (patch)
treeb36013fe219e6c3d8762bf2a0a32b538ac5c0373
parent3f01dfc8e9d6b8bf25b79b1cbda94ca0ff4ada09 (diff)
downloadanaconda-c540e134193f9759873ced09b0156c6219983101.tar.gz
anaconda-c540e134193f9759873ced09b0156c6219983101.tar.xz
anaconda-c540e134193f9759873ced09b0156c6219983101.zip
merge from taroon-branch. all kinds of miscellaneous bugfixes, including
* firewall update * iSeries PReP size * ppc mediacheck * tzdata stuff * cmdline mode * pkg defaults screen
-rwxr-xr-xanaconda13
-rw-r--r--autopart.py2
-rw-r--r--docs/command-line.txt6
-rw-r--r--firewall.py25
-rw-r--r--fsset.py3
-rw-r--r--hdrlist.py13
-rw-r--r--image.py13
-rw-r--r--installclass.py19
-rw-r--r--installclasses/personal_desktop.py11
-rw-r--r--installclasses/workstation.py13
-rw-r--r--isys/isys.py19
-rw-r--r--isys/lang.c6
-rw-r--r--isys/probe.c6
-rw-r--r--iw/desktop_choice_gui.py63
-rw-r--r--iw/firewall_gui.py375
-rw-r--r--iw/xconfig_gui.py2
-rw-r--r--kickstart.py17
-rw-r--r--loader2/driverdisk.c9
-rw-r--r--loader2/linuxrc.s3906
-rw-r--r--loader2/loader.c5
-rw-r--r--loader2/md5.c31
-rw-r--r--loader2/md5.h1
-rw-r--r--loader2/mediacheck.c1
-rw-r--r--loader2/modules.c8
-rw-r--r--loader2/net.c4
-rw-r--r--loader2/nfsinstall.c2
-rw-r--r--loader2/telnetd.c12
-rw-r--r--loader2/urlinstall.c11
-rw-r--r--loader2/urls.c12
-rw-r--r--loader2/urls.h6
-rw-r--r--packages.py14
-rw-r--r--partedUtils.py17
-rwxr-xr-xscripts/mk-images1
-rw-r--r--scripts/mk-images.ppc2
-rw-r--r--scripts/mk-images.s3902
-rwxr-xr-xscripts/upd-instroot16
-rw-r--r--textw/desktop_choice_text.py12
-rw-r--r--textw/firewall_text.py47
38 files changed, 423 insertions, 402 deletions
diff --git a/anaconda b/anaconda
index 7ceeab11c..a2bdc0eb7 100755
--- a/anaconda
+++ b/anaconda
@@ -94,7 +94,8 @@ def startVNCServer(vncpassword=None, root='/', vncconnecthost=None,
print __name__, "waitpid:", msg
return status
-
+
+
dup_log(_("Starting VNC..."))
# figure out host info
@@ -172,10 +173,10 @@ def startVNCServer(vncpassword=None, root='/', vncconnecthost=None,
if vncpassword is None:
dup_log(_("\n\nWARNING!!! VNC server running with NO PASSWORD!\n"
- "You can use the vncpassword=<password> boot option\n"
- "if you would like to secure the server.\n\n"))
+ "You can use the vncpassword=<password> boot option\n"
+ "if you would like to secure the server.\n\n"))
- dup_log(_("The VNC server now running."))
+ dup_log(_("The VNC server is now running."))
if vncconnecthost is not None:
dup_log(_("Attempting to connect to vnc client on host %s...") % (vncconnecthost,))
@@ -736,7 +737,7 @@ if not instClass:
from installclass import DefaultInstall, availableClasses
instClass = DefaultInstall(flags.expert)
- if len(availableClasses()) < 2:
+ if len(availableClasses(showHidden = 1)) < 2:
(cname, cobject, clogo) = availableClasses()[0]
log("%s is only installclass, using it" %(cname,))
instClass = cobject(flags.expert)
@@ -814,7 +815,7 @@ if not flags.test and not os.access("/mnt/runtime/usr/X11R6/bin/XFree86", os.X_O
if not isHeadless:
# if no mouse we force text mode
mousedev = mousehw.get()
- if ksfile is None and display_mode == 'g' and mousedev[0] == "No - mouse":
+ if ksfile is None and not flags.usevnc and display_mode == 'g' and mousedev[0] == "No - mouse":
# ask for the mouse type
import rhpl.mouse as mouse
diff --git a/autopart.py b/autopart.py
index 4075cef1f..8b38e66aa 100644
--- a/autopart.py
+++ b/autopart.py
@@ -1421,7 +1421,7 @@ def getAutopartitionBoot():
return [ (None, "PPC PReP Boot", 4, None, 0, 1),
("/boot", None, 100, None, 0, 1) ]
elif (iutil.getPPCMachine() == "iSeries") and not iutil.hasIbmSis():
- return [ (None, "PPC PReP Boot", 4, None, 0, 1) ]
+ return [ (None, "PPC PReP Boot", 16, None, 0, 1) ]
elif (iutil.getPPCMachine() == "iSeries") and iutil.hasIbmSis():
return []
else:
diff --git a/docs/command-line.txt b/docs/command-line.txt
index c06c984b7..b482b18cd 100644
--- a/docs/command-line.txt
+++ b/docs/command-line.txt
@@ -137,3 +137,9 @@ method=hd://<dev>/<path> Use <path> on <dev> for a hard drive installation
method=cdrom Do a CDROM based installation.
+vnc Do graphical installation via VNC. Instead of
+ starting a normal X server, vncserver will be started
+ and you can then connect remotely to do the
+ installation.
+
+vncpassword=<password> Set a password for the vnc session.
diff --git a/firewall.py b/firewall.py
index 8fcb00fa5..ef5217089 100644
--- a/firewall.py
+++ b/firewall.py
@@ -22,7 +22,7 @@ from rhpl.log import log
class Firewall:
def __init__ (self):
- self.enabled = -1
+ self.enabled = 1
self.ssh = 0
self.telnet = 0
self.smtp = 0
@@ -30,15 +30,12 @@ class Firewall:
self.ftp = 0
self.portlist = ""
self.ports = []
- self.policy = 1
- self.dhcp = 0
self.trustdevs = []
- self.custom = 1
def writeKS(self, f):
f.write("firewall")
- if self.enabled > 0:
+ if self.enabled:
for arg in self.getArgList():
f.write(" " + arg)
else:
@@ -49,12 +46,12 @@ class Firewall:
def getArgList(self):
args = []
- if self.policy:
- args.append ("--medium")
- else:
- args.append ("--high")
- if self.dhcp:
- args.append ("--dhcp")
+ if self.enabled:
+ args.append ("--enabled")
+ else:
+ args.append("--disabled")
+ return args
+
if self.portlist:
ports = string.split(self.portlist,',')
for port in ports:
@@ -85,7 +82,7 @@ class Firewall:
def write (self, instPath):
args = [ "/usr/sbin/lokkit", "--quiet", "--nostart" ]
- if self.enabled > 0:
+ if self.enabled:
args = args + self.getArgList()
try:
@@ -107,8 +104,8 @@ class Firewall:
f.close()
else:
- # remove /etc/sysconfig/ipchains
- file = instPath + "/etc/sysconfig/ipchains"
+ # remove /etc/sysconfig/iptables
+ file = instPath + "/etc/sysconfig/iptables"
if os.access(file, os.O_RDONLY):
os.remove(file)
diff --git a/fsset.py b/fsset.py
index 87a6f1a0c..0af5e14be 100644
--- a/fsset.py
+++ b/fsset.py
@@ -757,6 +757,9 @@ class prepbootFileSystem(FileSystemType):
self.name = "PPC PReP Boot"
self.maxSizeMB = 10
+ if iutil.getPPCMachine() == "iSeries":
+ self.maxSizeMB = 64
+
# supported for use on the pseries
if (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
diff --git a/hdrlist.py b/hdrlist.py
index cb29c0c27..4050416ad 100644
--- a/hdrlist.py
+++ b/hdrlist.py
@@ -51,7 +51,9 @@ EverythingExclude = {'kernel' : None, 'kernel-BOOT' : None,
'kernel-tape' : None, 'kernel-BOOTtape' : None,
'kernel-pseries': None, 'kernel-iseries': None,
'kernel-unsupported': None,'kernel-smp-unsupported': None,
- 'kernel-bigmem-unsupported': None }
+ 'kernel-bigmem-unsupported': None,
+ 'kernel-hugmem': None,
+ 'kernel-hugemem-unsupported': None }
def showMem():
f = open("/proc/self/status", "r")
@@ -150,8 +152,7 @@ def depMatch(dep, hdrlist):
return nevra(hdrlist[dep])
elif cached.has_key(dep):
return cached[dep]
- # next, see if its a file dep (FIXME: we have Provides: /usr/sbin/sendmail
- # with alternatives)
+ # next, see if its a file dep
elif dep[0] == "/":
hdr = None
for h in hdrlist.pkgs.values():
@@ -166,7 +167,11 @@ def depMatch(dep, hdrlist):
if f[0].find("bin") != -1: cached[f[0]] = nevra(hdr)
cached[dep] = nevra(hdr)
return nevra(hdr)
- else:
+
+ # else:
+ # need to do this even on file deps too because they could be virtual
+ # provides such as /usr/sbin/sendmail or /usr/bin/lpr.
+ if 1:
hdr = None
for h in hdrlist.pkgs.values():
if (dep in h[rpm.RPMTAG_PROVIDENAME]):
diff --git a/image.py b/image.py
index 881971bdd..818a9a088 100644
--- a/image.py
+++ b/image.py
@@ -27,6 +27,13 @@ from constants import *
from rhpl.log import log
from rhpl.translate import _
+# this sucks, but we want to consider s390x as s390x in here but generally
+# don't. *sigh*
+if os.uname()[4] == "s390x":
+ _arch = "s390x"
+else:
+ _arch = iutil.getArch()
+
class ImageInstallMethod(InstallMethod):
def readCompsViaMethod(self, hdlist):
@@ -198,7 +205,7 @@ class CdromInstallMethod(ImageInstallMethod):
discNum = [ 0 ]
f.close()
if (newStamp == timestamp and
- arch == iutil.getArch() and
+ arch == _arch and
needed in discNum):
done = 1
self.currentDisc = discNum
@@ -243,7 +250,7 @@ class CdromInstallMethod(ImageInstallMethod):
discNum = [ 0 ]
f.close()
if (newStamp == timestamp and
- arch == iutil.getArch() and
+ arch == _arch and
needed in discNum):
done = 1
self.currentDisc = discNum
@@ -353,7 +360,7 @@ def getDiscNums(line):
def findIsoImages(path, messageWindow):
files = os.listdir(path)
- arch = iutil.getArch()
+ arch = _arch
discImages = {}
for file in files:
diff --git a/installclass.py b/installclass.py
index a8ab8145b..a2aadcc91 100644
--- a/installclass.py
+++ b/installclass.py
@@ -35,6 +35,18 @@ class BaseInstallClass:
showLoginChoice = 0
description = None
name = "base"
+ pkgstext = ""
+
+# pkgstext = _("\tDesktop shell (GNOME)\n"
+# "\tOffice suite (OpenOffice)\n"
+# "\tWeb browser (Mozilla) \n"
+# "\tEmail (Evolution)\n"
+# "\tInstant messaging\n"
+# "\tSound and video applications\n"
+# "\tGames\n"
+# "\tSoftware Development Tools\n"
+# "\tAdministration Tools\n")
+
# don't select this class by default
default = 0
@@ -329,14 +341,11 @@ class BaseInstallClass:
def setDesktop(self, id, desktop):
id.desktop.setDefaultDesktop (desktop)
- def setFirewall(self, id, enable = -1, policy = 1, trusts = [], ports = "",
- dhcp = 0, ssh = 0, telnet = 0, smtp = 0, http = 0,
- ftp = 0):
+ def setFirewall(self, id, enable = 1, trusts = [], ports = "",
+ ssh = 0, telnet = 0, smtp = 0, http = 0, ftp = 0):
id.firewall.enabled = enable
- id.firewall.policy = policy
id.firewall.trustdevs = trusts
id.firewall.portlist = ports
- id.firewall.dhcp = dhcp
id.firewall.ssh = ssh
id.firewall.telnet = telnet
id.firewall.smtp = smtp
diff --git a/installclasses/personal_desktop.py b/installclasses/personal_desktop.py
index caba6b4d8..8ea525c0d 100644
--- a/installclasses/personal_desktop.py
+++ b/installclasses/personal_desktop.py
@@ -1,5 +1,5 @@
from installclass import BaseInstallClass
-from rhpl.translate import N_
+from rhpl.translate import N_, _
from constants import *
import os
import iutil
@@ -14,6 +14,15 @@ class InstallClass(BaseInstallClass):
"installation type to install a graphical desktop "
"environment and create a system ideal for home "
"or desktop use.")
+
+ pkgstext = _("\tDesktop shell (GNOME)\n"
+ "\tOffice suite (OpenOffice)\n"
+ "\tWeb browser (Mozilla) \n"
+ "\tEmail (Evolution)\n"
+ "\tInstant messaging\n"
+ "\tSound and video applications\n"
+ "\tGames\n")
+
showLoginChoice = 0
sortPriority = 1
diff --git a/installclasses/workstation.py b/installclasses/workstation.py
index 89560e751..1724ef0de 100644
--- a/installclasses/workstation.py
+++ b/installclasses/workstation.py
@@ -1,5 +1,5 @@
import personal_desktop
-from rhpl.translate import N_
+from rhpl.translate import N_, _
import os
class InstallClass(personal_desktop.InstallClass):
@@ -11,6 +11,17 @@ class InstallClass(personal_desktop.InstallClass):
"environment with tools for software "
"development and system administration. ")
+ pkgstext = _("\tDesktop shell (GNOME)\n"
+ "\tOffice suite (OpenOffice)\n"
+ "\tWeb browser (Mozilla) \n"
+ "\tEmail (Evolution)\n"
+ "\tInstant messaging\n"
+ "\tSound and video applications\n"
+ "\tGames\n"
+ "\tSoftware Development Tools\n"
+ "\tAdministration Tools\n")
+
+
sortPriority = 2
showLoginChoice = 0
diff --git a/isys/isys.py b/isys/isys.py
index b0ecc9fee..91bb42951 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -313,6 +313,25 @@ def isUsableDasd(device):
def isLdlDasd(device):
return _isys.isLdlDasd(device)
+# read /proc/dasd/devices and get a mapping between devs and the dasdnum
+def getDasdDevPort():
+ ret = {}
+ f = open("/proc/dasd/devices", "r")
+ lines = f.readlines()
+ f.close()
+
+ for line in lines:
+ index = line.index("(")
+ dasdnum = line[:index]
+
+ start = line[index:].find("dasd")
+ end = line[start:].find(":")
+ dev = line[start:end + start].strip()
+
+ ret[dev] = dasdnum
+
+ return ret
+
def makeDevInode(name, fn=None):
if fn:
_isys.mkdevinode(name, fn)
diff --git a/isys/lang.c b/isys/lang.c
index 177e02126..e85b8041f 100644
--- a/isys/lang.c
+++ b/isys/lang.c
@@ -82,6 +82,7 @@ int loadKeymap(gzFile stream) {
int count = 0;
int magic;
short keymap[NR_KEYS];
+ struct stat sb;
#if defined (__s390__) || defined (__s390x__)
return 0;
@@ -89,6 +90,11 @@ int loadKeymap(gzFile stream) {
if (isVioConsole())
return 0;
+ /* assume that if we're already on a pty loading a keymap is silly */
+ fstat(0, &sb);
+ if (major(sb.st_rdev) == 3 || major(sb.st_rdev) == 136)
+ return 0;
+
if (gunzip_read(stream, &magic, sizeof(magic)) != sizeof(magic))
return -EIO;
diff --git a/isys/probe.c b/isys/probe.c
index ad7d3a42c..3645e88b3 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -121,7 +121,7 @@ int kdFindNetList(struct knownDevices * devices, int code) {
s = readFD(fd, &buf);
close(fd);
if (s < 0) {
- fprintf(stderr, "error reading /proc/net/dev!\n");
+ /* fprintf(stderr, "error reading /proc/net/dev!\n");*/
return 1;
}
@@ -708,7 +708,7 @@ static int ProcPartitionsGetDevices(struct knownDevices * devices) {
if (i < 1) {
close(fd);
free (buf);
- fprintf(stderr, "error reading /proc/partitions!\n");
+ /* fprintf(stderr, "error reading /proc/partitions!\n");*/
return 1;
}
close(fd);
@@ -793,7 +793,7 @@ static int ataraidGetDevices(struct knownDevices * devices) {
if (i < 1) {
close(fd);
free (buf);
- fprintf(stderr, "error reading /proc/partitions!\n");
+ /*fprintf(stderr, "error reading /proc/partitions!\n");*/
return 1;
}
close(fd);
diff --git a/iw/desktop_choice_gui.py b/iw/desktop_choice_gui.py
index bdff77f38..ff853a5c3 100644
--- a/iw/desktop_choice_gui.py
+++ b/iw/desktop_choice_gui.py
@@ -22,8 +22,8 @@ from flags import flags
class DesktopChoiceWindow (InstallWindow):
- windowTitle = N_("Workstation Defaults")
- htmlTag = "workstation-pkgs"
+ windowTitle = N_("Package Defaults")
+ htmlTag = "pkg-default"
def __init__ (self, ics):
InstallWindow.__init__ (self, ics)
@@ -48,52 +48,19 @@ class DesktopChoiceWindow (InstallWindow):
vbox.set_border_width (5)
hbox = gtk.HBox (gtk.FALSE, 0)
- # ugly hack
- if instclass.id == "workstation":
- self.windowTitle = N_("Workstation Defaults")
- self.ics.setTitle (_(self.windowTitle))
- self.htmlTag = "workstation-pkgs"
- self.ics.readHTML (self.htmlTag)
- labeltxt = _(
- "The default workstation environment includes our recommendations for "
- "new users, including:\n\n"
- "\tDesktop shell (GNOME)\n"
- "\tOffice suite (OpenOffice)\n"
- "\tWeb browser (Mozilla) \n"
- "\tEmail (Evolution)\n"
- "\tInstant messaging\n"
- "\tSound and video applications\n"
- "\tGames\n"
- "\tSoftware Development Tools\n"
- "\tAdministration Tools\n"
- "\n"
- "After installation, additional software can be added or removed using "
- "the 'redhat-config-packages' tool.\n\n"
- "If you are familiar with %s, you may have specific packages "
- "you would like to install or avoid installing. Check the box below to "
- "customize your installation.") % (productName,)
- elif instclass.id == "personal desktop":
- self.windowTitle = N_("Personal Desktop Defaults")
- self.ics.setTitle (_(self.windowTitle))
- self.htmlTag = "pdesktop-pkgs"
- self.ics.readHTML (self.htmlTag)
- labeltxt = _(
- "The default personal desktop environment includes our recommendations for "
- "new users, including:\n\n"
- "\tDesktop shell (GNOME)\n"
- "\tOffice suite (OpenOffice)\n"
- "\tWeb browser (Mozilla) \n"
- "\tEmail (Evolution)\n"
- "\tInstant messaging\n"
- "\tSound and video applications\n"
- "\tGames\n"
- "\n"
- "After installation, additional software can be added or removed using "
- "the 'redhat-config-packages' tool.\n\n"
- "If you are familiar with %s, you may have specific packages "
- "you would like to install or avoid installing. Check the box below to "
- "customize your installation.") % (productName,)
- else:
+ header = _("The default installation environment includes our "
+ "recommended package selection, including:\n\n")
+ footer = _("\n\nAfter installation, additional software can be "
+ "added or removed using the 'redhat-config-packages' "
+ "tool.\n\n"
+ "If you are familiar with %s, you may have specific "
+ "packages you would like to install or avoid "
+ "installing. Check the box below to "
+ "customize your installation.") %(productName,)
+
+ if len(instclass.pkgstext) > 0:
+ labeltxt = header + instclass.pkgstext + footer
+ else:
labeltxt = _(
"If you would like to change the default package set to be "
"installed you can choose to customize this below.")
diff --git a/iw/firewall_gui.py b/iw/firewall_gui.py
index 2592db4b3..ed0c05bcc 100644
--- a/iw/firewall_gui.py
+++ b/iw/firewall_gui.py
@@ -20,157 +20,114 @@ from rhpl.translate import _, N_
class FirewallWindow (InstallWindow):
- windowTitle = N_("Firewall Configuration")
+ windowTitle = N_("Firewall")
htmlTag = "securitylevel"
def __init__ (self, ics):
InstallWindow.__init__ (self, ics)
def getNext (self):
- if not self.__dict__.has_key("sec_none_radio"):
- return None
-
- if self.sec_none_radio.get_active ():
+ if self.disabled_radio.get_active ():
self.firewall.enabled = 0
- self.firewall.policy = 1
else:
+ self.firewall.enabled = 1
+
+ count = 0
+ self.firewall.trustdevs = []
- if self.sec_high_radio.get_active ():
- self.firewall.policy = 0
- self.firewall.enabled = 1
- elif self.sec_med_radio.get_active ():
- self.firewall.policy = 1
- self.firewall.enabled = 1
-
- if self.default_radio.get_active ():
- self.firewallState = 0
-
- if self.custom_radio.get_active ():
- self.firewallState = 1
- count = 0
- self.firewall.trustdevs = []
-
- for device in self.devices:
- val = self.trusted.get_active(count)
- if val == 1:
- self.firewall.trustdevs.append(device)
- count = count + 1
-
- count = 0
- for service in self.knownPorts.keys():
- val = self.incoming.get_active(count)
- if service == "DHCP":
- self.firewall.dhcp = val
- elif service == "SSH":
- self.firewall.ssh = val
- elif service == "Telnet":
- self.firewall.telnet = val
- elif service == "WWW (HTTP)":
- self.firewall.http = val
- elif service == "Mail (SMTP)":
- self.firewall.smtp = val
- elif service == "FTP":
- self.firewall.ftp = val
- count = count + 1
+ for device in self.devices:
+ val = self.trusted.get_active(count)
+ if val == 1:
+ self.firewall.trustdevs.append(device)
+ count = count + 1
+
+ count = 0
+ for service in self.knownPorts.keys():
+ val = self.incoming.get_active(count)
+ if service == "SSH":
+ self.firewall.ssh = val
+ elif service == "Telnet":
+ self.firewall.telnet = val
+ elif service == "WWW (HTTP)":
+ self.firewall.http = val
+ elif service == "Mail (SMTP)":
+ self.firewall.smtp = val
+ elif service == "FTP":
+ self.firewall.ftp = val
+ count = count + 1
- portstring = string.strip(self.ports.get_text())
- portlist = ""
- bad_token_found = 0
- bad_token = ""
- if portstring != "":
- tokens = string.split(portstring, ',')
- for token in tokens:
- try:
- #- if there's a colon in the token, it's valid
- if string.index(token,':'):
- parts = string.split(token, ':')
- try:
- portnum = string.atoi(parts[0])
- except:
- portnum = None
-
- if len(parts) > 2: # more than one colon
+ portstring = string.strip(self.ports.get_text())
+ portlist = ""
+ bad_token_found = 0
+ bad_token = ""
+ if portstring != "":
+ tokens = string.split(portstring, ',')
+ for token in tokens:
+ try:
+ #- if there's a colon in the token, it's valid
+ if string.index(token,':'):
+ parts = string.split(token, ':')
+ try:
+ portnum = string.atoi(parts[0])
+ except:
+ portnum = None
+
+ if len(parts) > 2: # more than one colon
+ bad_token_found = 1
+ bad_token = token
+ elif portnum is not None and (portnum < 1 or portnum > 65535):
+ bad_token_found = 1
+ bad_token = token
+ else:
+ # udp and tcp are the only valid protos
+ if parts[1] == 'tcp' or parts[1] == 'udp':
+ if portlist == "":
+ portlist = token
+ else:
+ portlist = portlist + ',' + token
+ else: # found protocol !tcp && !udp
+ bad_token_found = 1
+ bad_token = token
+ pass
+ except:
+ if token != "":
+ try:
+ try:
+ portnum = string.atoi(token)
+ except:
+ portnum = None
+
+ if portnum is not None and (portnum < 1 or portnum > 65535):
bad_token_found = 1
bad_token = token
- elif portnum is not None and (portnum < 1 or portnum > 65535):
- bad_token_found = 1
- bad_token = token
else:
- # udp and tcp are the only valid protos
- if parts[1] == 'tcp' or parts[1] == 'udp':
- if portlist == "":
- portlist = token
- else:
- portlist = portlist + ',' + token
- else: # found protocol !tcp && !udp
- bad_token_found = 1
- bad_token = token
- pass
- except:
- if token != "":
- try:
- try:
- portnum = string.atoi(token)
- except:
- portnum = None
-
- if portnum is not None and (portnum < 1 or portnum > 65535):
- bad_token_found = 1
- bad_token = token
- else:
- if portlist == "":
- portlist = token + ":tcp"
- else:
- portlist = portlist + ',' + token + ':tcp'
- except:
- bad_token_found = 1
- bad_token = token
- else:
- pass
-
- if bad_token_found == 1: # raise a warning
- text = _("Invalid port given: %s. The proper format is "
- "'port:protocol', where port is between 1 and 65535, and protocol is either 'tcp' or 'udp'.\n\nFor example, "
- "'1234:udp'") % (bad_token,)
-
- self.intf.messageWindow(_("Warning: Bad Token"),
- text, type="warning")
- raise gui.StayOnScreen
- else: # all the port data looks good
- self.firewall.portlist = portlist
+ if portlist == "":
+ portlist = token + ":tcp"
+ else:
+ portlist = portlist + ',' + token + ':tcp'
+ except:
+ bad_token_found = 1
+ bad_token = token
+ else:
+ pass
+
+ if bad_token_found == 1: # raise a warning
+ text = _("Invalid port given: %s. The proper format is "
+ "'port:protocol', where port is between 1 and 65535, and protocol is either 'tcp' or 'udp'.\n\nFor example, "
+ "'1234:udp'") % (bad_token,)
+
+ self.intf.messageWindow(_("Warning: Bad Token"),
+ text, type="warning")
+ raise gui.StayOnScreen
+ else: # all the port data looks good
+ self.firewall.portlist = portlist
def activate_firewall (self, widget):
- if self.sec_none_radio.get_active ():
- active = not (self.sec_none_radio.get_active())
-
- self.default_radio.set_sensitive (active)
- self.custom_radio.set_sensitive (active)
- self.trusted.set_sensitive(active)
- self.incoming.set_sensitive(active)
- self.ports.set_sensitive(active)
- self.label1.set_sensitive(active)
- self.label2.set_sensitive(active)
- self.label3.set_sensitive(active)
+ if self.disabled_radio.get_active ():
+ self.table.set_sensitive(gtk.FALSE)
else:
- self.default_radio.set_sensitive (gtk.TRUE)
- self.custom_radio.set_sensitive (gtk.TRUE)
-
- if self.custom_radio.get_active ():
- self.trusted.set_sensitive(self.custom_radio.get_active())
- self.incoming.set_sensitive(self.custom_radio.get_active())
- self.ports.set_sensitive(self.custom_radio.get_active())
- self.label1.set_sensitive(self.custom_radio.get_active())
- self.label2.set_sensitive(self.custom_radio.get_active())
- self.label3.set_sensitive(self.custom_radio.get_active())
-
- else:
- self.trusted.set_sensitive(self.custom_radio.get_active())
- self.incoming.set_sensitive(self.custom_radio.get_active())
- self.ports.set_sensitive(self.custom_radio.get_active())
- self.label1.set_sensitive(self.custom_radio.get_active())
- self.label2.set_sensitive(self.custom_radio.get_active())
- self.label3.set_sensitive(self.custom_radio.get_active())
+ self.table.set_sensitive(gtk.TRUE)
def getScreen (self, intf, network, firewall):
self.firewall = firewall
@@ -185,77 +142,51 @@ class FirewallWindow (InstallWindow):
box = gtk.VBox (gtk.FALSE, 5)
box.set_border_width (5)
- label = gtk.Label (_("Select a security level for the system: "))
- label.set_alignment (0.0, 0.5)
+ label = gui.WrappingLabel (_("A firewall can help prevent unauthorized access to your computer from the outside world. Would you like to enable a firewall?"))
+ label.set_alignment (0.0, 0)
+ label.set_size_request(450, -1)
- label.set_line_wrap (gtk.TRUE)
+# label.set_line_wrap (gtk.TRUE)
box.pack_start(label, gtk.FALSE)
- hbox = gtk.HBox (gtk.FALSE)
+ hbox = gtk.VBox (gtk.FALSE)
- self.sec_high_radio = gtk.RadioButton (None, (_("Hi_gh")))
- self.sec_med_radio = gtk.RadioButton (self.sec_high_radio, (_("_Medium")))
- self.sec_none_radio = gtk.RadioButton (self.sec_high_radio, (_("N_o firewall")))
- self.sec_none_radio.connect ("clicked", self.activate_firewall)
+ self.disabled_radio = gtk.RadioButton (None, (_("N_o firewall")))
+ self.enabled_radio = gtk.RadioButton (self.disabled_radio,
+ (_("_Enable firewall")))
+ self.custom_radio = gtk.RadioButton (self.disabled_radio,
+ (_("_Custom firewall")))
+ self.disabled_radio.connect("clicked", self.activate_firewall)
+ self.custom_radio.connect("clicked", self.activate_firewall)
+ self.enabled_radio.connect("clicked", self.activate_firewall)
- hbox.pack_start (self.sec_high_radio)
- hbox.pack_start (self.sec_med_radio)
- hbox.pack_start (self.sec_none_radio)
+ hbox.pack_start (self.disabled_radio)
+ hbox.pack_start (self.enabled_radio)
+# hbox.pack_start (self.custom_radio)
a = gtk.Alignment ()
a.add (hbox)
- a.set (1.0, 0.5, 0.7, 1.0)
-
- box.pack_start (a, gtk.FALSE)
-
- hsep = gtk.HSeparator ()
- box.pack_start (hsep, gtk.FALSE)
+ a.set (0.3, 0, 0.7, 1.0)
- self.default_radio = gtk.RadioButton (None, (_("Use _default firewall rules")))
- self.custom_radio = gtk.RadioButton (self.default_radio, (_("_Customize")))
- self.default_radio.set_active (gtk.TRUE)
+ box.pack_start (a, gtk.FALSE, 5)
- self.default_radio.connect ("clicked", self.activate_firewall)
- self.custom_radio.connect ("clicked", self.activate_firewall)
-
- box.pack_start (self.default_radio, gtk.FALSE)
- box.pack_start (self.custom_radio, gtk.FALSE)
+ self.table = gtk.Table (2, 8)
+ box.pack_start (self.table, gtk.FALSE, 5)
- table = gtk.Table (2, 3)
- box.pack_start (table)
-
- hbox = gtk.HBox(gtk.FALSE, 10)
- self.label1 = gui.MnemonicLabel (_("_Trusted devices:"))
- self.label1.set_alignment (0.2, 0.0)
-
- self.trusted = checklist.CheckList(1)
- self.trusted.set_size_request(-1, 80)
- self.label1.set_mnemonic_widget(self.trusted)
-
- trustedSW = gtk.ScrolledWindow()
- trustedSW.set_border_width(5)
- trustedSW.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- trustedSW.set_shadow_type(gtk.SHADOW_IN)
- trustedSW.add(self.trusted)
-
- if self.devices != []:
- table.attach (self.label1, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 5, 5)
- table.attach (trustedSW, 1, 2, 0, 1, gtk.EXPAND|gtk.FILL, gtk.FILL, 5, 5)
-
- for device in self.devices:
- if device in self.firewall.trustdevs:
- self.trusted.append_row ((device, device), gtk.TRUE)
- else:
- self.trusted.append_row ((device, device), gtk.FALSE)
- if self.network.netdevices[device].get('bootproto') == 'dhcp':
- self.firewall.dhcp = 1
+ y = 0
+ label = gtk.Label (_("What services should be allowed to pass through "
+ "the firewall?"))
+ label.set_size_request(450, -1)
+ label.set_alignment(0.0, 0.0)
+ self.table.attach(label, 0, 2, y, y + 1, gtk.EXPAND | gtk.FILL, gtk.FILL, 5, 5)
+ y = y + 1
hbox = gtk.HBox(gtk.FALSE, 10)
self.label2 = gui.MnemonicLabel (_("_Allow incoming:"))
self.label2.set_alignment (0.2, 0.0)
self.incoming = checklist.CheckList(1)
- self.incoming.set_size_request(-1, 140)
+ self.incoming.set_size_request(-1, 125)
self.label2.set_mnemonic_widget(self.incoming)
incomingSW = gtk.ScrolledWindow()
@@ -264,11 +195,10 @@ class FirewallWindow (InstallWindow):
incomingSW.set_shadow_type(gtk.SHADOW_IN)
incomingSW.add(self.incoming)
- table.attach (self.label2, 0, 1, 1, 2, gtk.FILL, gtk.FILL, 5, 5)
- table.attach (incomingSW, 1, 2, 1, 2, gtk.EXPAND|gtk.FILL, gtk.FILL, 5, 5)
+# self.table.attach (self.label2, 0, 1, y, y + 1, gtk.FILL, gtk.FILL, 5, 5)
+ self.table.attach (incomingSW, 0, 2, y, y + 1, gtk.EXPAND|gtk.FILL, gtk.FILL, 5, 5)
- self.knownPorts = {"DHCP": self.firewall.dhcp,
- "SSH": self.firewall.ssh,
+ self.knownPorts = {"SSH": self.firewall.ssh,
"Telnet": self.firewall.telnet,
"WWW (HTTP)": self.firewall.http,
"Mail (SMTP)": self.firewall.smtp,
@@ -277,32 +207,59 @@ class FirewallWindow (InstallWindow):
for item in self.knownPorts.keys():
self.incoming.append_row ((item, ""), self.knownPorts[item])
+ y = y + 1
self.label3 = gui.MnemonicLabel (_("Other _ports:"))
self.ports = gtk.Entry ()
self.label3.set_mnemonic_widget(self.ports)
- table.attach (self.label3, 0, 1, 2, 3, gtk.FILL, gtk.FILL, 5, 5)
- table.attach (self.ports, 1, 2, 2, 3, gtk.EXPAND|gtk.FILL, gtk.FILL, 10, 5)
+ self.table.attach (self.label3, 0, 1, y, y + 1, gtk.FILL, gtk.FILL, 5, 5)
+ self.table.attach (self.ports, 1, 2, y, y + 1, gtk.EXPAND|gtk.FILL, gtk.FILL, 10, 5)
+ y = y + 1
- if self.firewall.enabled == 0:
- self.sec_none_radio.set_active (gtk.TRUE)
- elif self.firewall.policy == 0:
- self.sec_high_radio.set_active (gtk.TRUE)
- elif self.firewall.policy == 1:
- self.sec_med_radio.set_active (gtk.TRUE)
+ label = gui.WrappingLabel (_("If you would like to allow all traffic "
+ "from a device, select it below."))
+ label.set_size_request(450, -1)
+ label.set_alignment(0, 1)
+ self.table.attach(label, 0, 2, y, y + 1,
+ gtk.FILL, gtk.FILL, 5, 5)
+
+ y = y + 1
+ hbox = gtk.HBox(gtk.FALSE, 10)
+ self.label1 = gui.MnemonicLabel (_("_Trusted devices:"))
+ self.label1.set_alignment (0.2, 0.0)
+
+ self.trusted = checklist.CheckList(1)
+ self.trusted.set_size_request(-1, 40)
+ self.label1.set_mnemonic_widget(self.trusted)
+
+ trustedSW = gtk.ScrolledWindow()
+ trustedSW.set_border_width(5)
+ trustedSW.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+ trustedSW.set_shadow_type(gtk.SHADOW_IN)
+ trustedSW.add(self.trusted)
+
+ if self.devices != []:
+# self.table.attach (self.label1, 0, 1, y, y + 1, gtk.FILL, gtk.FILL, 5, 5)
+ self.table.attach (trustedSW, 0, 2, y, y + 1, gtk.EXPAND|gtk.FILL, gtk.FILL, 5, 0)
+ for device in self.devices:
+ if device in self.firewall.trustdevs:
+ self.trusted.append_row ((device, device), gtk.TRUE)
+ else:
+ self.trusted.append_row ((device, device), gtk.FALSE)
+
+
+ y = y + 1
+
+ if self.firewall.enabled == 0:
+ self.disabled_radio.set_active (gtk.TRUE)
+ else:
+ self.enabled_radio.set_active(gtk.TRUE)
+
if self.firewall.portlist != "":
self.ports.set_text (self.firewall.portlist)
- if self.firewall.custom == 1:
- self.custom_radio.set_active(gtk.TRUE)
- else:
- self.trusted.set_sensitive(gtk.FALSE)
- self.incoming.set_sensitive(gtk.FALSE)
- self.ports.set_sensitive(gtk.FALSE)
- self.label1.set_sensitive(gtk.FALSE)
- self.label2.set_sensitive(gtk.FALSE)
- self.label3.set_sensitive(gtk.FALSE)
+ self.activate_firewall(None)
return box
diff --git a/iw/xconfig_gui.py b/iw/xconfig_gui.py
index ca1d6f5b1..120c6ef49 100644
--- a/iw/xconfig_gui.py
+++ b/iw/xconfig_gui.py
@@ -974,7 +974,7 @@ class XConfigWindow (InstallWindow):
"use the frame buffer driver for "
"the X Window System. If you do "
"not want to setup the X Window "
- "System , choose "
+ "System, choose "
"'Skip X Configuration' below."))
box.pack_start (label, gtk.FALSE, gtk.FALSE)
self.force_ppc_fb = 1
diff --git a/kickstart.py b/kickstart.py
index 24db10203..a95910bde 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -96,25 +96,21 @@ class KickstartBase(BaseInstallClass):
def doFirewall(self, id, args):
(args, extra) = isys.getopt(args, '',
- [ 'dhcp', 'ssh', 'telnet', 'smtp', 'http', 'ftp',
+ [ 'dhcp', 'ssh', 'telnet', 'smtp', 'http', 'ftp', 'enabled',
'port=', 'high', 'medium', 'disabled', 'trust=' ])
- dhcp = 0
ssh = 0
telnet = 0
smtp = 0
http = 0
ftp = 0
- policy = 0
enable = -1
trusts = []
ports = ""
for n in args:
(str, arg) = n
- if str == '--dhcp':
- dhcp = 1
- elif str == '--ssh':
+ if str == '--ssh':
ssh = 1
elif str == '--telnet':
telnet = 1
@@ -124,11 +120,10 @@ class KickstartBase(BaseInstallClass):
http = 1
elif str == '--ftp':
ftp = 1
- elif str == '--high':
- policy = 0
+ elif str == '--high' or str == '--medium':
+ log("used deprecated firewall option: %s" %(str[2:],))
enable = 1
- elif str == '--medium':
- policy = 1
+ elif str == '--enabled':
enable = 1
elif str == '--disabled':
enable = 0
@@ -140,7 +135,7 @@ class KickstartBase(BaseInstallClass):
else:
ports = arg
- self.setFirewall(id, enable, policy, trusts, ports, dhcp, ssh, telnet,
+ self.setFirewall(id, enable, trusts, ports, ssh, telnet,
smtp, http, ftp)
def doAuthconfig(self, id, args):
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c
index 01eb920db..aa98653dd 100644
--- a/loader2/driverdisk.c
+++ b/loader2/driverdisk.c
@@ -115,8 +115,10 @@ static int loadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
sprintf(file, "/tmp/ramfs/DD-%d", disknum);
mkdirChain(file);
- startNewt(flags);
- winStatus(40, 3, _("Loading"), _("Reading driver disk..."));
+ if (!FL_CMDLINE(flags)) {
+ startNewt(flags);
+ winStatus(40, 3, _("Loading"), _("Reading driver disk..."));
+ }
for (fnPtr = driverDiskFiles; *fnPtr; fnPtr++) {
sprintf(file, "%s/%s", mntpt, *fnPtr);
@@ -138,7 +140,8 @@ static int loadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
sprintf(file, "%s/pcitable", mntpt);
pciReadDrivers(file);
- newtPopWindow();
+ if (!FL_CMDLINE(flags))
+ newtPopWindow();
disknum++;
return 0;
diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index d063e1d6a..849eb211c 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -210,7 +210,9 @@ else # ctc0, escon0, iucv0
if [ ":$NETTYPE" = ":iucv" ]; then
while [ -z "$IUCV" ]; do
echo $"Enter iucv kernel module options (usually iucv=HOST,"
- echo $"where HOST is TCPIP for VM, \$TCPIP for VIF):"
+ echo $"where HOST is TCPIP for the VM TCP/IP service machine"
+ echo $"or the name (in capital letters) of another"
+ echo $"Linux guest:"
read IUCV
done
fi
@@ -250,7 +252,7 @@ elif [ -n "$QETH" -o -n "$HSI" ]; then
insmod qeth$LO
ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- echo "alias $DEVICE qeth" >> /tmp/modules.conf
+ echo "alias $DEVICE qeth" >> /tmp/modules.conf
else
echo $"Unknown network device, aborting installation"
exit 1
diff --git a/loader2/loader.c b/loader2/loader.c
index b08e0b0f2..648916e31 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -283,8 +283,6 @@ void loadUpdates(struct knownDevices *kd, int flags) {
char * buf;
int num = 0;
- startNewt(flags);
-
do {
rc = getRemovableDevices(&devNames);
if (rc == 0)
@@ -673,7 +671,8 @@ static char *doLoaderMain(char * location,
rhcdfnd = 1;
}
- startNewt(flags);
+ if (!FL_CMDLINE(flags))
+ startNewt(flags);
step = STEP_LANG;
diff --git a/loader2/md5.c b/loader2/md5.c
index 559298b6c..22f59a04e 100644
--- a/loader2/md5.c
+++ b/loader2/md5.c
@@ -16,14 +16,20 @@
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*
+ * Modified 12 June 2003 Jeremy Katz <katzj@redhat.com> to handle
+ * endianness better
+ *
*/
#include <string.h>
+#include <endian.h>
#include "md5.h"
-#ifndef HIGHFIRST
-#define byteReverse(buf, len) /* Nothing */
-#else
+void MD5_Transform(uint32 *buf, uint32 const *in);
+
+#define IS_BIG_ENDIAN() (__BYTE_ORDER == __BIG_ENDIAN)
+#define IS_LITTLE_ENDIAN() (__BYTE_ORDER == __LITTLE_ENDIAN)
+
static void byteReverse(unsigned char *buf, unsigned longs);
#ifndef ASM_MD5
@@ -41,9 +47,6 @@ static void byteReverse(unsigned char *buf, unsigned longs)
} while (--longs);
}
#endif
-#endif
-
-void MD5_Transform(uint32 buf[4], uint32 const in[16]);
/*
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
@@ -58,6 +61,12 @@ void MD5_Init(struct MD5Context *ctx)
ctx->bits[0] = 0;
ctx->bits[1] = 0;
+
+
+ if (IS_BIG_ENDIAN())
+ ctx->doByteReverse = 1;
+ else
+ ctx->doByteReverse = 0;
}
/*
@@ -88,7 +97,7 @@ void MD5_Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
return;
}
memcpy(p, buf, t);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
buf += t;
len -= t;
@@ -97,7 +106,7 @@ void MD5_Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
while (len >= 64) {
memcpy(ctx->in, buf, 64);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
buf += 64;
len -= 64;
@@ -132,7 +141,7 @@ void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
if (count < 8) {
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
/* Now fill the next block with 56 bytes */
@@ -141,14 +150,14 @@ void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
}
- byteReverse(ctx->in, 14);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 14);
/* Append length in bits and transform */
((uint32 *) ctx->in)[14] = ctx->bits[0];
((uint32 *) ctx->in)[15] = ctx->bits[1];
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
+ if (ctx->doByteReverse) byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
}
diff --git a/loader2/md5.h b/loader2/md5.h
index 705692ab6..fb6bf20a9 100644
--- a/loader2/md5.h
+++ b/loader2/md5.h
@@ -9,6 +9,7 @@ struct MD5Context {
uint32 buf[4];
uint32 bits[2];
unsigned char in[64];
+ int doByteReverse;
};
void MD5_Init(struct MD5Context *);
diff --git a/loader2/mediacheck.c b/loader2/mediacheck.c
index 83dda6e61..e507050e1 100644
--- a/loader2/mediacheck.c
+++ b/loader2/mediacheck.c
@@ -373,5 +373,6 @@ int main(int argc, char **argv) {
newtCls();
rc = mediaCheckFile(argv[1], "TESTING");
newtFinished();
+ exit (0);
}
#endif
diff --git a/loader2/modules.c b/loader2/modules.c
index dbe9e8c98..927fbc834 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -268,9 +268,11 @@ static int loadModule(const char * modName, struct extractedModule * path,
if (mi->major == DRIVER_SCSI) {
deviceCount = scsiDiskCount();
- startNewt(flags);
- scsiWindow(modName);
- popWindow = 1;
+ if (!FL_CMDLINE(flags)) {
+ startNewt(flags);
+ scsiWindow(modName);
+ popWindow = 1;
+ }
}
}
diff --git a/loader2/net.c b/loader2/net.c
index 57891ee6c..97f689a30 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -227,7 +227,7 @@ void setupNetworkDeviceConfig(struct networkDeviceConfig * cfg,
_("Sending request for IP information for %s..."),
loaderData->netDev, 0);
} else {
- printf(_("Sending request for IP information for %s..."),
+ printf("Sending request for IP information for %s...\n",
loaderData->netDev);
}
@@ -638,7 +638,7 @@ int findHostAndDomain(struct networkDeviceConfig * dev, int flags) {
winStatus(40, 3, _("Hostname"),
_("Determining host name and domain..."));
else
- printf(_("Determining host name and domain..."));
+ printf("Determining host name and domain...\n");
name = mygethostbyaddr(inet_ntoa(dev->dev.ip));
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 41a26ec5a..8b86aa416 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -165,7 +165,7 @@ char * mountNfsImage(struct installMethod * method,
/* JKFIXME: hack because /mnt/source is hard-coded
* in mountStage2() */
copyUpdatesImg("/mnt/source2/RedHat/base/updates.img");
- copyUpdatesImg("/mnt/source2/RedHat/base/product.img");
+ copyProductImg("/mnt/source2/RedHat/base/product.img");
queryIsoMediaCheck(path, flags);
diff --git a/loader2/telnetd.c b/loader2/telnetd.c
index c6c6343cd..c2f28d923 100644
--- a/loader2/telnetd.c
+++ b/loader2/telnetd.c
@@ -95,7 +95,7 @@ int beTelnet(int flags) {
telnet_negotiate(conn, &termType, &height, &width);
-#ifdef DEBUG
+#ifdef DEBUG_TELNET
printf("got term type %s\n", termType);
#endif
@@ -107,7 +107,7 @@ int beTelnet(int flags) {
}
if (height != -1 && width != -1) {
-#ifdef DEBUF
+#ifdef DEBUG_TELNET
printf("setting window size to %d x %d\n", width, height);
#endif
ws.ws_row = height;
@@ -119,7 +119,7 @@ int beTelnet(int flags) {
child = fork();
if (child) {
-#ifndef DEBUG
+#ifndef DEBUG_TELNET
startNewt(flags);
winStatus(45, 3, _("Telnet"), _("Running anaconda via telnet..."));
#endif
@@ -134,7 +134,7 @@ int beTelnet(int flags) {
if (fds[0].revents) {
i = read(masterFd, buf, sizeof(buf));
-#ifdef DEBUG
+#ifdef DEBUG_TELNET
{
int j;
int row;
@@ -173,7 +173,7 @@ int beTelnet(int flags) {
i = telnet_process_input(&ts, buf, i);
write(masterFd, buf, i);
-#ifdef DEBUG
+#ifdef DEBUG_TELNET
{
int j;
@@ -192,7 +192,7 @@ int beTelnet(int flags) {
logMessage("poll: %s", strerror(errno));
}
-#ifndef DEBUG
+#ifndef DEBUG_TELNET
stopNewt();
#endif
diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c
index 719b425e6..1b2587bce 100644
--- a/loader2/urlinstall.c
+++ b/loader2/urlinstall.c
@@ -44,7 +44,7 @@ static int loadSingleUrlImage(struct iurlinfo * ui, char * file, int flags,
int rc;
char * newFile = NULL;
- fd = urlinstStartTransfer(ui, file, NULL, 1);
+ fd = urlinstStartTransfer(ui, file, NULL, 1, flags);
if (fd == -2) return 1;
@@ -54,7 +54,7 @@ static int loadSingleUrlImage(struct iurlinfo * ui, char * file, int flags,
newFile = alloca(strlen(device) + 20);
sprintf(newFile, "disc1/%s", file);
- fd = urlinstStartTransfer(ui, newFile, NULL, 1);
+ fd = urlinstStartTransfer(ui, newFile, NULL, 1, flags);
if (fd == -2) return 1;
if (fd < 0) {
@@ -70,7 +70,7 @@ static int loadSingleUrlImage(struct iurlinfo * ui, char * file, int flags,
rc = copyFileAndLoopbackMount(fd, dest, flags, device, mntpoint);
- urlinstFinishTransfer(ui, fd);
+ urlinstFinishTransfer(ui, fd, flags);
if (newFile) {
newFile = malloc(strlen(ui->prefix ) + 20);
@@ -383,8 +383,7 @@ int getFileFromUrl(char * url, char * dest, struct knownDevices * kd,
}
}
- fd = urlinstStartTransfer(&ui, file, ehdrs, 1);
-
+ fd = urlinstStartTransfer(&ui, file, ehdrs, 1, flags);
if (fd < 0) {
logMessage("failed to retrieve http://%s/%s/%s", ui.address, ui.prefix, file);
return 1;
@@ -397,7 +396,7 @@ int getFileFromUrl(char * url, char * dest, struct knownDevices * kd,
return 1;
}
- urlinstFinishTransfer(&ui, fd);
+ urlinstFinishTransfer(&ui, fd, flags);
return 0;
}
diff --git a/loader2/urls.c b/loader2/urls.c
index 03acda76e..5074a137e 100644
--- a/loader2/urls.c
+++ b/loader2/urls.c
@@ -144,7 +144,8 @@ char *convertUIToURL(struct iurlinfo *ui) {
/* see ftp.c:httpGetFileDesc() for details */
/* set to NULL if not needed */
int urlinstStartTransfer(struct iurlinfo * ui, char * filename,
- char *extraHeaders, int silentErrors) {
+ char *extraHeaders, int silentErrors,
+ int flags) {
char * buf;
int fd;
char * finalPrefix;
@@ -191,17 +192,20 @@ int urlinstStartTransfer(struct iurlinfo * ui, char * filename,
}
}
- winStatus(70, 3, _("Retrieving"), "%s %s...", _("Retrieving"), filename);
+ if (!FL_CMDLINE(flags))
+ winStatus(70, 3, _("Retrieving"), "%s %s...", _("Retrieving"),
+ filename);
return fd;
}
-int urlinstFinishTransfer(struct iurlinfo * ui, int fd) {
+int urlinstFinishTransfer(struct iurlinfo * ui, int fd, int flags) {
if (ui->protocol == URL_METHOD_FTP)
close(ui->ftpPort);
close(fd);
- newtPopWindow();
+ if (!FL_CMDLINE(flags))
+ newtPopWindow();
return 0;
}
diff --git a/loader2/urls.h b/loader2/urls.h
index f2110bff2..49290d832 100644
--- a/loader2/urls.h
+++ b/loader2/urls.h
@@ -22,8 +22,8 @@ int setupRemote(struct iurlinfo * ui);
int urlMainSetupPanel(struct iurlinfo * ui, urlprotocol protocol,
char * doSecondarySetup);
int urlSecondarySetupPanel(struct iurlinfo * ui, urlprotocol protocol);
-int urlinstStartTransfer(struct iurlinfo * ui, char * filename, char *extraHeaders,
- int silentErrors);
-int urlinstFinishTransfer(struct iurlinfo * ui, int fd);
+int urlinstStartTransfer(struct iurlinfo * ui, char * filename,
+ char *extraHeaders, int silentErrors, int flags);
+int urlinstFinishTransfer(struct iurlinfo * ui, int fd, int flags);
#endif
diff --git a/packages.py b/packages.py
index eba452fb8..883e3f910 100644
--- a/packages.py
+++ b/packages.py
@@ -258,6 +258,11 @@ def checkDependencies(dir, intf, disp, id, instPath):
else:
ts = getAnacondaTS()
how = "i"
+
+ # set the rpm log file to /dev/null so that we don't segfault
+ f = open("/dev/null", "w+")
+ rpm.setLogFile(f)
+ ts.scriptFd = f.fileno()
for p in id.grpset.hdrlist.pkgs.values():
if p.isSelected():
@@ -305,9 +310,14 @@ class InstallCallback:
self.progressWindowClass (_("Processing"),
_("Preparing to install..."),
total)
+ try:
+ self.incr = total / 10
+ except:
+ pass
if (what == rpm.RPMCALLBACK_TRANS_PROGRESS):
- if self.progressWindow:
+ if self.progressWindow and amount > self.lastprogress + self.incr:
self.progressWindow.set (amount)
+ self.lastprogress = amount
if (what == rpm.RPMCALLBACK_TRANS_STOP and self.progressWindow):
self.progressWindow.pop ()
@@ -405,6 +415,8 @@ class InstallCallback:
self.method = method
self.progressWindowClass = progressWindowClass
self.progressWindow = None
+ self.lastprogress = 0
+ self.incr = 20
self.instLog = instLog
self.modeText = modeText
self.beenCalled = 0
diff --git a/partedUtils.py b/partedUtils.py
index d40a06d40..71a724bb2 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -263,8 +263,15 @@ def checkDasdFmt(disk, intf):
return 0
if intf:
+ try:
+ devs = isys.getDasdDevPort()
+ dev = "/dev/%s (%s" %(disk.dev.path[5:], devs[device])
+ except Exception, e:
+ log("exception getting dasd dev ports: %s" %(e,))
+ dev = "/dev/%s" %(disk.dev.path[5:],)
+
rc = intf.messageWindow(_("Warning"),
- _("The /dev/%s device is LDL formatted instead of "
+ _("The device %s is LDL formatted instead of "
"CDL formatted. LDL formatted DASDs are not "
"supported for usage during an install of %s. "
"If you wish to use this disk for installation, "
@@ -272,7 +279,7 @@ def checkDasdFmt(disk, intf):
"ALL DATA on this drive.\n\n"
"Would you like to reformat this DASD using CDL "
"format?")
- %(disk.dev.path[5:], productName), type = "yesno")
+ %(dev, productName), type = "yesno")
if rc == 0:
return 1
else:
@@ -707,7 +714,8 @@ class DiskSet:
def dasdFmt (self, intf = None, drive = None):
"""Format dasd devices (s390)."""
- self.closeDevices()
+ if self.disks.has_key(drive):
+ del self.disks[drive]
w = intf.progressWindow (_("Initializing"),
_("Please wait while formatting drive %s...\n"
@@ -781,8 +789,7 @@ class DiskSet:
w and w.pop()
isys.flushDriveDict()
- self.refreshDevices()
-
+
if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0):
return 0
diff --git a/scripts/mk-images b/scripts/mk-images
index 251ab96dc..d9bcada4e 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -496,6 +496,7 @@ EOF
install -m 644 $IMGPATH/usr/share/terminfo/l/linux $MBD_DIR/etc/terminfo/l/linux
install -m 644 $IMGPATH/usr/share/terminfo/x/xterm $MBD_DIR/etc/terminfo/x/xterm
install -m 644 $IMGPATH/usr/share/terminfo/v/vt100 $MBD_DIR/etc/terminfo/v/vt100
+ install -m 644 $IMGPATH/usr/share/terminfo/v/vt100-nav $MBD_DIR/etc/terminfo/v/vt100-nav
makeproductfile $MBD_DIR
mkdir -p $MBD_DIR/etc/terminfo/b
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index 3a7edb6ed..2df106ffe 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -35,6 +35,8 @@ makeBootImages() {
cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/chrp
$IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/chrp/yaboot
+ $IMGPATH/usr/bin/mkzimage $KERNELROOT/boot/vmlinuz-partial* $TOPDESTPATH/ppc/chrp/ramdisk.image.gz $TOPDESTPATH/images/boot.img
+
# we also want to make a boot.iso here
mkdir -p $TOPDESTPATH/isopath/ppc/chrp $TOPDESTPATH/isopath/etc
cp $TOPDESTPATH/etc/* $TOPDESTPATH/isopath/etc/
diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390
index 98e0c66ce..963209456 100644
--- a/scripts/mk-images.s390
+++ b/scripts/mk-images.s390
@@ -170,7 +170,7 @@ EOF
install -m 644 $MYLANGTABLE $MBD_DIR/etc/lang-table
install -m 644 $LOADERBINDIR/$MYLOADERTR $MBD_DIR/etc/loader.tr
- for i in a/ansi d/dumb k/kterm l/linux s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do
+ for i in a/ansi d/dumb k/kterm l/linux s/screen v/vt100 v/vt10-nav v/vt102 x/xterm x/xterm-color; do
install -m 644 $IMGPATH/usr/share/terminfo/$i $MBD_DIR/etc/terminfo/$i
done
makeproductfile $MBD_DIR
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index ae9444410..5b50a388f 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -79,8 +79,8 @@ expandPackageSet() {
for n in $RPMS; do
[ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." $(basename $n)
- if [ $(rpm --nosignature --nodigest -qp --qf '%{NAME}' $n) = "glibc-common" ] ; then
- GLIBC=$n
+ if [ $(rpm --nosignature --nodigest -qp --qf '%{NAME}' $n) = "tzdata" ] ; then
+ TZDATA=$n
fi
rpm2cpio $n | (cd $PKGDEST; cpio -E $KEEPFILES --quiet -iumd)
[ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." "$(basename $n | sed 's/./ /g')"
@@ -554,6 +554,7 @@ usr/bin/maketilo
usr/bin/mini-wm
usr/bin/pango*
usr/bin/syslinux
+usr/bin/mkzimage
usr/bin/tac
usr/bin/tail
usr/bin/tilo
@@ -784,10 +785,9 @@ echo "Expanding graphical packages..."
echo "retrieving timezones"
TZDIR=/tmp/glibc-timezone-$$
mkdir -p $TZDIR/usr/share/zoneinfo
-rpm2cpio $GLIBC | (cd $TZDIR; cpio --quiet -iumd usr/share/zoneinfo ./usr/share/zoneinfo ./usr/share/zoneinfo/* usr/share/zoneinfo/*)
+rpm2cpio $TZDATA | (cd $TZDIR; cpio --quiet -iumd usr/share/zoneinfo ./usr/share/zoneinfo ./usr/share/zoneinfo/* usr/share/zoneinfo/*)
(cd $TZDIR; tar cSpf - $TIMEZONES) | (cd $DEST; tar xSpf -)
(cd $TZDIR; tar cSpf - $TIMEZONES) | (cd $DESTGR; tar xSpf -)
-rm -rf $TZDIR
chown -R root:root $DEST $DESTGR
chmod -R a+rX-w $DEST $DESTGR
@@ -980,9 +980,13 @@ for p in $DEST $DESTGR; do
(cd $p/lib; rm -f libnss_files.so.1 libnss_dns.so.1)
fi
- (cd /usr/share/zoneinfo; find . -type f -or -type l |
+ if [ -d $TZDIR/usr/share/zoneinfo ]; then
+ (cd $TZDIR/usr/share/zoneinfo; find . -type f -or -type l |
grep '^./[A-Z]' | sort | sed 's/^..//' |
gzip -9) > $p/usr/lib/timezones.gz
+ else
+ echo "ERROR: unable to explode tzdata for small images"
+ fi
if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then
runroot $COMPONENT --onlyone --arch $ARCH "cd $p\; usr/lib/anaconda-runtime/scrubtree $DEBUG $p"
@@ -1077,6 +1081,8 @@ rm -f $DESTGR/usr/$LIBDIR/python?.?/site-packages/email/
rm -f $DESTGR/usr/$LIBDIR/python?.?/site-packages/curses/
rm -f $DESTGR/usr/$LIBDIR/python?.?/site-packages/pydoc.py
+# clean up tzdata
+rm -rf $TZDIR
# this is only for the minimal second stage
echo "Cleaning ramdisk install images..."
diff --git a/textw/desktop_choice_text.py b/textw/desktop_choice_text.py
index bc191ce29..510bbb07b 100644
--- a/textw/desktop_choice_text.py
+++ b/textw/desktop_choice_text.py
@@ -23,13 +23,11 @@ class DesktopChoiceWindow:
toplevel = GridFormHelp (screen, _("Workstation Defaults"),
"wsdefaults", 1, 5)
-
- labeltxt = N_("The Personal Desktop and Workstation options "
- "install a default set of applications that will "
- "allow you to browse the Internet, send and receive "
- "email, and create and edit documents on your %s "
- "system. The Workstation option includes development "
- "and administration tools as well.\n\n"
+
+ labeltxt = N_("The default installation environment includes our "
+ "recommended package selection. After installation, "
+ "additional software can be added or removed using the "
+ "'redhat-config-packages' tool.\n\n"
"However %s ships with many more applications, and "
"you may customize the selection of software "
"installed if you want.")
diff --git a/textw/firewall_text.py b/textw/firewall_text.py
index 14c0c56fa..2d3cb2e9c 100644
--- a/textw/firewall_text.py
+++ b/textw/firewall_text.py
@@ -23,14 +23,11 @@ class FirewallWindow:
bb = ButtonBar (screen, (TEXT_OK_BUTTON, (_("Customize"), "customize"), TEXT_BACK_BUTTON))
- toplevel = GridFormHelp (screen, _("Firewall Configuration"),
+ toplevel = GridFormHelp (screen, _("Firewall"),
"securitylevel", 1, 5)
- text = _("A firewall protects against unauthorized "
- "network intrusions. High security blocks all "
- "incoming accesses. Medium blocks access "
- "to system services (such as telnet or printing), "
- "but allows other connections. No firewall allows "
- "all connections and is not recommended. ")
+ text = _("A firewall can help prevent unauthorized access to your "
+ "computer from the outside world. Would you like to enable "
+ "a firewall?")
toplevel.add (TextboxReflowed(50, text), 0, 0, (0, 0, 0, 1))
toplevel.add (bb, 0, 4, (0, 0, 0, 0), growx = 1)
@@ -39,23 +36,20 @@ class FirewallWindow:
bigGrid = Grid(2,15)
- typeGrid = Grid(3,2)
+ typeGrid = Grid(2,1)
- label = Label(_("Security Level:"))
- smallGrid.setField (label, 0, 0, (0, 0, 0, 1), anchorLeft = 1)
+# label = Label(_("Security Level:"))
+# smallGrid.setField (label, 0, 0, (0, 0, 0, 1), anchorLeft = 1)
- self.paranoid = SingleRadioButton(_("High"), None, firewall.enabled and not firewall.policy)
- self.paranoid.setCallback(self.radiocb, (firewall, self.paranoid))
- typeGrid.setField (self.paranoid, 0, 0, (0, 0, 1, 0), anchorLeft = 1)
- self.simple = SingleRadioButton(_("Medium"), self.paranoid, firewall.enabled and firewall.policy)
- self.simple.setCallback(self.radiocb, (firewall, self.simple))
- typeGrid.setField (self.simple, 1, 0, (0, 0, 1, 0), anchorLeft = 1)
- self.disabled = SingleRadioButton(_("No firewall"), self.simple, not firewall.enabled)
+ self.enabled = SingleRadioButton(_("Enable firewall"), None, firewall.enabled)
+ self.enabled.setCallback(self.radiocb, (firewall, self.enabled))
+ typeGrid.setField (self.enabled, 0, 0, (0, 0, 1, 0), anchorLeft = 1)
+ self.disabled = SingleRadioButton(_("No firewall"), self.enabled, not firewall.enabled)
self.disabled.setCallback(self.radiocb, (firewall, self.disabled))
- typeGrid.setField (self.disabled, 2, 0, (0, 0, 1, 0), anchorLeft = 1)
+ typeGrid.setField (self.disabled, 1, 0 , (0, 0, 1, 0), anchorRight = 1)
- smallGrid.setField (typeGrid, 1, 0, (1, 0, 0, 1), anchorLeft = 1)
+ smallGrid.setField (typeGrid, 0, 0, (1, 0, 0, 1), anchorLeft = 1, growx = 1)
currentRow = 1
devices = network.available().keys()
@@ -78,8 +72,6 @@ class FirewallWindow:
(1, 0, 0, 1), anchorLeft = 1)
currentRow = currentRow + 1
for dev in devices:
- if network.netdevices[dev].get('bootproto') == 'dhcp':
- firewall.dhcp = 1
devicelist.append(dev, selected = (dev in firewall.trustdevs))
bigGrid.setField (Label(_("Allow incoming:")), 0, currentRow, (0, 0, 0, 0),
@@ -87,8 +79,6 @@ class FirewallWindow:
self.portGrid = Grid(3,2)
- self.dhcp = Checkbox (_("DHCP"), firewall.dhcp)
- self.portGrid.setField (self.dhcp, 0, 0, (0, 0, 1, 0), anchorLeft = 1)
self.ssh = Checkbox (_("SSH"), firewall.ssh)
self.portGrid.setField (self.ssh, 1, 0, (0, 0, 1, 0), anchorLeft = 1)
self.telnet = Checkbox (_("Telnet"), firewall.telnet)
@@ -210,7 +200,6 @@ class FirewallWindow:
firewall.trustdevs.append(dev)
# firewall.portlist = self.other.value()
- firewall.dhcp = self.dhcp.selected()
firewall.ssh = self.ssh.selected()
firewall.telnet = self.telnet.selected()
firewall.http = self.http.selected()
@@ -220,10 +209,6 @@ class FirewallWindow:
firewall.enabled = 0
else:
firewall.enabled = 1
- if self.paranoid.selected():
- firewall.policy = 0
- else:
- firewall.policy = 1
return INSTALL_OK
@@ -231,10 +216,8 @@ class FirewallWindow:
(firewall, widget) = args
if widget == self.disabled:
firewall.enabled = 0
- elif widget == self.simple:
- firewall.policy = 1
- elif widget == self.paranoid:
- firewall.policy = 0
+ elif widget == self.enabled:
+ firewall.enabled = 1
else:
raise RuntimeError, "never reached"