Date: Wed, 20 Jun 2012 14:42:49 -0700 From: Freddie Cash <fjwcash@gmail.com> To: Daniel Robbins <drobbins@funtoo.org> Cc: Michael Ross <gmx@ross.cx>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> Subject: Re: Replacing rc(8) (Was: FreeBSD Boot Times) Message-ID: <CAOjFWZ63C5mBQBYRnG4GKRBR1uPiyG06Svz_x44_=VnfwL=u7w@mail.gmail.com> In-Reply-To: <CAPDOV4-2Hz=9fXBJ=oeRFxF7MEeQex946NdpgiPdSJzBwMrcBQ@mail.gmail.com> References: <4FDF6177.5050608@unsane.co.uk> <4FDF6586.9060501@gentoo.org> <4FDFB166.2040709@FreeBSD.org> <4FDFB44D.9090308@gentoo.org> <4FE0ADCD.9010109@FreeBSD.org> <4FE0C123.8030301@gentoo.org> <CAGH67wRidMZrzjzTSdwud%2BZ5V--wOTN8CHXOWcOr%2BE5XHYo2rA@mail.gmail.com> <4FE0F773.1080403@gentoo.org> <CAGH67wQdb-c0Kf=60rkaJSH8Hd0OjwCi=rQQMzGq8xfp2q7b=Q@mail.gmail.com> <4FE100F9.2050009@funtoo.org> <20120620073920.GA5300@lonesome.com> <alpine.BSF.2.00.1206201618560.75278@wojtek.tensor.gdynia.pl> <CAPDOV49kkOdeV%2B6LVW5j5PO6VYrrNVqWZEksc_GzvWHjbufoAQ@mail.gmail.com> <alpine.BSF.2.00.1206201722520.1856@wojtek.tensor.gdynia.pl> <CAPDOV4_ufNGyheDAhPxfndJ7WtH_u=5z7mrLtW-5-a9BMbCswg@mail.gmail.com> <alpine.BSF.2.00.1206201745040.1949@wojtek.tensor.gdynia.pl> <CAPDOV4_Fsj_QCLDWSs3o5qiDKS2hTH4qBf8fwJftne8KJNXy1Q@mail.gmail.com> <op.wf7v5el5g7njmm@michael-think> <CAPDOV4_x2T7p_3puD6AKpjoTwFCRPeP6mvvLxRVv_ZrgCTmU3g@mail.gmail.com> <CAPDOV4-2Hz=9fXBJ=oeRFxF7MEeQex946NdpgiPdSJzBwMrcBQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 20, 2012 at 1:28 PM, Daniel Robbins <drobbins@funtoo.org> wrote: > On Wed, Jun 20, 2012 at 2:22 PM, Daniel Robbins <drobbins@funtoo.org> wrote: >> >> This doesn't change the "hard" runlevel (3) but it changes the OpenRC >> logical runlevel. Basically, this convenient system is compatible with >> traditional linux numerical runlevels but does depend on them. >> > > Meant to type: "does NOT depend on them". > > Here is a bit more info: > > Runlevel-specific conf.d files: > > http://www.funtoo.org/wiki/Funtoo_Linux_Networking#Alternate_Configs > > Stacked runlevels (this is a more sophisticated feature than just > creating a duplicate, separately-managed runlevel): > > http://www.funtoo.org/wiki/Stacked_Runlevels > > To create a separately-managed runlevel, you would just: > > # mkdir /etc/runlevels/maintenance > # rc-update add maintenance svc1 > # rc-update add maintenance svc2 > # rc-update add maintenance svc1 > > You could then switch by typing: > > # rc maintenance > > Anything not in the maintenance runlevel that is currently running > would be stopped, and any new services in maintenance that are not > running would be started. There's no need to do a wholesale replacement of the RC system in FreeBSD to support this concept. What you are describing are "service profiles". And we already have a single file that describes the default "service profile" for FreeBSD: /etc/rc.conf. That lists every service that should be started (or stopped). All that's missing is a way to tell the RC system to use a different rc.conf file (like rc.conf.mobile, or rc.conf.wireless or rc.conf.whatever), and to run through the RC setup based on that file. Our current RC system does everything needed except: - parallel execution of items that don't depend on each other - monitor running services and restart them if they crash Compared to all the init/RC systems on Linux, ours has *many* advantages, not the least of which are: - very simple text configuration file - only 2 directories of init scripts to worry about (/etc/rc.d; /usr/local/etc/rc.d) - ability to create "generic" or global config file (/etc/rc.conf) with local overrides (/etc/rc.conf.local) - ability to see the exact order that things will start (or stop) via rcorder - everything is written in nice, simple, sh We don't need to replace a perfectly working system. Maybe it needs improving, but it doesn't need replacing. -- Freddie Cash fjwcash@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ63C5mBQBYRnG4GKRBR1uPiyG06Svz_x44_=VnfwL=u7w>