diff options
author | Daniel Stefan Haischt <dsh@pfsense.org> | 2007-01-13 19:51:19 +0000 |
---|---|---|
committer | Daniel Stefan Haischt <dsh@pfsense.org> | 2007-01-13 19:51:19 +0000 |
commit | 905433ece0c6e7a206cc924a6c79e12c7a57dd58 (patch) | |
tree | b27b319987d6bd10a84228bc0a7eaa72b0ad4767 /packages | |
parent | 713c7d272d78084479b3cfe5a69f773804b39991 (diff) | |
download | pfsense-packages-905433ece0c6e7a206cc924a6c79e12c7a57dd58.tar.gz pfsense-packages-905433ece0c6e7a206cc924a6c79e12c7a57dd58.tar.bz2 pfsense-packages-905433ece0c6e7a206cc924a6c79e12c7a57dd58.zip |
* fix: *_tools.php pages
Diffstat (limited to 'packages')
-rw-r--r-- | packages/freenas/pkg/freenas_disks.inc | 2 | ||||
-rw-r--r-- | packages/freenas/www/disks_manage_tools.php | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/packages/freenas/pkg/freenas_disks.inc b/packages/freenas/pkg/freenas_disks.inc index 16f5a12f..0946164f 100644 --- a/packages/freenas/pkg/freenas_disks.inc +++ b/packages/freenas/pkg/freenas_disks.inc @@ -193,7 +193,7 @@ function disks_umount($mount) { /* The $mount variable is the all config table for the mount point*/ $mountname=escapeshellcmd($mount['sharename']); - if (mwexec("/sbin/umount $mountname") == 0) { + if (mwexec("/sbin/umount /mnt/$mountname") == 0) { if (@rmdir ("/mnt/$mountname")) { return 0; } else { diff --git a/packages/freenas/www/disks_manage_tools.php b/packages/freenas/www/disks_manage_tools.php index 0f5b1027..d851f65c 100644 --- a/packages/freenas/www/disks_manage_tools.php +++ b/packages/freenas/www/disks_manage_tools.php @@ -145,7 +145,7 @@ if (!is_array($freenas_config['gconcat']['vdisk'])) gconcat_sort(); if (!is_array($freenas_config['gstripe']['vdisk'])) - $config['gstripe']['vdisk'] = array(); + $freenas_config['gstripe']['vdisk'] = array(); gstripe_sort(); @@ -181,7 +181,7 @@ if ($_POST) { $do_action = true; $disk = $_POST['disk']; $action = $_POST['action']; - $partition = $_POST['partition']; + $partition = $_POST['partitionno']; $umount = $_POST['umount']; echo create_cmd_output($action, $a_disk, $disk, $partition, $umount); @@ -214,20 +214,22 @@ echo $pfSenseHead->getHTML(); function disk_change() { var next = null; // Remove all entries from partition combobox. - document.iform.partition.length = 0; + document.iform.partitionno.length = 0; // Insert entries for partition combobox. + alert(document.iform.disk.value); switch(document.iform.disk.value) { <?php foreach ($a_disk as $diskv): ?> <?php if (strcmp($diskv['fstype'],"softraid")==0): ?> <?php continue; ?> <?php endif; ?> - case "<?=$diskv['name'];?>": + case "/dev/<?=$diskv['name'];?>": <?php $partinfo = disks_get_partition_info($diskv['name']);?> <?php foreach($partinfo as $partinfon => $partinfov): ?> if(document.all) // MS IE workaround. - next = document.iform.partition.length; - document.iform.partition.add(new Option("<?=$partinfon;?>","s<?=$partinfon;?>",false,<?php if("s{$partinfon}"==$partition){echo "true";}else{echo "false";};?>), next); + next = document.iform.partitionno.length; + alert(document.iform.partitionno); + document.iform.partitionno.add(new Option("<?=$partinfon;?>","s<?=$partinfon;?>",false,<?php if("s{$partinfon}"==$partition){echo "true";}else{echo "false";};?>), next); <?php endforeach; ?> break; <?php endforeach; ?> @@ -264,7 +266,7 @@ function disk_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Disk");?></td> <td width="78%" class="vtable"> - <select name="disk" class="formselect" id="disk" onchange="disk_change()"> + <select name="disk" class="formselect" id="disk" onchange="disk_change();"> <?php foreach ($a_disk as $diskn): ?> <?php if (strcmp($diskn['fstype'],"softraid")==0): ?> <?php continue; ?> @@ -279,7 +281,7 @@ function disk_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Partition");?></td> <td width="78%" class="vtable"> - <select name="partition" class="formselect" id="partition"></select> + <select name="partitionno" class="formselect" id="partitionno"></select> </td> </tr> <tr> |