summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2009-08-17 05:05:03 -0400
committerChris Buechler <cmb@pfsense.org>2009-08-17 05:05:03 -0400
commitddd6183335423f202e5d79e691813dd936394a06 (patch)
tree32bdc6cf23f372cbb5e1a94887b52eccd989733d /etc
parentdefe97ddf028e4f16f4db05b47a1edeff9bdd645 (diff)
parent2f90ab8ca65fff3ab5f64ae8da8eb3cd92eb0a4c (diff)
downloadpfsense-ddd6183335423f202e5d79e691813dd936394a06.zip
pfsense-ddd6183335423f202e5d79e691813dd936394a06.tar.gz
Merge branch 'RELENG_1_2' of http://gitweb.pfsense.org/pfsense/mainline into RELENG_1_2
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc9
-rw-r--r--etc/inc/system.inc9
-rwxr-xr-xetc/rc8
-rwxr-xr-xetc/rc.initial.setlanip5
4 files changed, 24 insertions, 7 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 33e7f90..3953825 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1203,15 +1203,18 @@ function filter_nat_rules_generate() {
$toadd_array[] = $loc_pt_translated;
}
foreach($toadd_array as $tda){
- if($protocol == "udp")
+ if($protocol == "udp") {
+ $socktype = "dgram";
$dash_u = "-u ";
- else
+ } else {
+ $socktype = "stream";
$dash_u = "";
+ }
if($config['system']['reflectiontimeout'])
$reflectiontimeout = $config['system']['reflectiontimeout'];
else
$reflectiontimeout = "2000";
- fwrite($inetd_fd, "{$starting_localhost_port}\tstream\t{$protocol}\tnowait/0\tnobody\t/usr/bin/nc nc {$dash_u}-w {$reflectiontimeout} {$target} {$tda}\n");
+ fwrite($inetd_fd, "{$starting_localhost_port}\t{$socktype}\t{$protocol}\tnowait/0\tnobody\t/usr/bin/nc nc {$dash_u}-w {$reflectiontimeout} {$target} {$tda}\n");
if($ifname_real)
$natrules .= "rdr on \${$ifname_real} proto {$protocol} from any to {$extaddr} port { {$xxx} } -> 127.0.0.1 port {$starting_localhost_port}\n";
$xxx++;
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 0789776..e9d7578 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -37,6 +37,11 @@ function opcode_cache_configuration() {
if($g['platform'] == "cdrom")
return;
+ if($g['platform'] == "nanobsd" || $g['platform'] == "embedded")
+ $upload_tmp_dir = "/root";
+ else
+ $upload_tmp_dir = "/tmp";
+
/* get system memory amount */
$memory = get_memory();
$avail = $memory[0];
@@ -64,7 +69,7 @@ memory_limit = 32M
register_argc_argv = On
file_uploads = On
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/
-upload_tmp_dir = /tmp
+upload_tmp_dir = {$upload_tmp_dir}
upload_max_filesize = 100M
post_max_size = 100M
html_errors = Off
@@ -1281,4 +1286,4 @@ function system_enable_arp_wrong_if() {
mwexec("/sbin/sysctl -n net.link.ether.inet.log_arp_movements=1");
}
-?> \ No newline at end of file
+?>
diff --git a/etc/rc b/etc/rc
index 9db22f6..6f9af63 100755
--- a/etc/rc
+++ b/etc/rc
@@ -245,6 +245,12 @@ echo "done."
# Recreate capabilities DB
cap_mkdb /etc/login.conf
+if [ "$PLATFORM" = "nanobsd" -o "$PLATFORM" = "embedded" ]; then
+ upload_tmp_dir="/root"
+else
+ upload_tmp_dir="/tmp"
+fi
+
if [ "$PLATFORM" != "cdrom" ]; then
# Populate a dummy php.ini to avoid
# the file being clobbered and the firewall
@@ -258,7 +264,7 @@ max_execution_time = 99999999
max_input_time = 99999999
register_argc_argv = Off
file_uploads = On
-upload_tmp_dir = /tmp
+upload_tmp_dir = ${upload_tmp_dir}
upload_max_filesize = 90M
post_max_size = 90M
html_errors = Off
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 43ed64c..5fdae64 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -82,7 +82,7 @@
exit(0);
}
} while (!is_ipaddr($dhcpendip));
-
+ $restart_dhcpd = true;
$config['dhcpd']['lan']['enable'] = true;
$config['dhcpd']['lan']['range']['from'] = $dhcpstartip;
$config['dhcpd']['lan']['range']['to'] = $dhcpendip;
@@ -106,6 +106,9 @@
write_config("LAN IP configuration from console menu");
interfaces_lan_configure();
+ if($restart_dhcpd)
+ services_dhcpd_configure();
+
echo <<<EOD
The LAN IP address has been set to $lanip/$lanbits.
OpenPOWER on IntegriCloud