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 / bootdisk < prev    next >
Text File  |  1995-12-04  |  1KB  |  62 lines

  1. $bootdisk_mounted = 0;
  2.  
  3. sub mount_bootdisk {
  4.     local ($kernelname);
  5.    
  6.     if ($cdboot) { return; }
  7.     if ($bootdisk_mounted) { return; }
  8.  
  9.     if ($instarch eq "i386") {
  10.     $kernelname = "vmlinuz";
  11.     } else {
  12.     $kernelname = "vmlinux.gz";
  13.     }
  14.  
  15.     &rhs_msgbox ( "Boot Floppy",
  16.     ">\n" .
  17.     "Now please remove the floppy from your first drive and insert the\n" .
  18.         "boot floppy.  During the installation, the kernel will be\n" .
  19.     "copied from the boot floppy to your hard drive.\n" .
  20.     ">\n" .
  21.     "Please insert your BOOT disk (not the ROOT disk) in /dev/fd0 (DOS drive A:).\n" .
  22.     ">\n", 70);
  23.  
  24.     if ($rh_testing) {
  25.     $bootdisk_mounted = 1;
  26.     return 1;
  27.     }
  28.  
  29.     &invoke("mount -o ro /dev/fd0 /bootdisk");
  30.  
  31.     while (! -f "/bootdisk/$kernelname") {
  32.     &invoke_no_output("umount /bootdisk");
  33.  
  34.     &rhs_msgbox ( "Boot Floppy",
  35. <<EOM
  36. >
  37. That was not the boot floppy disk!
  38. >
  39. Be sure you are inserting the BOOT FLOPPY DISK in
  40. /dev/fd0 (DOS drive A:).
  41. >
  42. EOM
  43.          , 70);
  44.  
  45.     &invoke("mount /dev/fd0 /bootdisk");
  46.     }
  47.  
  48.     $bootdisk_mounted = 1;
  49. }
  50.  
  51. sub umount_bootdisk {
  52.     if ($cdboot) { return; }
  53.  
  54.     if ($bootdisk_mounted) {
  55.     &invoke("umount /bootdisk");
  56.     }
  57.  
  58.     $bootdisk_mounted = 0;
  59. }
  60.  
  61. 1;
  62.