Brandon Whalen writes:
>
> I've spent some time looking at the example recipes and reading the docs on
> a problem, but I'm still stumped. I'm trying to add some options to my fstab
> and am finding some problems. I'm using the environment option to create an
> environment variable MNT_OPTS that I then reference as part of a sed call.
> I'm finding that MNT_OPTS is empty when I reference it. My exact code is
> below.
>
> #nosuid, nodev, and acl on /home
> exec { "sed -i 's/\( \/home.*${MNT_OPTS}\)/\1,nosuid,nodev,acl/'
> /etc/fstab":
> onlyif => "test `grep ' \/home ' /etc/fstab | grep -c nosuid` -eq 0",
> environment => "MNT_OPTS=`grep ' \/home ' /etc/fstab | awk '{print
> $4}'`";
> }
AUGH! THIS IS INSANE! I AM INSANE NOW!
> Could someone tell me what I'm doing wrong and tell me what I need to do to
> fix it or point me at some examples.
I strongly suggest that you look at the "mount" resource type. This
thing you are doing with 'sed' is nasty and dangerous.
> Regards,
> Brandon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---