Contributed by pitrh on from the was that by by remote control dept.
Antoine Jacoutot (ajacoutot@) has just committed committed a tool for managing rc.conf.local(8), in order to make it simpler for automated management systems such as Puppet or Ansible to interface with the operating system configuration:
CVSROOT: /cvs Module name: src Changes by: ajacoutot@cvs.openbsd.org 2014/08/19 08:08:20 Added files: usr.sbin/rcctl : Makefile rcctl.8 rcctl.sh Log message: Introduce rcctl(8), a simple utility for maintaining rc.conf.local(8). # rcctl usage: rcctl enable|disable|status|action [service [flags [...]]] Lots of man page improvement from the usual suspects (jmc@ and schwarze@) not hooked up yet but committing now so work can continue in-tree agreed by several
(Comments are closed)
By Michael W Lucas (agshekeloh) mwlucas@michaelwlucas.com on http://www.michaelwlucas.com
I've seen all kinds of goofy errors with these management systems. I don't want ansible/puppet/whatever screwing up my carefully configured OpenBSD boxes... that's my job.
Comments
By Ray Percival (sng) on http://undeadly.org/cgi?action=search&sort=time&query=sng
> Hurrah!
>
> I've seen all kinds of goofy errors with these management systems. I don't want ansible/puppet/whatever screwing up my carefully configured OpenBSD boxes... that's my job.
Comments
By Anonymous Coward (2001:981:aaf3:1:3dde:b41d:a8c8:f208) on
Greek, not Latin
By Anonymous Coward (91.65.157.11) on
I install a new system, tell rcctl what services should run and it creates me such a file wich I then could copy to other mashines?
So the advantage is that I don't need to lookup if some stuff has NAME_flags="" or NAME=yes/no ?
Comments
By Antoine Jacoutot (ajacoutot) on http://www.bsdfrog.org/
No. You can use whichever you prefer.
Keep editing rc.conf.local manually, use rcctl or use both. We do not enforce anything.
> I install a new system, tell rcctl what services should run and it creates me such a file wich I then could copy to other mashines?
>
> So the advantage is that I don't need to lookup if some stuff has NAME_flags="" or NAME=yes/no ?
Something like that.
To know if a service is enabled or not, you don't need to go read the defaults in rc.conf and the overrides in rc.conf.local.
You can just do:
rcctl status foobar
Let's say you want to enable ntpd on your box and set the time immediately at startup. You have now 2 options:
- edit /etc/rc.conf.local manually and add:
ntpd_flags=-s
- use rcctl:
rcctl enable ntpd flags -s
The presence of an existing rc.conf.local file does not matter, it will be created if it's not there.
The tool is especially interesting for config management systems which need to maintain service states (enabled, started, ...).
Comments
By Anonymous Coward (2601:6:51c0:e1:e834:aa3e:863d:9884) on
>
> No. You can use whichever you prefer.
> Keep editing rc.conf.local manually, use rcctl or use both. We do not enforce anything.
> [snip]
> The tool is especially interesting for config management systems which need to maintain service states (enabled, started, ...).
Good stuff. Many thanks for doing this!
By thomasw_ (108.172.49.178) thomas.wildeman@gmail.com on
Comments
By rjc (rjc) on
Well, 'enable/disable' obviously do but I doubt the same will apply to 'status'.
By phessler (phessler) on http://www.openbsdfoundation.org/donations.html
how would rcctl require root to run, but editing rc.conf.local not?
Comments
By Anonymous Coward (thomasw_) on http://www.flickr.com/photos/thomasw_/
>
> how would rcctl require root to run, but editing rc.conf.local not?
sorry for the noise.
i used poor phrasing; instead of "... and that I can ...," I would've been more clear to write "... just as I can do while still being able to manually edit ..."
Comments
By phessler (phessler) on http://www.openbsdfoundation.org/donations.html
> >
> > how would rcctl require root to run, but editing rc.conf.local not?
>
> sorry for the noise.
>
> i used poor phrasing; instead of "... and that I can ...," I would've been more clear to write "... just as I can do while still being able to manually edit ..."
yes you can.
By Anonymous Coward (62.159.86.18) on
Comments
By Antoine Jacoutot (ajacoutot) on http://www.bsdfrog.org/
Yes it does.