summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-07-16 03:23:20 +0000
committerJeremy Katz <katzj@redhat.com>2003-07-16 03:23:20 +0000
commita51764f258d46a2e2f0ae39f25144c6ffabb8804 (patch)
tree18980a7ca91a86f6432dd19e172608ed7c12e8f1 /loader2
parent1b2f9fe18937b9f187b7fd77a50c2c7d0f369654 (diff)
downloadanaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.tar.gz
anaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.tar.xz
anaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.zip
merge from taroon branch. product.img stuff, md can be modular, lots of
little things across the board
Diffstat (limited to 'loader2')
-rw-r--r--loader2/linuxrc.s3904
-rw-r--r--loader2/loader.c7
-rw-r--r--loader2/method.c5
-rw-r--r--loader2/net.c31
-rw-r--r--loader2/nfsinstall.c5
-rw-r--r--loader2/urlinstall.c2
6 files changed, 40 insertions, 14 deletions
diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index 239a58842..3e0b01891 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -91,8 +91,8 @@ mount /dev/root / -o remount,rw
mount -t proc none /proc
mount -t devpts /dev/pts /dev/pts
-# limit output on x3270 console
-echo "1 4 1 1" > /proc/sys/kernel/printk
+# limit output on x3270 console (well, not really -- need debugging now)
+echo "8 4 1 1" > /proc/sys/kernel/printk
# make /tmp/ramfs
mount -t ramfs none /tmp
diff --git a/loader2/loader.c b/loader2/loader.c
index 37931a959..cd569d497 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -840,7 +840,10 @@ static char *doLoaderMain(char * location,
/* fall through to ip config */
case STEP_IP:
- if (!needsNetwork) step = STEP_METHOD; /* only hit going back */
+ if (!needsNetwork) {
+ step = STEP_METHOD; /* only hit going back */
+ break;
+ }
logMessage("going to do getNetConfig");
/* populate netDev based on any kickstart data */
@@ -1206,7 +1209,7 @@ int main(int argc, char ** argv) {
/* look for cards which require the agpgart module */
agpgartInitialize(modLoaded, modDeps, modInfo, flags);
- mlLoadModuleSetLocation("raid0:raid1:raid5:msdos:ext3:reiserfs:jfs:xfs:lvm-mod",
+ mlLoadModuleSetLocation("md:raid0:raid1:raid5:msdos:ext3:reiserfs:jfs:xfs:lvm-mod",
modLoaded, modDeps, modInfo, flags,
secondStageModuleLocation);
diff --git a/loader2/method.c b/loader2/method.c
index 1a8c633af..37b95886c 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -445,7 +445,8 @@ int copyDirectory(char * from, char * to) {
errno = 0;
while ((ent = readdir(dir))) {
- if (ent->d_name[0] == '.') continue;
+ /* we could lose .a this way, but at least, we lose less */
+ if ((ent->d_name[0] == '.') && (strlen(ent->d_name) <= 2)) continue;
sprintf(filespec, "%s/%s", from, ent->d_name);
sprintf(filespec2, "%s/%s", to, ent->d_name);
@@ -498,6 +499,7 @@ void copyUpdatesImg(char * path) {
if (!mountLoopback(path, "/tmp/update-disk", "loop7")) {
copyDirectory("/tmp/update-disk", "/tmp/updates");
umountLoopback("/tmp/update-disk", "loop7");
+ unlink("/tmp/update-disk");
}
}
}
@@ -507,6 +509,7 @@ void copyProductImg(char * path) {
if (!mountLoopback(path, "/tmp/product-disk", "loop7")) {
copyDirectory("/tmp/product-disk", "/tmp/product");
umountLoopback("/tmp/product-disk", "loop7");
+ unlink("/tmp/product-disk");
}
}
}
diff --git a/loader2/net.c b/loader2/net.c
index b874204f5..9f6adad2b 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -221,10 +221,15 @@ void setupNetworkDeviceConfig(struct networkDeviceConfig * cfg,
* be broken out into a function too */
logMessage("sending dhcp request through device %s", loaderData->netDev);
- startNewt(flags);
- winStatus(50, 3, _("Dynamic IP"),
- _("Sending request for IP information for %s..."),
- loaderData->netDev, 0);
+ if (!FL_CMDLINE(flags)) {
+ startNewt(flags);
+ winStatus(55, 3, _("Dynamic IP"),
+ _("Sending request for IP information for %s..."),
+ loaderData->netDev, 0);
+ } else {
+ printf(_("Sending request for IP information for %s..."),
+ loaderData->netDev);
+ }
if (!FL_TESTING(flags)) {
waitForLink(loaderData->netDev);
@@ -233,7 +238,9 @@ void setupNetworkDeviceConfig(struct networkDeviceConfig * cfg,
chptr = NULL;
}
- newtPopWindow();
+ if (!FL_CMDLINE(flags))
+ newtPopWindow();
+
if (chptr) {
logMessage("pump told us: %s", chptr);
return;
@@ -468,7 +475,7 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
newCfg.isDynamic = 0;
} else {
if (!FL_TESTING(flags)) {
- winStatus(50, 3, _("Dynamic IP"),
+ winStatus(55, 3, _("Dynamic IP"),
_("Sending request for IP information for %s..."),
device, 0);
waitForLink(device);
@@ -624,10 +631,16 @@ int findHostAndDomain(struct networkDeviceConfig * dev, int flags) {
}
if (!(dev->dev.set & PUMP_NETINFO_HAS_HOSTNAME)) {
- winStatus(40, 3, _("Hostname"),
- _("Determining host name and domain..."));
+ if (!FL_CMDLINE(flags))
+ winStatus(40, 3, _("Hostname"),
+ _("Determining host name and domain..."));
+ else
+ printf(_("Determining host name and domain..."));
+
name = mygethostbyaddr(inet_ntoa(dev->dev.ip));
- newtPopWindow();
+
+ if (!FL_CMDLINE(flags))
+ newtPopWindow();
if (!name) {
logMessage("reverse name lookup failed");
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 1a29a9239..41a26ec5a 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -162,6 +162,11 @@ char * mountNfsImage(struct installMethod * method,
if (rc == -1)
foundinvalid = 1;
} else {
+ /* JKFIXME: hack because /mnt/source is hard-coded
+ * in mountStage2() */
+ copyUpdatesImg("/mnt/source2/RedHat/base/updates.img");
+ copyUpdatesImg("/mnt/source2/RedHat/base/product.img");
+
queryIsoMediaCheck(path, flags);
stage = NFS_STAGE_DONE;
diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c
index e372e3377..0a95782e7 100644
--- a/loader2/urlinstall.c
+++ b/loader2/urlinstall.c
@@ -97,6 +97,7 @@ static int loadUrlImages(struct iurlinfo * ui, int flags) {
copyDirectory("/tmp/update-disk", "/tmp/updates");
umountLoopback("/tmp/update-disk", "loop7");
unlink("/tmp/ramfs/updates-disk.img");
+ unlink("/tmp/update-disk");
}
/* grab the product.img before netstg1.img so that we minimize our
@@ -107,6 +108,7 @@ static int loadUrlImages(struct iurlinfo * ui, int flags) {
copyDirectory("/tmp/product-disk", "/tmp/product");
umountLoopback("/tmp/product-disk", "loop7");
unlink("/tmp/ramfs/product-disk.img");
+ unlink("/tmp/product-disk");
}
/* require 128MB for use of graphical stage 2 due to size of image */