home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0.bin
/
images
/
ramdisk2.img
/
usr
/
lib
/
perl
/
bootstrap
< prev
next >
Wrap
Text File
|
1995-10-02
|
3KB
|
131 lines
## -*-perl-*-
# install the bootstrap system
# Path from $rhspath to the bootstrap tar file
$fsstnd_cpio = "RedHat/base/fsstnd.cgz";
$skel_cpio = "RedHat/base/skeleton.cgz";
$bootstrap_file_count = 143;
sub install_bootstrap {
local ( $ret, $tmp );
if (! $fs_mounted) {
&rhs_msgbox("Error",
<<EOM
>
Your installation filesystem must be mounted
before you can initialize it.
>
EOM
, 60);
return 0;
}
# cd to the installation filesystem
chdir($fsmount);
&rhs_infobox("Filesystem Initialization",
<<EOM
>
Setting up initial filesystem structure.
>
EOM
, 70);
if ($installsource eq "ftp") {
if (! $ftp_configured) {
$ret = 1;
&rhs_msgbox("FTP Failed",
<<EOM
>
FTP is not configured. You will have to configure it before
continuing.
>
EOM
, 60);
} else {
if (&get_ftp_file($fsstnd_cpio, "fsstnd.cpio.gz")) {
open(SAVEERR, ">&STDERR");
open(STDERR, ">/dev/tty3");
$ret = &invoke("gunzip -dc fsstnd.cpio.gz | cpio --extract");
open(STDERR, ">&SAVEERR");
unlink("fsstnd.cpio.gz");
if (&get_ftp_file($skel_cpio, "skel.cpio.gz")) {
open(SAVEERR, ">&STDERR");
open(STDERR, ">/dev/tty3");
$ret += &invoke("gunzip -dc skel.cpio.gz | cpio --extract");
open(STDERR, ">&SAVEERR");
unlink("skel.cpio.gz");
} else {
$ret = 1;
}
} else {
$ret = 1;
}
if ($ret != 0) {
&rhs_msgbox("FTP Failed",
<<EOM
>
FTP failed!
>
Error returned: $ftp_error
>
EOM
, 60);
}
}
} elsif ($installsource eq "floppy") {
mkdir("/mnt/tmp", 0755);
&floppy_copy_file("fsstnd.cgz", "/mnt/tmp", *nogauge);
&floppy_copy_file("skeleton.cgz", "/mnt/tmp", *nogauge);
open(SAVEERR, ">&STDERR");
open(STDERR, ">/dev/tty3");
$ret = &invoke("gunzip -dc /mnt/tmp/fsstnd.cgz | cpio --extract");
$ret += &invoke("gunzip -dc /mnt/tmp/skeleton.cgz | cpio --extract");
open(STDERR, ">&SAVEERR");
unlink("/mnt/tmp/fsstnd.cgz");
unlink("/mnt/tmp/skeleton.cgz");
} else {
open(SAVEERR, ">&STDERR");
open(STDERR, ">/dev/tty3");
$ret = &invoke("gunzip -dc $rh_mountpath/$fsstnd_cpio | cpio --extract");
$ret += &invoke("gunzip -dc $rh_mountpath/$skel_cpio | cpio --extract");
open(STDERR, ">&SAVEERR");
}
chdir("/");
if ($ret != 0) {
&rhs_msgbox("Filesystem Initialization",
<<EOM
>
The initial archive was not extracted properly.
The archive was probably not found, or the filesystem is corrupted.
Make sure the Red Hat CD (or NFS volume) is mounted.
>
EOM
, 60);
return 0;
}
if (! $express_install) {
&rhs_msgbox("Bootstrap Install",
<<EOM
>
The bootstrap installation is complete.
>
EOM
, 70);
}
return 1;
}
#######################
1;