diff options
author | Daniel Stefan Haischt <dsh@pfsense.org> | 2006-08-17 12:11:55 +0000 |
---|---|---|
committer | Daniel Stefan Haischt <dsh@pfsense.org> | 2006-08-17 12:11:55 +0000 |
commit | 3cc4e9b45f49fb0b1ea9e65c6910adb4a5297423 (patch) | |
tree | 1c442772dd99ca17ef6dd5b92c2738833d65d42b | |
parent | f183c1cad7971ca5e8a0ca84027d018b34de190a (diff) | |
download | pfsense-packages-3cc4e9b45f49fb0b1ea9e65c6910adb4a5297423.tar.gz pfsense-packages-3cc4e9b45f49fb0b1ea9e65c6910adb4a5297423.tar.bz2 pfsense-packages-3cc4e9b45f49fb0b1ea9e65c6910adb4a5297423.zip |
bugfixing
-rw-r--r-- | packages/freenas/bin/rpc.lockd | bin | 0 -> 39404 bytes | |||
-rw-r--r-- | packages/freenas/bin/rpc.statd | bin | 0 -> 11724 bytes | |||
-rw-r--r-- | packages/freenas/pkg/freenas.inc | 4 | ||||
-rw-r--r-- | packages/freenas/pkg/freenas.xml | 10 | ||||
-rw-r--r-- | packages/freenas/pkg/freenas_services.inc | 4 | ||||
-rw-r--r-- | packages/freenas/pkg/freenas_utils.inc | 13 | ||||
-rw-r--r-- | packages/freenas/www/disks_manage_init.php | 180 | ||||
-rw-r--r-- | packages/freenas/www/disks_mount.php | 23 |
8 files changed, 126 insertions, 108 deletions
diff --git a/packages/freenas/bin/rpc.lockd b/packages/freenas/bin/rpc.lockd Binary files differnew file mode 100644 index 00000000..906a8641 --- /dev/null +++ b/packages/freenas/bin/rpc.lockd diff --git a/packages/freenas/bin/rpc.statd b/packages/freenas/bin/rpc.statd Binary files differnew file mode 100644 index 00000000..c630a05a --- /dev/null +++ b/packages/freenas/bin/rpc.statd diff --git a/packages/freenas/pkg/freenas.inc b/packages/freenas/pkg/freenas.inc index 692a526b..bb0685df 100644 --- a/packages/freenas/pkg/freenas.inc +++ b/packages/freenas/pkg/freenas.inc @@ -165,6 +165,10 @@ function oninstall_copy_misc_binaries($action = "install") { "target" => "/usr/sbin/mountd"); $binaries[] = array("source" => "/usr/local/pkg/rpcbind", "target" => "/usr/sbin/rpcbind"); + $binaries[] = array("source" => "/usr/local/pkg/rpc.lockd", + "target" => "/usr/sbin/rpc.lockd"); + $binaries[] = array("source" => "/usr/local/pkg/rpc.lockd", + "target" => "/usr/sbin/rpc.lockd"); if ($action == "install") { while (list(, $val) = each($binaries)) { diff --git a/packages/freenas/pkg/freenas.xml b/packages/freenas/pkg/freenas.xml index 1d398eb9..b18d10ff 100644 --- a/packages/freenas/pkg/freenas.xml +++ b/packages/freenas/pkg/freenas.xml @@ -385,6 +385,16 @@ <chmod>0755</chmod> <item>http://www.pfsense.com/packages/config/freenas/bin/rpcbind</item> </additional_files_needed> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> + <chmod>0755</chmod> + <item>http://www.pfsense.com/packages/config/freenas/bin/rpc.lockd</item> + </additional_files_needed> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> + <chmod>0755</chmod> + <item>http://www.pfsense.com/packages/config/freenas/bin/rpc.statd</item> + </additional_files_needed> <!-- fields gets invoked when the user adds or edits a item. The following items will be parsed and rendered for the user as a gui with input, and selectboxes. diff --git a/packages/freenas/pkg/freenas_services.inc b/packages/freenas/pkg/freenas_services.inc index 26455f8f..840a03c5 100644 --- a/packages/freenas/pkg/freenas_services.inc +++ b/packages/freenas/pkg/freenas_services.inc @@ -397,8 +397,8 @@ function services_nfs_configure() { list($network,$subnet) = explode('/', $freenas_config['nfs']['nfsnetwork']); - $subnet=gen_subnet_mask($subnet); - + $subnet = gen_subnet_mask($subnet); + $a_mount = &$freenas_config['mounts']['mount']; foreach ($a_mount as $mount) diff --git a/packages/freenas/pkg/freenas_utils.inc b/packages/freenas/pkg/freenas_utils.inc index 12c71a12..d3b1379c 100644 --- a/packages/freenas/pkg/freenas_utils.inc +++ b/packages/freenas/pkg/freenas_utils.inc @@ -183,7 +183,7 @@ function get_gmirror_disks_list() // [desc] => COMPLETE // [size] => 6149M // ) - + /* Display all configured gmirror volume*/ exec("/sbin/gmirror list",$rawdata); @@ -220,7 +220,7 @@ function get_gmirror_disks_list() $founddesc=1; continue ; } - + // Third Step: Getting the array Size // look for this output: // Name: mirror/pouet @@ -368,7 +368,7 @@ function get_scsi_disks_list() preg_match("/.*\<([^>]*)>.*/",$line,$match); $disklist[$diskname]['desc'] = $match[1]; - + /* Looking for the disk size */ foreach ($rawdmesg as $dmesgline) { /* Separe la ligne par les espace */ @@ -627,7 +627,7 @@ function freenas_install($src,$dst) while(list(,$val) = each($tableau)) { // Si la ligne contient le mot "unused" - + if (ereg ("unused",$val)) { // On remplace c: par a: @@ -672,4 +672,9 @@ function freenas_install($src,$dst) passthru("/bin/rm -rf /mnt/dst"); } + +/* Force kill a process by name */ +function forcekillbyname($procname) { + return mwexec("/usr/bin/killall -9 " . escapeshellarg($procname)); +} ?>
\ No newline at end of file diff --git a/packages/freenas/www/disks_manage_init.php b/packages/freenas/www/disks_manage_init.php index be7ec5f8..3e772de3 100644 --- a/packages/freenas/www/disks_manage_init.php +++ b/packages/freenas/www/disks_manage_init.php @@ -174,100 +174,100 @@ echo $pfSenseHead->getHTML(); <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Format disk!");?>" /> + <input id="submitt" name="Submitt" type="submit" class="formbtn" value="<?=gettext("Format disk!");?>" /> </td> </tr> <tr> <td valign="top" colspan="2"> - <? if ($do_format) - { - echo(_DISKSMANAGEINITPHP_INITTEXT); - echo('<pre>'); - ob_end_flush(); - - /* Erase MBR if not checked*/ - - if (!$notinitmbr) { - echo "Erasing MBR\n"; - system("dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . " bs=32k count=640"); - - } - else - echo "Keeping the MBR\n"; - - switch ($type) - { - case "ufs": - /* Initialize disk */ - system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); - echo "\"fdisk: Geom not found\"is not an error message!\n"; - /* Initialise the partition (optional) */ - system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); - /* Create s1 label */ - system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); - // Create filesystem - system("/sbin/newfs -U /dev/" . escapeshellarg($disk) . "s1"); - break; - case "ufs_no_su": - /* Initialize disk */ - system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); - /* Initialise the partition (optional) */ - system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); - /* Create s1 label */ - system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); - // Create filesystem - system("/sbin/newfs -m 0 /dev/" . escapeshellarg($disk) . "s1"); - break; - case "ufsgpt": - /* Create GPT partition table */ - system("/sbin/gpt destroy " . escapeshellarg($disk)); - system("/sbin/gpt create -f " . escapeshellarg($disk)); - system("/sbin/gpt add -t ufs " . escapeshellarg($disk)); - // Create filesystem - system("/sbin/newfs -U /dev/" . escapeshellarg($disk) . "p1"); - break; - case "ufsgpt_no_su": - /* Create GPT partition table */ - system("/sbin/gpt destroy " . escapeshellarg($disk)); - system("/sbin/gpt create -f " . escapeshellarg($disk)); - system("/sbin/gpt add -t ufs " . escapeshellarg($disk)); - // Create filesystem - system("/sbin/newfs -m 0 /dev/" . escapeshellarg($disk) . "p1"); - break; - case "gmirror": - /* Initialize disk */ - system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); - /* Initialise the partition (optional) */ - system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); - /* Create s1 label */ - //system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); - /* Delete old gmirror information */ - system("/sbin/gmirror clear /dev/" . escapeshellarg($disk)); - break; - case "raid": - /* Initialize disk */ - system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); - echo "\"fdisk: Geom not found\"is not an error message!\n"; - /* Initialise the partition (optional) */ - system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); - /* Create s1 label */ - system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); - break; - case "msdos": - /* Initialize disk */ - system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); - echo "\"fdisk: Geom not found\"is not an error message!\n"; - /* Initialise the partition (optional) */ - system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); - /* Create s1 label */ - system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); - // Create filesystem - system("/sbin/newfs_msdos -F 32 /dev/" . escapeshellarg($disk) . "s1"); - break; - } - - echo('</pre>'); - } + <? + if ($do_format) { + echo "<strong>Disk initialization details:</strong>"; + echo('<pre style="font-size: small; border: solid 1px silver; padding: 4px;">'); + ob_end_flush(); + + /* Erase MBR if not checked*/ + + if (!$notinitmbr) { + echo "Erasing MBR\n"; + system("dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . " bs=32k count=640"); + + } + else + echo "Keeping the MBR\n"; + + switch ($type) + { + case "ufs": + /* Initialize disk */ + system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); + echo "\"fdisk: Geom not found\" is not an error message!\n"; + /* Initialise the partition (optional) */ + system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); + /* Create s1 label */ + system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); + // Create filesystem + system("/sbin/newfs -U /dev/" . escapeshellarg($disk) . "s1"); + break; + case "ufs_no_su": + /* Initialize disk */ + system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); + /* Initialise the partition (optional) */ + system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); + /* Create s1 label */ + system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); + // Create filesystem + system("/sbin/newfs -m 0 /dev/" . escapeshellarg($disk) . "s1"); + break; + case "ufsgpt": + /* Create GPT partition table */ + system("/sbin/gpt destroy " . escapeshellarg($disk)); + system("/sbin/gpt create -f " . escapeshellarg($disk)); + system("/sbin/gpt add -t ufs " . escapeshellarg($disk)); + // Create filesystem + system("/sbin/newfs -U /dev/" . escapeshellarg($disk) . "p1"); + break; + case "ufsgpt_no_su": + /* Create GPT partition table */ + system("/sbin/gpt destroy " . escapeshellarg($disk)); + system("/sbin/gpt create -f " . escapeshellarg($disk)); + system("/sbin/gpt add -t ufs " . escapeshellarg($disk)); + // Create filesystem + system("/sbin/newfs -m 0 /dev/" . escapeshellarg($disk) . "p1"); + break; + case "gmirror": + /* Initialize disk */ + system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); + /* Initialise the partition (optional) */ + system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); + /* Create s1 label */ + //system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); + /* Delete old gmirror information */ + system("/sbin/gmirror clear /dev/" . escapeshellarg($disk)); + break; + case "raid": + /* Initialize disk */ + system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); + echo "\"fdisk: Geom not found\"is not an error message!\n"; + /* Initialise the partition (optional) */ + system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); + /* Create s1 label */ + system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); + break; + case "msdos": + /* Initialize disk */ + system("/sbin/fdisk -I -b /boot/mbr " . escapeshellarg($disk)); + echo "\"fdisk: Geom not found\"is not an error message!\n"; + /* Initialise the partition (optional) */ + system("/bin/dd if=/dev/zero of=/dev/" . escapeshellarg($disk) . "s1 bs=32k count=16"); + /* Create s1 label */ + system("/sbin/bsdlabel -w " . escapeshellarg($disk) . "s1 auto"); + // Create filesystem + system("/sbin/newfs_msdos -F 32 /dev/" . escapeshellarg($disk) . "s1"); + break; + } + + echo('</pre>'); + } ?> </td> </tr> diff --git a/packages/freenas/www/disks_mount.php b/packages/freenas/www/disks_mount.php index c2cf2ea4..2a68a509 100644 --- a/packages/freenas/www/disks_mount.php +++ b/packages/freenas/www/disks_mount.php @@ -122,7 +122,7 @@ echo $pfSenseHead->getHTML(); <?php if ($savemsg) print_info_box($savemsg); ?> <form id="iform" name="iform" action="disks_mount.php" method="post"> -<?php if (file_exists($d_diskdirty_path)): ?> +<?php if (file_exists($d_mountdirty_path)): ?> <?php print_info_box_np(gettext("The mount point list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));?> <?php endif; ?> @@ -155,18 +155,17 @@ echo $pfSenseHead->getHTML(); <?=htmlspecialchars($mount['desc']);?> </td> </td> - <td valign="middle" class="listbg"> + <td valign="middle" class="listbg" style="color: #FFFFFF;"> <?php - if (file_exists($d_mountdirty_path)) - $stat=_CONFIGURING; - else { - $stat=disks_mount_status($mount); + if (file_exists($d_mountdirty_path)) { + $stat = gettext("configuring"); + } else { + $stat = disks_mount_status($mount); if ($stat == "ERROR") - echo "ERROR - <a href=\"disks_mount.php?act=ret&id=$i\">retry</a>"; - else - echo $stat; - } - ?> + $stat = "ERROR - <a href=\"disks_mount.php?act=ret&id=$i\">retry</a>"; + } + echo $stat; + ?> </td> <td valign="middle" class="list"> <a href="disks_mount_edit.php?id=<?=$i;?>"> @@ -197,7 +196,7 @@ echo $pfSenseHead->getHTML(); </span> <br /> <span class="vexpl"> - <a href="disk_manage.php">previously configured disk</a> + <a href="disks_manage.php">previously configured disk</a> </span> </td> </tr> |