## -*-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", < 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", < Setting up initial filesystem structure. > EOM , 70); if ($installtype eq "FTP") { if (! $ftp_configured) { $ret = 1; &rhs_msgbox("FTP Failed", < 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", < FTP failed! > Error returned: $ftp_error > EOM , 60); } } } 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", < 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", < The bootstrap installation is complete. > EOM , 70); } return 1; } ####################### 1;