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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-10-2011, 01:21 PM
Radek Vykydal
 
Default Always activate first kickstart network device (#668395)

No matter whether it has new --activate flag set.
To follow rhel 5 behaviour.
---
loader/kickstart.c | 16 ++++++++++++++++
loader/kickstart.h | 1 +
loader/loader.c | 1 +
3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/loader/kickstart.c b/loader/kickstart.c
index 37125ce..b418d74 100644
--- a/loader/kickstart.c
+++ b/loader/kickstart.c
@@ -543,6 +543,22 @@ static void setMediaCheck(struct loaderData_s * loaderData, int argc,
return;
}

+void addActivateToFirstKsNetworkCommand() {
+ int i = 0;
+
+ for (i = 0; i < numCommands; i++) {
+ if (commands[i].code == KS_CMD_NETWORK) {
+ logMessage(INFO, "adding --activate to first kickstart network command");
+ commands[i].argc++;
+ commands[i].argv = g_realloc(commands[i].argv,
+ sizeof(gchar *) * (commands[i].argc + 1));
+ commands[i].argv[commands[i].argc -1] = "--activate";
+ commands[i].argv[commands[i].argc] = NULL;
+ break;
+ }
+ }
+}
+
void runKickstart(struct loaderData_s * loaderData) {
struct ksCommandNames * cmd;
int argc;
diff --git a/loader/kickstart.h b/loader/kickstart.h
index 574026b..2a3b334 100644
--- a/loader/kickstart.h
+++ b/loader/kickstart.h
@@ -50,5 +50,6 @@ int isKickstartFileRemote(char *ksFile);
void getKickstartFile(struct loaderData_s * loaderData);
void runKickstart(struct loaderData_s * loaderData);
int getKickstartFromBlockDevice(char *device, char *path);
+void addActivateToFirstKsNetworkCommand();

#endif
diff --git a/loader/loader.c b/loader/loader.c
index 7d7863b..2b1e6cd 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2194,6 +2194,7 @@ int main(int argc, char ** argv) {
getKickstartFile(&loaderData);
if (FL_KICKSTART(flags) &&
(ksReadCommands((ksFile)?ksFile:loaderData.ksFile) !=LOADER_ERROR)) {
+ addActivateToFirstKsNetworkCommand();
runKickstart(&loaderData);
}
}
--
1.7.2

_______________________________________________
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 09:20 AM.

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