aboutsummaryrefslogtreecommitdiffstats
path: root/packages/openbgpd
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-10-17 03:48:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-10-17 03:48:16 +0000
commita0c80a73d72594c1bde701e1edcc7a78c2b3f0d2 (patch)
treee39e7d37c97e3d19097e658ddc433907c743a7f4 /packages/openbgpd
parent4ac24842a5d7244a12d7fd5dc456af2206696ed4 (diff)
downloadpfsense-packages-a0c80a73d72594c1bde701e1edcc7a78c2b3f0d2.tar.gz
pfsense-packages-a0c80a73d72594c1bde701e1edcc7a78c2b3f0d2.tar.bz2
pfsense-packages-a0c80a73d72594c1bde701e1edcc7a78c2b3f0d2.zip
Show which neighbor is referencing the group.
Diffstat (limited to 'packages/openbgpd')
-rw-r--r--packages/openbgpd/openbgpd.inc5
-rw-r--r--packages/openbgpd/openbgpd_groups.xml4
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/openbgpd/openbgpd.inc b/packages/openbgpd/openbgpd.inc
index aff02c24..4f73ed71 100644
--- a/packages/openbgpd/openbgpd.inc
+++ b/packages/openbgpd/openbgpd.inc
@@ -131,6 +131,7 @@ function openbgpd_install_conf() {
function deinstall_openbgpd() {
exec("rm /usr/local/etc/rc.d/bgpd.sh");
+ exec("rm /usr/local/www/openbgpd_status.php");
exec("killall bgpd");
}
@@ -144,11 +145,11 @@ function check_group_usage($groupname) {
foreach($openbgpd_groups as $group) {
foreach($openbgpd_neighbors as $neighbor) {
if($neighbor['groupname'] == $group['name'])
- return true;
+ return $neighbor['groupname'];
}
}
}
- return false;
+ return "";
}
function grey_out_value_boxes() {
diff --git a/packages/openbgpd/openbgpd_groups.xml b/packages/openbgpd/openbgpd_groups.xml
index 6e80dbfe..01756311 100644
--- a/packages/openbgpd/openbgpd_groups.xml
+++ b/packages/openbgpd/openbgpd_groups.xml
@@ -108,7 +108,7 @@
</custom_php_resync_config_command>
<custom_php_validation_command>
$status = check_group_usage($_POST['groupname']);
- if($status)
- $input_errors[] = "Sorry this group is in use and cannot be deleted.";
+ if($status != "")
+ $input_errors[] = "Sorry this group is in use by {$staus} and cannot be deleted.";
</custom_php_validation_command>
</packagegui>