home *** CD-ROM | disk | FTP | other *** search
- # -*-perl-*-
-
- @text_step = (
- "Partition",
- "Select Swap",
- "Init Swap",
- "Configure Net",
- "Select Media",
-
- "Select FS",
- "Fstab",
- "Select Series",
-
- "Make FS",
-
- "Mount FS",
- "Bootstrap",
- "Install Series",
-
- "Install Kernel",
-
- "Configure Mouse",
- "Configure X",
- "Configure Net",
- "Configure Modem",
- "Configure Clock",
- "Configure Keyboard",
- "Configure LILO",
- "Add Users",
- "Root Password",
- "Finish",
- "All Done",
- "No-op"
- );
-
- @x_step = (
- "Partition",
- "Select Swap",
- "Init Swap",
- "Configure Net",
- "Select Media",
-
- "X Install",
- "All Done",
- "No-op"
- );
-
- sub install_dispatcher {
-
- local ( $step_index, @install_step, $step, $ret );
-
- if ($installtype eq "text") {
- require "textinst";
- require "makefs";
- require "fstab";
- require "bootstrap";
- require "keyboard";
- require "clock";
- require "kernel";
- require "lilo";
- require "modem";
- require "series";
- require "users";
- } else {
- require "xinstall";
- }
-
- if ($installtype eq "text") {
- @install_step = @text_step;
- } else {
- @install_step = @x_step;
- }
-
- $step_index = 0;
-
- while (1) {
- if ($express_install) {
- $r = "Next";
- } else {
- if (! &rhs_menu("Red Hat Install Menu",
- <<EOM
- >
- Please pick an installation step.
- >
- Choosing Next each time will walk you through the installation.
- This is highly recommended unless you know what you are doing.
- >
- EOM
- , 75, 37,
- "Next", "Next step ($install_step[$step_index])",
- "Express", "Continue with Express Install",
- "Skip+Express", "Skip this step and continue Express Install",
- "Skip", "Skip this step and continue in order",
- "Shell", "Start a shell",
- "Reboot", "Reboot the machine",
- "-----------", "--------------------------------------",
- "Select Media", "Find the Red Hat Packages",
- "Unmount RHS", "Unmount the Red Hat CD (or NFS)",
- "Partition", "Partition your hard drives",
- "Select Swap", "Select swap partitions",
- "Init Swap", "Format and activate swap partitions",
- "Swap Off", "Deactivate your swap partitions",
- "Select FS", "Select your Linux partitions",
- "Make FS", "Format your Linux partitions",
- "X Install", "Start X Based Installation",
- "Fstab", "Set up your Linux filesystem",
- "Mount FS", "Mount your Linux filesystem",
- "Unmount FS", "Unmount your Linux filesystem",
- "Conf Net", "Configure networking",
- "Net Up", "Turn networking on",
- "Net Down", "Turn networking off",
- "Bootstrap", "Install the bootstrap system",
- "Select Series", "Select series to install",
- "Install Series", "Install selected series",
- "Configure Modem", "Set up your modem device",
- "Configure Mouse", "Set up your mouse device",
- "Configure Keyboard", "Choose your keyboard map",
- "Configure Clock", "Set up clock and timezone",
- "Configure LILO", "Configure and install LILO",
- "Select X Server", "Select an X server",
- "Configure X", "Configure your X server",
- "Add Users", "Add users (other than root)",
- "Root Password", "Set the root password",
- "Install Kernel", "Install Kernel from Boot Floppy",
- "Finish", "Write config data, etc",
- "All Done", "You are finished")) {
- next;
- }
- $r = $dialog_result;
- }
-
- if ($r eq "Express") {
- $express_install = 1;
- $r = "Next";
- }
-
- if ($r eq "Skip") {
- $step_index++;
- }
-
- if ($r eq "Skip+Express") {
- $step_index++;
- $express_install = 1;
- $r = "Next";
- }
-
- if ($r eq "Next") {
- $step = 1;
- $r = $install_step[$step_index];
- $step_index++;
- } else {
- $step = 0;
- }
-
- if ($r eq "No-op") {
- $express_install = 0;
- $step = 0;
- $step_index--;
- }
-
- if ($r eq "Reboot") {
- return 1;
- } elsif ($r eq "Shell") {
- &do_shell;
- } elsif ($r eq "Select Media") {
- $ret = &select_media;
- } elsif ($r eq "Unmount RHS") {
- $ret = &unmount_rhs;
- } elsif ($r eq "Partition") {
- $ret = &partition_disks
- } elsif ($r eq "Init Swap") {
- $ret = &init_swap;
- } elsif ($r eq "Select Swap") {
- $ret = &select_swap;
- } elsif ($r eq "Swap Off") {
- $ret = &swap_off;
- } elsif ($r eq "Configure LILO") {
- $ret = &install_lilo;
- } elsif ($r eq "Make FS") {
- $ret = &format_disks;
- } elsif ($r eq "Select FS") {
- $ret = &select_format_disks;
- } elsif ($r eq "Erase FS") {
- $ret = &erase_filesystems
- } elsif ($r eq "Mount FS") {
- $ret = &mount_filesystems
- } elsif ($r eq "Unmount FS") {
- $ret = &unmount_filesystems;
- } elsif ($r eq "Fstab") {
- $ret = &init_filesystems;
- } elsif ($r eq "X Install") {
- # The X install can drop out to a text based install
- $ret = &xinstall;
- if (! $ret) {
- $ret = 1;
- # This should be the Select FS step
- $step_index = 5;
- @install_step = @text_step;
- $installtype = "text";
-
- # Make sure we have everything
- require "textinst";
- require "makefs";
- require "fstab";
- require "bootstrap";
- require "keyboard";
- require "clock";
- require "kernel";
- require "lilo";
- require "modem";
- require "series";
- require "users";
- }
- } elsif ($r eq "Bootstrap") {
- $ret = &install_bootstrap;
- } elsif ($r eq "Select Series") {
- $ret = &series_select;
- } elsif ($r eq "Install Series") {
- $ret = &series_install;
- } elsif ($r eq "Install Kernel") {
- $ret = &install_kernel;
- } elsif ($r eq "Conf Net") {
- $ret = &config_net;
- } elsif ($r eq "Configure Net") {
- $ret = &configure_network;
- } elsif ($r eq "Configure Modem") {
- $ret = &configure_modem;
- } elsif ($r eq "Configure Mouse") {
- $ret = &configure_mouse;
- } elsif ($r eq "Configure Keyboard") {
- $ret = &configure_keyboard;
- } elsif ($r eq "Configure Clock") {
- $ret = &configure_clock;
- } elsif ($r eq "Add Users") {
- $ret = &add_users;
- } elsif ($r eq "Root Password") {
- $ret = &root_password;
- } elsif ($r eq "Select X Server") {
- $ret = &select_x_server;
- } elsif ($r eq "Install X Server") {
- $ret = &install_x;
- } elsif ($r eq "Configure X") {
- $ret = &config_x;
- } elsif ($r eq "Net Up") {
- $ret = &bring_net_up;
- } elsif ($r eq "Net Down") {
- $ret = &bring_net_down;
- } elsif ($r eq "Erase") {
- $ret = &erase_filesystems;
- } elsif ($r eq "Hack") {
- $ret = &hack_state;
- } elsif ($r eq "Finish") {
- $ret = &finish;
- } elsif ($r eq "All Done") {
- $ret = &all_done;
- if ($ret) {
- return 1;
- }
- $express_install = 0;
- } elsif ($r eq "No-op") {
- $ret = 1;
- }
-
- if ($step) {
- if (! $ret) {
- # stop express install
- if ($express_install) {
- $express_install = 0;
- &rhs_msgbox("Error",
- <<EOM
- >
- Some sort of error occured, so we have dropped you
- out of the Express Install. You can rejoin the
- Express Install by selecting Express from the menu.
- >
- EOM
- , 65);
- }
- $step_index--;
- }
- }
- }
- }
-
- sub do_shell {
- &rhs_msgbox("Shell",
- <<EOM
- >
- There is a shell running on VC2. Press Alt-F2 to
- switch to VC2. You can press Alt-F1 to get back to
- the install program.
- >
- EOM
- , 65);
- }
-
- sub all_done {
- return &rhs_yesno("Installation Completed",
- <<EOM
- >
- Your installation is finished.
- >
- You may reboot now, or select reboot from the main menu.
- >
- Reboot now?
- >
- EOM
- , 65);
- }
-
- ##
- 1;
-