# Mounts RHS stuff, either from CD or over NFS -*-perl-*- # Entry point: mount_rhs() # unmounts rhs stuff if it is mounted (ask first) # ask NFS or CD # NFS: if net not configed, config it # ask for details and try mount # CD: probe # if fails, try again ## ## Variables ## # $rh_mountpath is point at which to mount the device # $rpppath is the path from $rh_mountpath to the rpp directory, # which is used to verify that this is indeed RHS stuff $rh_mountpath = "/image"; $rpppath = "rpps"; $rh_mountdevice = ""; $rh_mountdevicetype = ""; ## ## Functions ## sub unmount_rhs { if (! $rh_mounted) { &rhs_msgbox("Error", < The Red Hat stuff does not appear to be mounted. > EOM , 60); return 1; } if (&__umount_rhs != 0) { &rhs_msgbox("Error", < There was an error unmounting the Red Hat stuff. Perhaps it was not really mounted. > EOM , 60); return 0; } if (! $express_install) { &rhs_msgbox("Success", < Red Hat stuff unmounted successfully. > EOM , 60); } return 1; } sub verify_rhs_files { return -d "$rh_mountpath/RedHat"; } sub finish_cd { mkdir("/mnt/mnt/cdrom", 0755); if ($cddev) { open(FD, ">>$fsmount/etc/fstab"); printf(FD "%-20s%-20s%-10s%-10s 0 0\n", "/dev/cdrom", "/mnt/cdrom", "iso9660", "ro,noauto"); close FD; symlink($cddev, "$fsmount/dev/cdrom"); } return 1; } ############ 1;