FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 05-25-2010, 02:54 PM
Radek Vykydal
 
Default (take II) Set repository in kickstart harddrive command (#592239)

With the patch, harddrive ks command behaves same as url/nfs commands
wrt base repository setting, the case (2) below is fixed:

The base repo is set this way:

(1) If location ends with .img (e.g --dir=/images/install.img).
we use repos from /etc/anaconda.repos.d (release package)
Boot parameter repo= can be used to specify the repo.

(2) If url/--dir doesn't end with .img (e.g --dir=/) we use it
to set base repo location. Boot parameter repo= is overriden
in this case.

Note: part of the bug is caused by rhel-beta repository being
disabled in snap4's /etc/yum.repos.d/rehl-beta.

---
loader/hdinstall.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index 54a5fd9..154d5bc 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -339,6 +339,8 @@ char * mountHardDrive(struct installMethod * method,
void setKickstartHD(struct loaderData_s * loaderData, int argc,
char ** argv) {
char *p;
+ char *url = NULL;
+ char *substr = NULL;
gchar *biospart = NULL, *partition = NULL, *dir = NULL;
GOptionContext *optCon = g_option_context_new(NULL);
GError *optErr = NULL;
@@ -391,6 +393,15 @@ void setKickstartHD(struct loaderData_s * loaderData, int argc,
if (dir)
((struct hdInstallData *)loaderData->stage2Data)->directory = dir;

+ if (partition && dir) {
+ /* set repo only if location of stage 2 is not specified explicitly in --dir */
+ substr = strstr(dir, ".img");
+ if (!substr || (substr && *(substr+4) != '')) {
+ checked_asprintf(&url, "hd:%s:%s", partition, dir)
+ loaderData->instRepo = url;
+ }
+ }
+
logMessage(INFO, "results of hd ks, partition is %s, dir is %s", partition,
dir);
}
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org