OpenBSD Journal
Home : : Add Story : : Archives : : About : : Create Account : : Login :
Heads up: rcctl(8) the rc.conf.local management tool landing in base soon
Contributed by pitrh on Tue Aug 19 17:34:45 2014 (GMT)
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

[topicsysadmin]

<< Early bird rates for EuroBSDCon 2014 have been extended | Reply | Flattened | Collapsed | Google offers 5 EuroBSDCon 2014 travel grants for female computer scientists >>

Threshold: Help

Related Links
more by pitrh


  Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 4/6)
by Michael W Lucas (agshekeloh) (mwlucas@michaelwlucas.com) on Wed Aug 20 11:40:11 2014 (GMT)
http://www.michaelwlucas.com
  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.
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

       
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 1/3)
by Ray Percival (sng) on Wed Aug 20 13:42:55 2014 (GMT)
http://undeadly.org/cgi?action=search&sort=time&query=sng
  Automation from the Latin roots auto meaning self and mate meaning screw.

> 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.

  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

         
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod -1/3)
by Anonymous Coward (2001:981:aaf3:1:3dde:b41d:a8c8:f208) on Wed Aug 20 19:55:44 2014 (GMT)
  > Automation from the Latin roots auto meaning self and mate meaning screw.

Greek, not Latin
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

  Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod -1/3)
by Anonymous Coward (91.65.157.11) on Wed Aug 20 11:42:07 2014 (GMT)
  So basicaly this will replace the manual edition of rc.conf.local?
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 ?
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

       
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 3/3)
by Antoine Jacoutot (ajacoutot) on Wed Aug 20 15:22:08 2014 (GMT)
http://www.bsdfrog.org/
  > So basicaly this will replace the manual edition of rc.conf.local?

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, ...).
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

         
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 1/1)
by Anonymous Coward (2601:6:51c0:e1:e834:aa3e:863d:9884) on Wed Aug 20 19:59:52 2014 (GMT)
  > > So basicaly this will replace the manual edition of rc.conf.local?
>
> 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!

  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

  Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 2/2)
by thomasw_ (108.172.49.178) (thomas.wildeman@gmail.com) on Wed Aug 20 16:10:10 2014 (GMT)
  assuming that rcctl will require root/sudo to run and that I can still manaually edit rc.conf.local, I can foresee more efficient setups with this utility. so, thanks heaps for the work on this devs!
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

       
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 2/2)
by rjc (rjc) on Wed Aug 20 20:31:22 2014 (GMT)
  > assuming that rcctl will require root/sudo to run and that I can still manaually edit rc.conf.local, I can foresee more efficient setups with this utility. so, thanks heaps for the work on this devs!

Well, 'enable/disable' obviously do but I doubt the same will apply to 'status'.
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

       
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 1/1)
by phessler (phessler) on Wed Aug 20 22:14:21 2014 (GMT)
http://www.openbsdfoundation.org/donations.html
  > assuming that rcctl will require root/sudo to run and that I can still manaually edit rc.conf.local, I can foresee more efficient setups with this utility. so, thanks heaps for the work on this devs!

how would rcctl require root to run, but editing rc.conf.local not?
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

         
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod -1/1)
by Anonymous Coward (thomasw_) on Thu Aug 21 23:21:18 2014 (GMT)
http://www.flickr.com/photos/thomasw_/
  > > assuming that rcctl will require root/sudo to run and that I can still manaually edit rc.conf.local, I can foresee more efficient setups with this utility. so, thanks heaps for the work on this devs!
>
> 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 ..."
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

           
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 1/1)
by phessler (phessler) on Fri Aug 22 13:36:28 2014 (GMT)
http://www.openbsdfoundation.org/donations.html
  > > > assuming that rcctl will require root/sudo to run and that I can still manaually edit rc.conf.local, I can foresee more efficient setups with this utility. so, thanks heaps for the work on this devs!
> >
> > 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.
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

  Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 0/2)
by Anonymous Coward (62.159.86.18) on Thu Aug 21 06:59:01 2014 (GMT)
  Does this work for pkg_scripts as well?
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

       
Re: Heads up: rcctl(8) the rc.conf.local management tool landing in base soon (mod 1/1)
by Antoine Jacoutot (ajacoutot) on Thu Aug 21 09:04:03 2014 (GMT)
http://www.bsdfrog.org/
  > Does this work for pkg_scripts as well?

Yes it does.
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

[ Home | Add Story | Archives | Polls | About ]

Copyright © 2004-2008 Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to April 2nd 2004 as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. Some icons from slashdot.org used with permission from Kathleen. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. Search engine is ht://Dig. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]