diff options
author | Colin Smith <colin@pfsense.org> | 2005-08-03 07:10:27 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-08-03 07:10:27 +0000 |
commit | a31cce4781f8a551cc593a8df77e635d1f59f560 (patch) | |
tree | 61cfd35d996fcf5e70717faed8d4304a34a0d075 | |
parent | b48a7caa225286bee3cc640479607bb9ae06beb9 (diff) | |
download | pfsense-a31cce4781f8a551cc593a8df77e635d1f59f560.zip pfsense-a31cce4781f8a551cc593a8df77e635d1f59f560.tar.gz |
return_filename_as_string -> file_get_contents
-rw-r--r-- | etc/inc/filter.inc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 3aba89d..d748301 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -64,7 +64,10 @@ function filter_configure() { /* reload filter sync */ function filter_configure_sync() { - + /* file an alert that the rules are being reloaded */ + if($g['booting'] == false) + file_notice("Operation in progress...", "The filter rules are currently reloading. You will receive a notice if there is an error."); + if(file_exists("/tmp/filter_dirty")) unlink("/tmp/filter_dirty"); @@ -162,8 +165,8 @@ function filter_configure_sync() { if($files <> "") { foreach ($files as $file) { if($file <> "") { - $text = return_filename_as_string("/usr/local/pkg/pf/" . $file); - if($text <> "") { + $text = file_get_contents("/usr/local/pkg/pf/" . $file); + if($text) { if(stristr($file, ".sh") == true) { mwexec("/usr/local/pkg/pf/" . $file . " start"); } else { @@ -191,7 +194,8 @@ function filter_configure_sync() { if($config['system']['afterfilterchangeshellcmd'] <> "") { mwexec($config['system']['afterfilterchangeshellcmd']); } - + + close_notice($toclose); return 0; } @@ -1330,7 +1334,7 @@ function generate_user_filter_rule($rule, $ngcounter) { * is created by dhclient for 2nd wan interfaces, etc. */ if(file_exists("/tmp/{$rule['if']}_router")) - $rg = return_filename_as_string("/tmp/{$rule['if']}_router"); + $rg = file_get_contents("/tmp/{$rule['if']}_router"); if($rg <> "" and $ri <> "" and stristr($rule['interface'],"opt") == true) { $line .= "reply-to (" . $ri . " " . $rg . ") "; @@ -2290,4 +2294,4 @@ function return_vpn_subnet($adr) { } -?>
\ No newline at end of file +?> |