home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0.bin
/
images
/
ramdisk2-beta.img
/
usr
/
lib
/
perl
/
install
< prev
next >
Wrap
Text File
|
1995-12-04
|
4KB
|
177 lines
#!/usr/bin/perl
# dialog requires a shell, unfortunately. But I guess we
# wanted to have a shell anyway.
# Copyright (C) 1995 Red Hat Software, Inc.
require "dialog";
require "mount_rh";
require "probe_cd";
require "misc";
require "net";
require "nfs_mount";
require "xinst";
require "pcmcia";
require "fdisk";
require "swap";
require "mouse";
require "dispatch";
require "xinstall";
require "media";
require "bootdisk";
require "arch";
require "getopts";
# ***
$rh_testing = 0;
# ***
$express_install = 1;
$fsmount = "/mnt";
#$rh_mounted = 1;
#$rh_available = 1;
#$rh_mountpath = "/mnt/rhscd";
$* = 1;
# The boot disk is on /bootdisk
# The 2nd rootdisk is on /ramdisk
# The CD instimage (if there is one) goes on /image
$ENV{'PATH'} = "/bin:/usr/bin:/usr/bin/X11:/usr/X11/bin:/sbin:/usr/sbin";
$ENV{'PATH'} .= ":/mnt/bin:/mnt/usr/bin:/mnt/sbin:/mnt/usr/sbin";
# Set $scr_lines here if we need to
# This is used by the perl interface to dialog
$scr_lines = 24;
@rest = &Getopts("pck:");
$opt_p && ($mediamounted = 1);
$opt_k && ($kernelfile = $opt_k);
$opt_c && ($cdboot = 1);
open(CPUINFO, "/proc/cpuinfo");
&rhs_msgbox ( "Red Hat Linux",
<<EOM
Welcome to Red Hat Linux for $instarch processors!
>
Red Hat Software has worked very hard to bring you the highest
quality Linux system and the easiest and most
flexible installation procedure.
>
If you managed to get this far with all your hardware
detected, the hard part is done!
>
This script will walk you through each step
of the installation.
>
PLEASE BE SURE YOU HAVE READ AND UNDERSTOOD THE INSTALLATION
GUIDE IN THE MANUAL BEFORE YOU PROCEED. It is probably a good
idea to have the manual available for reference too.
>
Copyright (C) 1995 Red Hat Software, Inc.
EOM
, 74);
&mount_bootdisk();
if ($instarch eq "i386" && (! $rh_testing)) {
$ret = &pcmcia_init;
}
#$express_install = &rhs_yesno("Red Hat Linux",
#<<EOM
#>
#The Express Install provides the simplest installation by
#taking you through each installation step in order.
#>
#Do you want to do an Express Install?
#>
#EOM
#, 70);
$express_install = 1;
$installsource = "";
$installtype = "";
if ($instarch eq "i386") {
@installtypes = ("cdrom", "Red Hat CDROM", "nfs", "NFS server",
"hard drive", "local hard drive", "ftp", "FTP server",
"floppy", "floppy disks");
$enablegraphical = 1;
} else {
@installtypes = ("cdrom", "Red Hat CDROM", "nfs", "NFS server",
"hard drive", "local hard drive" );
$enablegraphical = 0;
}
if ($mediamounted) {
$installsource = "hard drive"; # close enough
$installtype = "text";
} else {
while ($installtype eq "") {
if (&rhs_menu("Installation Type",
<<EOM
>
Red Hat supports a number of different sources for installation. You
may use NFS, a cdrom, ftp, floppy disks, a hard drive partition.
>
Which do you prefer?
>
EOM
, 70, (($#installtypes + 1) / 2), @installtypes,
)) {
$installsource = $dialog_result;
if (($installsource eq "cdrom" || $installsource eq "nfs")
&& $enable_graphical) {
# Find out if they want to do a X based install or a text mode one
if (&rhs_menu("Installation Type",
<<EOM
>
Red Hat supports two types of CD (or NFS) based installation interfaces. One
is a X based graphical interface which is more powerful
and much easier to use. However, some people have difficulty
getting X set up, so we provide a simpler text only installation
procedure as an alternative.
>
Which would you prefer?
>
EOM
, 70, 2,
"X", "Graphical Installation",
"text", "Text based install"
)) {
$installtype = $dialog_result;
} else {
$installsource = "";
}
} else {
$installtype = "text";
}
}
}
}
&install_dispatcher;
if (! $rh_testing) {
&umount_bootdisk();
&rhs_msgbox ( "Installation Complete",
<<EOM
>
When you hit enter your computer will be rebooted.
>
Be sure to remove the boot floppy from your floppy drive!
>
EOM
, 70);
}
exit 0;