/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-pppoeMlimit.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-pppoeMlimit.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Jan 30 06:06:59 2013 UTC (11 years, 9 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-base-5_2_0-68_el5_sme
Changes since 1.1: +56 -7 lines
Updated previous patch to avoid migrate fragment [SME: 7000]

1 diff -ruN e-smith-base-5.2.0.old/createlinks e-smith-base-5.2.0/createlinks
2 --- e-smith-base-5.2.0.old/createlinks 2013-01-30 05:07:05.000000000 +0000
3 +++ e-smith-base-5.2.0/createlinks 2013-01-30 05:23:47.000000000 +0000
4 @@ -19,6 +19,7 @@
5 /var/lib/dhclient/dhclient-eth1.conf
6 /var/service/wan/pppoe.pppd.conf
7 /var/service/wan/run.pppoe.conf
8 + /var/service/wan/env.pppoe/PPPD_MLIMIT
9 /etc/ppp/ip-down.local
10 /etc/ppp/ip-up.local
11 ))
12 diff -ruN e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/env.pppoe/PPPD_MLIMIT e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/env.pppoe/PPPD_MLIMIT
13 --- e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/env.pppoe/PPPD_MLIMIT 1970-01-01 01:00:00.000000000 +0100
14 +++ e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/env.pppoe/PPPD_MLIMIT 2013-01-30 05:28:36.000000000 +0000
15 @@ -0,0 +1,18 @@
16 +{
17 + # memory limit to catch any memory leak before it kills the system
18 + my $MIN_MEMORY_LIMIT = 100000000;
19 + $OUT = $MIN_MEMORY_LIMIT;
20 +
21 + if (defined $pppoe{Mlimit})
22 + {
23 + # If there is a DB variable defined that is less than the minimum memroy limit, delete it.
24 + if ($pppoe{Mlimit} <= $MIN_MEMORY_LIMIT)
25 + {
26 + $DB->get_prop_and_delete('pppoe','Mlimit');
27 + }
28 + else
29 + {
30 + $OUT=$pppoe{Mlimit};
31 + }
32 + }
33 +}
34 diff -ruN e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit
35 --- e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit 2007-01-27 01:56:31.000000000 +0000
36 +++ e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit 1970-01-01 01:00:00.000000000 +0100
37 @@ -1,5 +0,0 @@
38 -{
39 -# memory limit to catch any memory leak before it kills the system
40 - my $mlimit = $pppoe{Mlimit} || '25000000';
41 - $OUT = "PPPD_MLIMIT=$mlimit";
42 -}
43 diff -ruN e-smith-base-5.2.0.old/root/var/service/wan/run.pppoe e-smith-base-5.2.0/root/var/service/wan/run.pppoe
44 --- e-smith-base-5.2.0.old/root/var/service/wan/run.pppoe 2013-01-30 05:07:05.000000000 +0000
45 +++ e-smith-base-5.2.0/root/var/service/wan/run.pppoe 2013-01-30 05:23:35.000000000 +0000
46 @@ -22,11 +22,12 @@
47 exec 2>&1
48
49 . run.pppoe.conf
50 +MEM="`head -1 ./env.pppoe/PPPD_MLIMIT`"
51
52 extaddr=$(/sbin/e-smith/config getprop ExternalInterface IPAddress)
53
54 exec \
55 - /usr/local/bin/softlimit -m $PPPD_MLIMIT \
56 + /usr/local/bin/softlimit -m ${MEM} \
57 /usr/bin/setsid \
58 /usr/sbin/pppd ${extaddr:+$extaddr:} \
59 file pppoe.pppd.conf

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed