diff options
author | Mike Fulbright <msf@redhat.com> | 2003-03-28 17:41:04 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2003-03-28 17:41:04 +0000 |
commit | b78d67cad7499ab99ae88cc01b22372d175216aa (patch) | |
tree | 53ecdb6fcad92bdd2760d14f337c268b1c2d1461 /loader2 | |
parent | 9bd1f0b69e2e5236fceb8d46163f925976bcbe96 (diff) | |
download | anaconda-b78d67cad7499ab99ae88cc01b22372d175216aa.tar.gz anaconda-b78d67cad7499ab99ae88cc01b22372d175216aa.tar.xz anaconda-b78d67cad7499ab99ae88cc01b22372d175216aa.zip |
add ability to hint we just want to find a cd with stage2, but not necessarily packages as well. Used for CD-assisted takeoff of GUI FTP/HTTP
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/cdinstall.c | 14 | ||||
-rw-r--r-- | loader2/cdinstall.h | 3 |
2 files changed, 11 insertions, 6 deletions
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c index 1db6c2700..274da6560 100644 --- a/loader2/cdinstall.c +++ b/loader2/cdinstall.c @@ -276,6 +276,8 @@ static void queryCDMediaCheck(char *dev, int flags) { * * loaderData is the kickstart info, can be NULL meaning no info * + * requirepkgs=1 means CD should have packages, otherwise we just find stage2 + * * side effect: found cdrom is mounted as /mnt/source. stage2 mounted * as /mnt/runtime. */ @@ -286,7 +288,8 @@ char * setupCdrom(char * location, moduleList modLoaded, moduleDeps modDeps, int flags, - int interactive) { + int interactive, + int requirepkgs) { int i, rc; int foundinvalid = 0; char * buf; @@ -312,7 +315,7 @@ char * setupCdrom(char * location, if (!doPwMount("/tmp/cdrom", "/mnt/source", "iso9660", 1, 0, NULL, NULL, 0)) { if (!access("/mnt/source/RedHat/base/stage2.img", R_OK) && - (FL_RESCUE(flags) || !access("/mnt/source/.discinfo", R_OK))) { + (!requirepkgs || !access("/mnt/source/.discinfo", R_OK))) { rc = mountStage2("/mnt/source/RedHat/base/stage2.img"); /* if we failed, umount /mnt/source and keep going */ if (rc) { @@ -367,8 +370,9 @@ char * findRedHatCD(char * location, moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps, - int flags) { - return setupCdrom(location, kd, NULL, modInfo, modLoaded, modDeps, flags, 0); + int flags, + int requirepkgs) { + return setupCdrom(location, kd, NULL, modInfo, modLoaded, modDeps, flags, 0, requirepkgs); } @@ -380,7 +384,7 @@ char * mountCdromImage(struct installMethod * method, moduleInfoSet modInfo, moduleList modLoaded, moduleDeps * modDepsPtr, int flags) { - return setupCdrom(location, kd, loaderData, modInfo, modLoaded, *modDepsPtr, flags, 1); + return setupCdrom(location, kd, loaderData, modInfo, modLoaded, *modDepsPtr, flags, 1, 1); } void setKickstartCD(struct loaderData_s * loaderData, int argc, diff --git a/loader2/cdinstall.h b/loader2/cdinstall.h index 4bbdd3aaf..51fb4ee03 100644 --- a/loader2/cdinstall.h +++ b/loader2/cdinstall.h @@ -14,7 +14,8 @@ char * findRedHatCD(char * location, moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps, - int flags); + int flags, + int requirepkgs); void setKickstartCD(struct loaderData_s * loaderData, int argc, |