[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/48555: rc.conf handling of program=yes/no
The following reply was made to PR misc/48555; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: misc/48555: rc.conf handling of program=yes/no
Date: Tue, 28 Jan 2014 01:42:17 +0700
Date: Mon, 27 Jan 2014 17:05:00 +0000 (UTC)
From: Bob Nestor <rnestor%tx.rr.com@localhost>
| Just to reemphasize, this isn't a serious problem or something
| that keeps the system from running. It's just an annoying issue
| that probably shouldn't happen.
It shouldn't happen, and definitely doesn't happen for me. I'm not running
6.1.3 anywhere (yet) but your original PR said ...
These are minor errors that have been present in earlier releases as well.
suggesting that you have seen this same thing in earlier releases.
I have lots of "program=NO" lines in my rc.conf files on various systems,
and they all work exactly as expected.
I have no idea where the '[NO' that you're reporting comes from, but
some of what you're saying (the way you said to test it) suggests a
misunderstanding of how things are supposed to work.
First, while (since rc.conf is just a sh script) you can certainly put
comment lines in it (or comment partial lines), the comments are ignored,
no different than not being there at all - and for rc.d scripts installed
from pkgsrc, one of the rules is that you must have a name=YES or name=NO
line in rc.conf if the script is conditional (has an rcvar, as dirmngr does).
A line like
#dirmngr=YES (or NO)
is simply not there at all as far as the rc system is concerned, yet if
rc.d/dirmng exists, then there must be a dirmngr=YES or dirmngr=NO line in
rc.conf, or you will get errors reported about the incorrect configuration.
[Aside: it is known that some people, perhaps many people, don't like this
rule, as it only applies to pkgsrc added rc.d scripts -- all the scripts
from the base system have YES or NO settings in /etc/defaults/rc.conf which
are used if rc.conf doesn't include anything, so #postfix= ... is fine, to
go back to the default setting for postfix, but #dirmngr=... is not.]
Second, if you have
you are not supposed to be able to do
with it set to no, the dirmngr script is not supposed to be used at all
(for most purposes) - dirmngr is supposed to be disabled in that state
(so it makes no sense to attempt to start, stop, or restart it.) If you
had it running (dirmngr=YES) and want to disable it, issue the
command first, and then change rc.conf from YES to NO so it doesn't restart
at the next boot. Don't attempt to do those in the other order.
If for some reason you need to run rc.d/dirmngr when you have dirmngr=NO
then you need to use "onestart" or "onestop" (or perhaps "onerestart" though
I ave never needed that one, something that is running, and is to be restarted,
probably should have its config set to YES, not NO).
(You can use "force" instead of "one" which will then attempt to start/stop
the service even when various other tests fail - like required files not
Please check that your /etc/rc.subr hasn't been corrupted, and is the correct
version for 6.1.3
| I see it on a new install
| because I copy my previously configured rc.conf file to the
| new system and set all the programs to either "NO" or
| comment out the lines while I'm installing things.
I do that kind of thing too, and have never seen anything like you
report, so unless it is a new bug in 6.1.3, something weird is
happening on your system.
| When I'm finished I typically don't have any commented
| program lines or "NO" options left in my configuration.
I do, I have comments, because I put comments in my rc.conf (they don't
usually look like #name=NO but they're comments - what the comment says
is irrelevant to anyone but us humans most of the time, and always here).
I also have lots of XXX=NO, because I sometimes get trash installed as
a dependency, that I don't want to run, and because I often way to change
some of the base system programs that default to on (or kind of on, like
postfix) to off. I also have XXX=NO lines for stuff I want enabled, but
have not finished configuring yet - installed but not yet ready to run.
(Stuff often lives in that state for months, or even years...) or for
stuff that would be disabled by /etc/defaults/rc.conf anyway, but which I
am planning on enabling some day, and I want to be able to quickly work
out which variable(s) I need to turn on - having them already in rc.conf
makes it easier than needing to go hunting in /etc/defaults/rc.conf (or
worse, in the rc.d script itself.)
I have no problems with stray unwanted error messages at system shutdown time.
If I were ever to try "/etc/rc.d/posfix stop" (or restart) I would get an
error, as I have "postfix=NO" (absolutely everywhere), but on shutdown
postfix is just ignored, and (as it is disabled) there's no attempt to
stop it, and no stray errors about it.
Main Index |
Thread Index |