summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/stage1.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-14 23:47:36 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-14 23:47:36 +0000
commit752c59eb0ab37ca75bb410052aaf40514818cd54 (patch)
treef083ed8b39dedee72a7eadaa4f7631f6b11fc0e7 /mdk-stage1/stage1.c
parent4cfd9a056d6e652efb751a6a2ea56c700886ce51 (diff)
downloaddrakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar
drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.gz
drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.bz2
drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.xz
drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.zip
- do progressbar since it seems nobody can live without it
- write real separation between cdrom, disk, and network code; have multiple targets for that issue - begin network code: network interface is up and runing (static IP only), network is configured
Diffstat (limited to 'mdk-stage1/stage1.c')
-rw-r--r--mdk-stage1/stage1.c37
1 files changed, 33 insertions, 4 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index b99435c59..db75719e8 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -39,9 +39,18 @@
#include "frontend.h"
#include "modules.h"
#include "tools.h"
+
+#ifndef DISABLE_CDROM
#include "cdrom.h"
+#endif
+
+#ifndef DISABLE_NETWORK
#include "network.h"
+#endif
+
+#ifndef DISABLE_DISK
#include "disk.h"
+#endif
/* globals */
@@ -98,11 +107,17 @@ void spawn_shell(void)
enum return_type method_select_and_prepare(void)
{
+#ifndef DISABLE_DISK
char * disk_install = "Hard disk";
+#endif
+#ifndef DISABLE_CDROM
char * cdrom_install = "CDROM drive";
+#endif
+#ifndef DISABLE_NETWORK
char * network_nfs_install = "NFS server";
char * network_ftp_install = "FTP server";
char * network_http_install = "HTTP server";
+#endif
enum return_type results;
char * choice;
char * means[10];
@@ -127,16 +142,28 @@ enum return_type method_select_and_prepare(void)
if (results != RETURN_OK)
return results;
+ results = RETURN_ERROR;
+
+#ifndef DISABLE_CDROM
if (!strcmp(choice, cdrom_install))
results = cdrom_prepare();
- else if (!strcmp(choice, disk_install))
+#endif
+
+#ifndef DISABLE_DISK
+ if (!strcmp(choice, disk_install))
results = disk_prepare();
- else if (!strcmp(choice, network_nfs_install))
+#endif
+
+#ifndef DISABLE_NETWORK
+ if (!strcmp(choice, network_nfs_install))
results = nfs_prepare();
- else if (!strcmp(choice, network_ftp_install))
+
+ if (!strcmp(choice, network_ftp_install))
results = ftp_prepare();
- else if (!strcmp(choice, network_http_install))
+
+ if (!strcmp(choice, network_http_install))
results = http_prepare();
+#endif
if (results != RETURN_OK)
method_select_and_prepare();
@@ -162,6 +189,7 @@ int main(int argc, char **argv)
fatal_error("could not open and parse modules dependencies");
init_frontend();
+#ifndef DISABLE_CDROM
if (IS_CDROM) {
/* try as automatic as possible with cdrom bootdisk */
ret = cdrom_prepare();
@@ -169,6 +197,7 @@ int main(int argc, char **argv)
ret = method_select_and_prepare();
}
else
+#endif
ret = method_select_and_prepare();
finish_frontend();