Hi folks,

for the next user looking for help ... augeas did the trick

augeas { "selinux":
    context => "/files/etc/sysconfig/selinux/",
    changes => [ "set SELINUX disabled" ],
}

debug: Augeas[selinux](provider=augeas): Augeas version 0.8.1 is installed
debug: Augeas[selinux](provider=augeas): Will attempt to save and only run
if files
changed

debug: Augeas[selinux](provider=augeas): sending command 'set' with params
["/files/etc/sysconfig/selinux/SELINUX",
"disabled"]
debug: Augeas[selinux](provider=augeas): Executing 'diff -u
/etc/sysconfig/selinux
/etc/sysconfig/selinux.augnew'

wrong number of arguments (2 for 1)
debug: Augeas[selinux](provider=augeas): Files changed, should execute
debug: Augeas[selinux](provider=augeas): /etc/sysconfig/selinux.augnew moved
to
/etc/sysconfig/selinux

debug: Augeas[selinux](provider=augeas): Closed the augeas connection

thanks for the help!
-fred




On Fri, Aug 26, 2011 at 8:42 AM, Frederiko Costa <[email protected]>wrote:

> I tried both suggestions: egrep and adding the -e switch on sed, but none
> worked. I'm going to try augeas ...
>
> -fred
>
>
>
>
>
> On Fri, Aug 26, 2011 at 8:31 AM, Kinzel, David <[email protected]>wrote:
>
>> > Hi folks,
>> >
>> > I have the following resource on my test environ:
>> >
>> > exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/'
>> /etc/selinux/config":
>> >     path => [ '/usr/bin', '/bin' ],
>> >     onlyif => "/bin/grep '^SELINUX=enforcing' /etc/sysconfig/selinux
>> 2>/dev/null",
>> >     logoutput => true,
>> > }
>>
>>
>> /bin/egrep: Regular /bin/grep will not do your start (^) matching as you
>> want.
>>
>>
>>
>>
>> This email communication and any files transmitted with it may contain
>> confidential and or proprietary information and is provided for the use of
>> the
>> intended recipient only. Any review, retransmission or dissemination of
>> this
>> information by anyone other than the intended recipient is prohibited. If
>> you
>> receive this email in error, please contact the sender and delete this
>> communication and any copies immediately. Thank you.
>>
>> http://www.encana.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to