If it doesn''t *have* to be in rc.local, the usual method for this is
to do something like:
for script in /etc/rc.local.d/*; do
echo -n "Processing $script"
. $script
echo "done."
done
And have Puppet create individual scripts in /etc/rc.local.d (or pick
another directory name if you prefer... I think you can also do
. /etc/rc.local.d/*
But I can''t remember for sure.
On Jun 1, 11:04 am, Gajillion <gajill...@gmail.com>
wrote:> Hello,
> I''ve run across this several times now and I was wondering how
other
> people handle this. I would like to manage one or more fragments of
> code or data in a file that has no real form to it. For instance, I
> have about four or five different bits of code that go into /etc/
> rc.local depending on how a system is configured. There''s no
> structure to rc.local so Augeas can''t be used, and the code
fragments
> are almost always multiple lines so doing a simple append/remove is
> cumbersome.
>
> I was thinking along the lines of having a comment block in the file
>
> ### BEGIN Puppet control
> ... fragments here
> ### END Puppet control
>
> and then writing a module that maintains everything between the
> comment blocks for a particular node. "ensure"
"present" would just
> remove everything between the code blocks and re-write the segment
> with everything marked for being present.
>
> Anyone else tackled this in another way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---