diff --git a/mount/hpux-lib.pl b/mount/hpux-lib.pl
index 842ffe8b4..3cde5522d 100755
--- a/mount/hpux-lib.pl
+++ b/mount/hpux-lib.pl
@@ -432,30 +432,29 @@ elsif ($_[0] eq "swap") {
print "
\n";
print " \n";
}
-elsif ($_[0] eq "cdfs") {
+elsif ($type eq "cdfs") {
# Mounting a SCSI cdrom
- print "
CDROM Disk | \n";
- print "\n";
+ local ($cdfs_dev, $scsi_c, $scsi_t, $scsi_d, $scsi_path);
if ($_[1] =~ /^\/dev\/dsk\/c([0-9]+)t([0-9]+)d([0-9]+)$/) {
$cdfs_dev = 0;
$scsi_c = $1; $scsi_t = $2; $scsi_d = $3;
}
else {
- $cdfs_dev = 1; $scsi_path = $_[1];
+ $cdfs_dev = 1;
+ $scsi_path = $loc;
}
- $scsi_path = $_[1];
- printf " SCSI Device:\n",
- $cdfs_dev == 0 ? "checked" : "";
- print "Controller \n";
- print "Target \n";
- print "Unit \n ";
-
- printf " Other Device:\n",
- $cdfs_dev == 1 ? "checked" : "";
- print "";
- print &file_chooser_button("cdfs_path", 0);
- print " \n";
- print " |
\n";
+ print &ui_table_row($text{'solaris_cdrom'},
+ &ui_radio_table("cdfs_dev", $cdfs_dev,
+ [ [ 0, $text{'freebsd_scsi'},
+ $text{'solaris_ctrlr'}." ".
+ &ui_textbox("cdfs_c", $scsi_c, 4)." ".
+ $text{'solaris_target'}." ".
+ &ui_textbox("cdfs_t", $scsi_t, 4)." ".
+ $text{'solaris_unit'}." ".
+ &ui_textbox("cdfs_d", $scsi_d, 4) ],
+ [ 1, $text{'solaris_otherdev'},
+ &ui_textbox("cdfs_path", $scsi_path, 40)." ".
+ &file_chooser_button("cdfs_path", 0) ] ]));
}
elsif ($type eq "lofs") {
# Mounting some directory to another location
diff --git a/mount/netbsd-lib.pl b/mount/netbsd-lib.pl
index 2c84829ef..55a423cc6 100755
--- a/mount/netbsd-lib.pl
+++ b/mount/netbsd-lib.pl
@@ -279,54 +279,57 @@ return $_[0] eq "nfs";
# Output HTML for editing the mount location of some filesystem.
sub generate_location
{
-if ($_[0] eq "nfs") {
+local ($type, $loc) = @_;
+if ($type eq "nfs") {
# NFS mount from some host and directory
- $_[1] =~ /^([^:]+):(.*)$/;
- print " NFS Hostname | \n";
- print "\n";
- print &nfs_server_chooser_button("nfs_host");
- print " | \n";
- print "NFS Directory | \n";
- print "\n";
- print &nfs_export_chooser_button("nfs_host", "nfs_dir");
- print " |
\n";
+ local ($host, $dir) = $loc =~ /^([^:]+):(.*)$/ ? ( $1, $2 ) : ( );
+ print &ui_table_row(&hlink($text{'linux_nfshost'}, "nfshost"),
+ &ui_textbox("nfs_host", $host, 30).
+ &nfs_server_chooser_button("nfs_host").
+ " ".
+ "".&hlink($text{'linux_nfsdir'}, "nfsdir")." ".
+ &ui_textbox("nfs_dir",
+ ($type eq "nfs4") && ($dir eq "") ? "/" : $dir, 30).
+ &nfs_export_chooser_button("nfs_host", "nfs_dir"));
}
else {
- if ($_[0] eq "swap") {
- # Swap file or device
- printf " Swap File | \n";
- }
- else {
- # Disk-based filesystem
- printf "
%s Disk | \n",
- &fstype_name($_[0]);
- }
- print "\n";
- if ($_[1] =~ /^\/dev\/wd(\d)s(\d)([a-z]*)$/) {
+ local $msg;
+ if ($type eq "swap") {
+ # Swap file or device
+ $msg = $text{'linux_swapfile'};
+ }
+ else {
+ # Disk-based filesystem
+ $msg = &fstype_name($type);
+ }
+ local ($disk_dev, $ide_t, $ide_s, $ide_p, $scsi_t, $scsi_s, $scsi_p);
+ if ($loc =~ /^\/dev\/wd(\d)s(\d)([a-z]*)$/) {
$disk_dev = 0; $ide_t = $1; $ide_s = $2; $ide_p = $3;
}
- elsif ($_[1] =~ /^\/dev\/sd(\d)s(\d)([a-z]*)$/) {
+ elsif ($loc =~ /^\/dev\/sd(\d)s(\d)([a-z]*)$/) {
$disk_dev = 1; $scsi_t = $1; $scsi_s = $2; $scsi_p = $3;
}
else { $disk_dev = 2; }
- printf " IDE Hard Disk:\n",
- $disk_dev == 0 ? "checked" : "";
- print "Device \n";
- print "Slice \n";
- print "Partition \n";
-
- printf " SCSI Disk:\n",
- $disk_dev == 1 ? "checked" : "";
- print "Device \n";
- print "Slice \n";
- print "Partition \n";
-
- printf " Other Device:\n",
- $disk_dev == 2 ? "checked" : "";
- printf " \n",
- $disk_dev == 2 ? $_[1] : "";
- print " |
\n";
+ print &ui_table_row($msg,
+ &ui_radio_table("disk_dev", $disk_dev,
+ [ [ 0, $text{'freebsd_ide'},
+ $text{'freebsd_device'}." ".
+ &ui_textbox("ide_t", $ide_t, 4)." ".
+ $text{'freebsd_slice'}." ".
+ &ui_textbox("ide_s", $ide_s, 4)." ".
+ $text{'freebsd_part'}." ".
+ &ui_textbox("ide_p", $ide_p, 4) ],
+ [ 1, $text{'freebsd_scsi'},
+ $text{'freebsd_device'}." ".
+ &ui_textbox("scsi_t", $scsi_t, 4)." ".
+ $text{'freebsd_slice'}." ".
+ &ui_textbox("scsi_s", $scsi_s, 4)." ".
+ $text{'freebsd_part'}." ".
+ &ui_textbox("scsi_p", $scsi_p, 4) ],
+ [ 2, $text{'freebsd_other'},
+ &ui_textbox("dev_path", $disk_dev == 2 ? $loc : "", 40).
+ " ".&file_chooser_button("dev_path", 0) ] ]));
}
}