Why? I must be overlooking something.
[EMAIL PROTECTED] root2]# vi /etc/sysctl.conf (to mess up the file)
[EMAIL PROTECTED] root2]# /var/cfengine/bin/cfagent --no-splay --inform -A -
q
cfengine:xxxx: Saving edit changes to file /etc/motd
cfengine:xxxx: Saving edit changes to file /etc/sysctl.conf
but if I define it manually, it works
[EMAIL PROTECTED] root2]# vi /etc/sysctl.conf (to mess up the file)
[EMAIL PROTECTED] root2]# /var/cfengine/bin/cfagent --no-splay --inform -A -q -
Drunsysctl
cfengine:xxxx: Saving edit changes to file /etc/motd
cfengine:xxxx: Saving edit changes to file /etc/sysctl.conf
cfengine:xxxx: Executing script /sbin/sysctl -
p...(timeout=120,uid=0,gid=0)
cfengine:xxxx:bin/sysctl -p: net.ipv4.ip_forward = 0
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_keepalive_time = 1200
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_fin_timeout = 15
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_keepalive_intvl = 20
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_keepalive_probes = 5
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_sack = 1
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_dsack = 0
cfengine:xxxx:bin/sysctl -p: net.ipv4.tcp_timestamps = 0
cfengine:xxxx:bin/sysctl -p: net.ipv4.conf.default.rp_filter = 1
cfengine:xxxx:bin/sysctl -p: kernel.sysrq = 0
cfengine:xxxx:bin/sysctl -p: kernel.core_uses_pid = 1
cfengine:xxxx: Finished script /sbin/sysctl -p
[EMAIL PROTECTED] root2]#
[EMAIL PROTECTED] root2]# cfagent -V
GNU cfengine 2.1.11
Free Software Foundation 1994-
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway
This program is covered by the GNU Public License and may be
copied free of charge. No warranty is implied.
script:
shellcommands:
runsysctl::
"/sbin/sysctl -p" timeout=120
inform=true owner=0 group=0 background=false useshell=true umask=0022
server::
{ /etc/sysctl.conf
AutoCreate
BeginGroupIfNoLineMatching "^net.ipv4.ip_forward = 0"
DeleteLinesMatching "^net.ipv4.ip_forward.*$"
InsertLine "net.ipv4.ip_forward = 0"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_keepalive_time = 1200"
DeleteLinesMatching "^net.ipv4.tcp_keepalive_time.*"
InsertLine "net.ipv4.tcp_keepalive_time = 1200"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_fin_timeout = 15"
DeleteLinesMatching "^net.ipv4.tcp_fin_timeout.*"
InsertLine "net.ipv4.tcp_fin_timeout = 15"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_keepalive_intvl = 20"
DeleteLinesMatching "^net.ipv4.tcp_keepalive_intv.*"
InsertLine "net.ipv4.tcp_keepalive_intvl = 20"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_keepalive_probes = 5"
DeleteLinesMatching "^net.ipv4.tcp_keepalive_probes.*"
InsertLine "net.ipv4.tcp_keepalive_probes = 5"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_sack = 1"
DeleteLinesMatching "^net.ipv4.tcp_sack.*"
InsertLine "net.ipv4.tcp_sack = 1"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_dsack = 0"
DeleteLinesMatching "^net.ipv4.tcp_dsack.*"
InsertLine "net.ipv4.tcp_dsack = 0"
EndGroup
BeginGroupIfNoLineMatching "^net.ipv4.tcp_timestamps = 0"
DeleteLinesMatching "^net.ipv4.tcp_timestamps.*"
InsertLine "net.ipv4.tcp_timestamps = 0"
EndGroup
DefineClasses "runsysctl"
}
--
Alex Ivanisevic, 2e systems
Tel: +49 (0)6107 989 414
Fax: +49 (0)6107 989 494
Handy: +49 (0)174 310 9333
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine